单据校验相关修改

master
anthonywj 2 years ago
parent d3dc0e9556
commit b13e59285f

@ -180,11 +180,14 @@ public class IoOrderDetailBizEntity {
private String filePath;
@TableField(exist = false)
private boolean checkSuccess;
@TableField(exist = false)
private int scanCount;
@TableField(exist = false)
private String errMsg;
}

@ -188,4 +188,8 @@ public class IoOrderDetailCodeEntity {
@TableField(exist = false)
private int orderCount;
@TableField(exist = false)
private String errMsg;
}

@ -45,8 +45,6 @@ public class IoCheckInoutService {
@Resource
IoOrderDetailResultService orderDetailResultService;
@Resource
InvPreinOrderService invPreinOrderService;
@Resource
InvPreinDetailService invPreinDetailService;
@Resource
IoGenInvService genInvService;
@ -304,6 +302,7 @@ public class IoCheckInoutService {
String errMsg = "";
//正向校验
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
String msg = "";
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
if (!bizEntity.isCheckSuccess() && !codeEntity.isCheckSuccess() && checkId(bizEntity, codeEntity) == null
&& checkBatchNo(bizEntity, codeEntity) == null
@ -315,15 +314,23 @@ public class IoCheckInoutService {
bizEntity.setCheckSuccess(true);
bizEntity.setScanCount(codeEntity.getReCount());
codeEntity.setCheckSuccess(true);
} else {
bizEntity.setScanCount(codeEntity.getReCount());
bizEntity.setCheckSuccess(false);
msg = "数量不匹配";
}
break;
}
}
if (StrUtil.isEmpty(msg) && !bizEntity.isCheckSuccess()) {
msg = "三期不匹配";
}
bizEntity.setErrMsg(msg);
}
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
if (!bizEntity.isCheckSuccess()) {
errMsg = errMsg + bizEntity.getCoName() + ";";
errMsg = errMsg + bizEntity.getCoName() + bizEntity.getErrMsg() + ";";
}
}
@ -399,28 +406,36 @@ public class IoCheckInoutService {
bizEntity.setCheckSuccess(false);
}
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
String msg = "";
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
if (!bizEntity.isCheckSuccess() && !codeEntity.isCheckSuccess() && checkId(bizEntity, codeEntity) == null
&& checkBatchNo(bizEntity, codeEntity) == null
&& checkProductDate(bizEntity, codeEntity) == null
&& checkExpireDate(bizEntity, codeEntity) == null
) {
if (checkCount(bizEntity, codeEntity) == null) {
bizEntity.setCheckSuccess(true);
codeEntity.setCheckSuccess(true);
bizEntity.setScanCount(codeEntity.getReCount());
} else {
msg = "数量不匹配";
bizEntity.setScanCount(codeEntity.getReCount());
bizEntity.setCheckSuccess(false);
}
break;
}
}
if (StrUtil.isEmpty(msg) && !bizEntity.isCheckSuccess()) {
msg = "三期不匹配";
}
bizEntity.setErrMsg(msg);
}
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
if (!bizEntity.isCheckSuccess()) {
errMsg = errMsg + bizEntity.getCoName() + ";";
errMsg = errMsg + bizEntity.getCoName() + bizEntity.getErrMsg() + ";";
}
}
return errMsg;
@ -532,17 +547,21 @@ public class IoCheckInoutService {
}
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
String msg = "";
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
if (!bizEntity.isCheckSuccess() && !codeEntity.isCheckSuccess()
&& checkId(bizEntity, codeEntity) == null
&& checkBatchNo(bizEntity, codeEntity) == null
&& checkProductDate(bizEntity, codeEntity) == null
&& checkExpireDate(bizEntity, codeEntity) == null
) {
if (checkCount(bizEntity, codeEntity) == null) {
bizEntity.setCheckSuccess(true);
codeEntity.setCheckSuccess(true);
codeEntity.setOrderCount(bizEntity.getCount());
} else {
msg = "数量不匹配";
codeEntity.setCheckSuccess(false);
codeEntity.setOrderCount(bizEntity.getCount());
}
@ -551,12 +570,16 @@ public class IoCheckInoutService {
codeEntity.setCheckSuccess(false);
}
}
if (StrUtil.isEmpty(msg) && !codeEntity.isCheckSuccess()) {
msg = "三期不匹配";
}
codeEntity.setErrMsg(msg);
}
String errMsg = "";
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
if (!codeEntity.isCheckSuccess()) {
errMsg = errMsg + codeEntity.getCoName() + ";";
errMsg = errMsg + codeEntity.getCoName() + codeEntity.getErrMsg() + ";";
}
}
return errMsg;

@ -2,8 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.system.SyncDataBustypeDao">
<select id="findAll"
resultType="com.glxp.api.entity.sync.SyncDataBustypeEntity">
SELECT *
@ -18,16 +16,13 @@
<insert id="inserts" parameterType="com.glxp.api.entity.sync.SyncDataBustypeEntity">
insert INTO sync_data_bustypes
( `action`, `name`, outChange)
values
(`action`, `name`, outChange, orderStatus)
values
<foreach collection="syncDataBustypeEntities" item="item" index="index"
separator=",">
(
#{item.action}, #{item.name},
#{item.outChange})
(#{item.action}, #{item.name},
#{item.outChange},#{item.orderStatus})
</foreach>
</insert>
</mapper>

@ -8,6 +8,8 @@ CALL Pro_Temp_ColumnWork('io_order', 'inCodeStatus', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'processStatus', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'suppleCount', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'relKey', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255) ', 1);

Loading…
Cancel
Save