项目现场调试修改

This commit is contained in:
liuhanqing
2026-01-06 13:47:34 +08:00
parent 3097e8a3a0
commit c43b79d9e6
16 changed files with 335 additions and 94 deletions

View File

@@ -114,6 +114,16 @@ public class MesOutorderDetailMiddle extends BaseEntity
@Excel(name="客户简称") @Excel(name="客户简称")
private String saleUnit; private String saleUnit;
private String printDate;
public String getPrintDate() {
return printDate;
}
public void setPrintDate(String printDate) {
this.printDate = printDate;
}
public String getOnLineType() { public String getOnLineType() {
return onLineType; return onLineType;
} }

View File

@@ -45,8 +45,19 @@ public class ViewProductAndStock extends BaseEntity
@Excel(name = "库存数量") @Excel(name = "库存数量")
private BigDecimal quantity; private BigDecimal quantity;
@Excel(name = "出库时间")
private String printDate;
private String outType; private String outType;
public String getPrintDate() {
return printDate;
}
public void setPrintDate(String printDate) {
this.printDate = printDate;
}
public String getOutType() { public String getOutType() {
return outType; return outType;
} }

View File

@@ -64,6 +64,17 @@ public class ViewOutJobAll extends BaseEntity
@Excel(name = "出库时间") @Excel(name = "出库时间")
private String inDate; private String inDate;
private String inFDate; private String inFDate;
/** 客户名称 */
@Excel(name = "客户名称")
private String customerName;
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public void setOrderType(String orderType) public void setOrderType(String orderType)
{ {

View File

@@ -8,6 +8,7 @@ import com.alibaba.druid.support.json.JSONUtils;
import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.json.JSONObject; import com.ruoyi.common.json.JSONObject;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.security.RsaUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.authc.UsernamePasswordToken;
@@ -77,6 +78,11 @@ public class SysLoginController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult ajaxLogin(HttpServletRequest request,String username, String password, Boolean rememberMe) public AjaxResult ajaxLogin(HttpServletRequest request,String username, String password, Boolean rememberMe)
{ {
try {
password = RsaUtils.decryptByPrivateKey(password);
} catch (Exception e) {
throw new RuntimeException(e);
}
UsernamePasswordToken token = new UsernamePasswordToken(username, password, rememberMe); UsernamePasswordToken token = new UsernamePasswordToken(username, password, rememberMe);
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
try try

View File

@@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="inOut" column="in_out" /> <result property="inOut" column="in_out" />
<result property="onLineType" column="on_line_type" /> <result property="onLineType" column="on_line_type" />
<result property="saleUnit" column="sale_unit" /> <result property="saleUnit" column="sale_unit" />
<result property="printDate" column="print_date" />
</resultMap> </resultMap>
<sql id="selectMesOutorderDetailMiddleVo"> <sql id="selectMesOutorderDetailMiddleVo">
@@ -104,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select m.id, m.order_id, m.line_no, m.material_code, erp_code, product_batch, weight, shape, select m.id, m.order_id, m.line_no, m.material_code, erp_code, product_batch, weight, shape,
pallet_type, layer_quantity, layers, m.plan_in_quantity, m.produce_date, m.xf_time,p.product_name, pallet_type, layer_quantity, layers, m.plan_in_quantity, m.produce_date, m.xf_time,p.product_name,
m.remark,cm,spdd,zbq,mbq,czdd,hgz,hp,allot_num,confirm_num,m.out_id,detail_status,m.floor,mdfs, m.remark,cm,spdd,zbq,mbq,czdd,hgz,hp,allot_num,confirm_num,m.out_id,detail_status,m.floor,mdfs,
md_num,num_of_times,time_of_num,in_out,m.on_line_type md_num,num_of_times,time_of_num,in_out,m.on_line_type,m.print_date
from mes_outorder_detail_middle m from mes_outorder_detail_middle m
left join bas_product p on p.simple_name=m.produce_date and p.spare1=m.material_code left join bas_product p on p.simple_name=m.produce_date and p.spare1=m.material_code
left join mes_outorder_middle o on o.order_id=m.order_id left join mes_outorder_middle o on o.order_id=m.order_id
@@ -202,6 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="floor != null">floor,</if> <if test="floor != null">floor,</if>
<if test="mdfs != null">mdfs,</if> <if test="mdfs != null">mdfs,</if>
<if test="mdNum != null">md_num,</if> <if test="mdNum != null">md_num,</if>
<if test="printDate != null">print_date,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@@ -233,6 +235,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="floor != null">#{floor},</if> <if test="floor != null">#{floor},</if>
<if test="mdfs != null">#{mdfs},</if> <if test="mdfs != null">#{mdfs},</if>
<if test="mdNum != null">#{mdNum},</if> <if test="mdNum != null">#{mdNum},</if>
<if test="printDate != null">#{printDate},</if>
</trim> </trim>
</insert> </insert>
<update id="updateMesOutorderDetailMiddle" parameterType="MesOutorderDetailMiddle"> <update id="updateMesOutorderDetailMiddle" parameterType="MesOutorderDetailMiddle">

View File

@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="classgroupNumber" column="classgroup_number" /> <result property="classgroupNumber" column="classgroup_number" />
<result property="quantity" column="quantity" /> <result property="quantity" column="quantity" />
<result property="productDetailId" column="product_detail_id" /> <result property="productDetailId" column="product_detail_id" />
<result property="printDate" column="print_date" />
</resultMap> </resultMap>
<sql id="selectViewProductAndStockVo"> <sql id="selectViewProductAndStockVo">
@@ -28,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bs.in_class_name, bs.in_class_name,
bs.classgroup_number, bs.classgroup_number,
bs.product_detail_id, bs.product_detail_id,
bs.print_date,
SUM ( quantity ) AS quantity SUM ( quantity ) AS quantity
FROM FROM
( (
@@ -41,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.quantity, b.quantity,
b.classgroup_number, b.classgroup_number,
b.product_detail_id, b.product_detail_id,
b.print_date,
b.class_now_date_time ------销售订单号 b.class_now_date_time ------销售订单号
FROM FROM
bas_stock b bas_stock b
@@ -69,7 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bs.lot_no, bs.lot_no,
bs.in_class_name, bs.in_class_name,
bs.product_detail_id, bs.product_detail_id,
bs.classgroup_number bs.classgroup_number,
bs.print_date

View File

@@ -18,10 +18,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="weigth" column="weigth" /> <result property="weigth" column="weigth" />
<result property="inDate" column="in_date" /> <result property="inDate" column="in_date" />
<result property="printDate" column="print_date" /> <result property="printDate" column="print_date" />
<result property="customerName" column="customer_name" />
</resultMap> </resultMap>
<sql id="selectViewOutJobAllVo"> <sql id="selectViewOutJobAllVo">
select order_type, dict_label, length, product_name, product_id, lot_no, quantity, product_unit, tray_count, simple_name, weigth, in_date,print_date from view_out_job_all select order_type, dict_label, length, product_name, product_id, lot_no, quantity, product_unit, tray_count, simple_name, weigth, in_date,print_date,customer_name from view_out_job_all
</sql> </sql>
<select id="selectViewOutJobAllList" parameterType="ViewOutJobAll" resultMap="ViewOutJobAllResult"> <select id="selectViewOutJobAllList" parameterType="ViewOutJobAll" resultMap="ViewOutJobAllResult">
@@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="weigth != null and weigth != ''"> and weigth = #{weigth}</if> <if test="weigth != null and weigth != ''"> and weigth = #{weigth}</if>
<if test="inDate != null and inDate != ''"> and in_date &gt;= #{inDate}</if> <if test="inDate != null and inDate != ''"> and in_date &gt;= #{inDate}</if>
<if test="inFDate != null and inFDate != ''"> and in_date &lt;= #{inFDate}</if> <if test="inFDate != null and inFDate != ''"> and in_date &lt;= #{inFDate}</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%',#{customerName},'%')</if>
</where> </where>
</select> </select>

File diff suppressed because one or more lines are too long

View File

@@ -13,7 +13,14 @@ $.validator.setDefaults({
login(); login();
} }
}); });
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' +
'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
// 加密
function encrypt(txt) {
const encryptor = new JSEncrypt()
encryptor.setPublicKey(publicKey) // 设置公钥
return encryptor.encrypt(txt) // 对数据进行加密
}
function login() { function login() {
$.modal.loading($("#btnSubmit").data("loading")); $.modal.loading($("#btnSubmit").data("loading"));
var username = $.common.trim($("input[name='username']").val()); var username = $.common.trim($("input[name='username']").val());
@@ -25,7 +32,7 @@ function login() {
url: ctx + "login", url: ctx + "login",
data: { data: {
"username": username, "username": username,
"password": password, "password": encrypt(password),
"validateCode": validateCode, "validateCode": validateCode,
"rememberMe": rememberMe "rememberMe": rememberMe
}, },

View File

@@ -69,6 +69,7 @@
<script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; </script> <script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; </script>
<!--[if lte IE 8]><script>window.location.href=ctx+'html/ie.html';</script><![endif]--> <!--[if lte IE 8]><script>window.location.href=ctx+'html/ie.html';</script><![endif]-->
<!-- 全局js --> <!-- 全局js -->
<script src="../static/js/jsencrypt.min.js" th:src="@{/js/jsencrypt.min.js}"></script>
<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script> <script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script> <script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script> <script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>

View File

@@ -144,6 +144,11 @@
title: '库存数量', title: '库存数量',
align: 'center' align: 'center'
}, },
{
field: 'printDate',
title: '生产日期',
align: 'center'
},
{ {
field: 'planInQuantity', field: 'planInQuantity',
title: '出库数量', title: '出库数量',
@@ -301,6 +306,7 @@
obj.productBatch = Members[i].lotNo; obj.productBatch = Members[i].lotNo;
obj.materialCode = Members[i].classgroupNumber; obj.materialCode = Members[i].classgroupNumber;
obj.shape = Members[i].productDetailId; obj.shape = Members[i].productDetailId;
obj.printDate = Members[i].printDate;
// var outType=$("#outType").val() // var outType=$("#outType").val()
// //

View File

@@ -140,6 +140,12 @@
halign: 'center', halign: 'center',
align: 'center', align: 'center',
}, },
{
field: 'printDate',
title: '生产日期',
halign: 'center',
align: 'center',
},
{ {
field: 'quantity', field: 'quantity',

View File

@@ -736,6 +736,11 @@
title: '出库层数', title: '出库层数',
align: 'center' align: 'center'
}, },
{
field: 'printDate',
title: '生产日期',
align: 'center'
},
{ {
field: 'numOfTimes', field: 'numOfTimes',
title: '打印个数', title: '打印个数',

View File

@@ -25,6 +25,9 @@
<li> <li>
<label>批次:</label> <label>批次:</label>
<input type="text" name="lotNo"/> <input type="text" name="lotNo"/>
</li><li>
<label>客户:</label>
<input type="text" name="customerName"/>
</li> </li>
<li> <li>
@@ -211,6 +214,14 @@
sortable: true, sortable: true,
visible: true visible: true
}, },
{
field: 'customerName',
title: '客户',
halign: 'center',
align:'center',
sortable: true,
visible: true
},
// { // {
// title: '操作', // title: '操作',
// halign: 'center', // halign: 'center',

View File

@@ -0,0 +1,153 @@
package com.ruoyi.common.utils.security;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
/**
* RSA加密解密
*
* @author ruoyi
**/
public class RsaUtils
{
// Rsa 私钥
public static String privateKey = "MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY"
+ "7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN"
+ "PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA"
+ "kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow"
+ "cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv"
+ "DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh"
+ "YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3" + "UP8iWi1Qw0Y=";
/**
* 私钥解密
*
* @param privateKeyString 私钥
* @param text 待解密的文本
* @return 解密后的文本
*/
public static String decryptByPrivateKey(String text) throws Exception
{
return decryptByPrivateKey(privateKey, text);
}
/**
* 公钥解密
*
* @param publicKeyString 公钥
* @param text 待解密的信息
* @return 解密后的文本
*/
public static String decryptByPublicKey(String publicKeyString, String text) throws Exception
{
X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, publicKey);
byte[] result = cipher.doFinal(Base64.decodeBase64(text));
return new String(result);
}
/**
* 私钥加密
*
* @param privateKeyString 私钥
* @param text 待加密的信息
* @return 加密后的文本
*/
public static String encryptByPrivateKey(String privateKeyString, String text) throws Exception
{
PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, privateKey);
byte[] result = cipher.doFinal(text.getBytes());
return Base64.encodeBase64String(result);
}
/**
* 私钥解密
*
* @param privateKeyString 私钥
* @param text 待解密的文本
* @return 解密后的文本
*/
public static String decryptByPrivateKey(String privateKeyString, String text) throws Exception
{
PKCS8EncodedKeySpec pkcs8EncodedKeySpec5 = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec5);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, privateKey);
byte[] result = cipher.doFinal(Base64.decodeBase64(text));
return new String(result);
}
/**
* 公钥加密
*
* @param publicKeyString 公钥
* @param text 待加密的文本
* @return 加密后的文本
*/
public static String encryptByPublicKey(String publicKeyString, String text) throws Exception
{
X509EncodedKeySpec x509EncodedKeySpec2 = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec2);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
byte[] result = cipher.doFinal(text.getBytes());
return Base64.encodeBase64String(result);
}
/**
* 构建RSA密钥对
*
* @return 生成后的公私钥信息
*/
public static RsaKeyPair generateKeyPair() throws NoSuchAlgorithmException
{
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(1024);
KeyPair keyPair = keyPairGenerator.generateKeyPair();
RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate();
String publicKeyString = Base64.encodeBase64String(rsaPublicKey.getEncoded());
String privateKeyString = Base64.encodeBase64String(rsaPrivateKey.getEncoded());
return new RsaKeyPair(publicKeyString, privateKeyString);
}
/**
* RSA密钥对对象
*/
public static class RsaKeyPair
{
private final String publicKey;
private final String privateKey;
public RsaKeyPair(String publicKey, String privateKey)
{
this.publicKey = publicKey;
this.privateKey = privateKey;
}
public String getPublicKey()
{
return publicKey;
}
public String getPrivateKey()
{
return privateKey;
}
}
}