1.临时码表添加实际数量字段

fengcang
x_z 3 years ago
parent 71d1cf46d7
commit eaa7229cc5

@ -798,6 +798,19 @@ public class WareHouseController {
} else if (udiRelevanceResponse.getIsUseDy() == 0 && udiRelevanceResponse.getDiType() == ConstantStatus.DITYPE_SYDY) { } else if (udiRelevanceResponse.getIsUseDy() == 0 && udiRelevanceResponse.getDiType() == ConstantStatus.DITYPE_SYDY) {
return ResultVOUtils.error(500, "该产品不允许以使用单元入库!"); return ResultVOUtils.error(500, "该产品不允许以使用单元入库!");
} }
//计算实际数量
int actCount = 0;
if (udiRelevanceResponse.getIsUseDy() == 1 && udiRelevanceResponse.getDiType() != 2) {
if (udiRelevanceResponse.getBhzxxsbzsl() == 0) {
actCount = udiRelevanceResponse.getZxxsbzbhsydysl();
} else {
actCount = udiRelevanceResponse.getBhzxxsbzsl() * udiRelevanceResponse.getBhzxxsbzsl();
}
} else {
actCount = udiRelevanceResponse.getBhzxxsbzsl();
}
warehouseEntity.setReCount(warehouseEntity.getCount() * actCount);
} else if (udiRelevanceResponses.size() == 0) { } else if (udiRelevanceResponses.size() == 0) {
if (unitFk == null) if (unitFk == null)
return ResultVOUtils.error(500, "耗材字典不存在此产品!"); return ResultVOUtils.error(500, "耗材字典不存在此产品!");

@ -18,7 +18,8 @@ public class WarehouseEntity {
private String produceDate; private String produceDate;
private String expireDate; private String expireDate;
private String serialNo; private String serialNo;
private Integer count; private Integer count; //扫码数量
private Integer reCount; //实际数量
private String packageLevel; private String packageLevel;
private String warehouseCode; private String warehouseCode;

@ -15,7 +15,7 @@
(`action`, mainAction,code, corpOrderId, actor,actDate, (`action`, mainAction,code, corpOrderId, actor,actDate,
fromCorpId, fromCorp, fromCorpId, fromCorp,
orderId,batchNo,produceDate,expireDate,serialNo, orderId,batchNo,produceDate,expireDate,serialNo,
`count`,nameCode,supId,invStorageCode,invWarehouseCode,locStorageCode,relId) `count`, reCount, nameCode,supId,invStorageCode,invWarehouseCode,locStorageCode,relId)
VALUES VALUES
<foreach collection="codes" item="item" index="index" <foreach collection="codes" item="item" index="index"
separator=","> separator=",">
@ -33,7 +33,9 @@
,#{item.produceDate} ,#{item.produceDate}
,#{item.expireDate} ,#{item.expireDate}
,#{item.serialNo} ,#{item.serialNo}
,#{item.count},#{item.nameCode},#{item.supId}, ,#{item.count}
,#{item.reCount}
,#{item.nameCode},#{item.supId},
#{item.invStorageCode},#{item.invWarehouseCode},#{item.locStorageCode},#{item.relId} #{item.invStorageCode},#{item.invWarehouseCode},#{item.locStorageCode},#{item.relId}
) )
</foreach> </foreach>
@ -43,7 +45,7 @@
<insert id="insertCodesTempSingle" keyProperty="id" parameterType="com.glxp.api.admin.entity.inout.WarehouseEntity"> <insert id="insertCodesTempSingle" keyProperty="id" parameterType="com.glxp.api.admin.entity.inout.WarehouseEntity">
INSERT INTO io_codes_temp(`action`, mainAction, code, corpOrderId, actor, actDate, INSERT INTO io_codes_temp(`action`, mainAction, code, corpOrderId, actor, actDate,
fromCorpId, fromCorp, orderId, batchNo, produceDate, expireDate, serialNo, fromCorpId, fromCorp, orderId, batchNo, produceDate, expireDate, serialNo,
`count`, nameCode, supId, invStorageCode, invWarehouseCode, locStorageCode, relId) `count`, reCount, nameCode, supId, invStorageCode, invWarehouseCode, locStorageCode, relId)
values (#{action}, values (#{action},
#{mainAction}, #{mainAction},
#{code}, #{code},
@ -57,7 +59,9 @@
#{produceDate}, #{produceDate},
#{expireDate}, #{expireDate},
#{serialNo}, #{serialNo},
#{count}, #{nameCode}, #{supId}, #{invStorageCode}, #{invWarehouseCode}, #{locStorageCode}, #{relId}) #{count},
#{reCount},
#{nameCode}, #{supId}, #{invStorageCode}, #{invWarehouseCode}, #{locStorageCode}, #{relId})
</insert> </insert>
@ -67,7 +71,7 @@
ignore ignore
INTO io_codes_temp(`action`, mainAction, code, corpOrderId, actor, actDate, INTO io_codes_temp(`action`, mainAction, code, corpOrderId, actor, actDate,
fromCorpId, fromCorp, orderId, batchNo, produceDate, expireDate, serialNo, fromCorpId, fromCorp, orderId, batchNo, produceDate, expireDate, serialNo,
`count`, nameCode, supId, invStorageCode, invWarehouseCode, locStorageCode, relId) `count`, reCount, nameCode, supId, invStorageCode, invWarehouseCode, locStorageCode, relId)
values ( values (
#{action}, #{action},
#{mainAction}, #{mainAction},
@ -83,6 +87,7 @@
#{expireDate}, #{expireDate},
#{serialNo}, #{serialNo},
#{count}, #{count},
#{reCount},
#{nameCode}, #{nameCode},
#{supId}, #{supId},
#{invStorageCode}, #{invStorageCode},
@ -131,6 +136,7 @@
UPDATE io_codes_temp UPDATE io_codes_temp
<set> <set>
<if test="count != null">`count`=#{count},</if> <if test="count != null">`count`=#{count},</if>
<if test="reCount != null">`reCount`=#{reCount},</if>
<if test="action != null">`action`=#{action},</if> <if test="action != null">`action`=#{action},</if>
<if test="mainAction != null">`mainAction`=#{mainAction},</if> <if test="mainAction != null">`mainAction`=#{mainAction},</if>
<if test="fromCorpId != null">`fromCorpId`=#{fromCorpId},</if> <if test="fromCorpId != null">`fromCorpId`=#{fromCorpId},</if>
@ -162,6 +168,7 @@
<if test="serialNo != null">`serialNo`=#{serialNo},</if> <if test="serialNo != null">`serialNo`=#{serialNo},</if>
<if test="relId != null">`relId`=#{relId},</if> <if test="relId != null">`relId`=#{relId},</if>
<if test="count != null">`count`=#{count},</if> <if test="count != null">`count`=#{count},</if>
<if test="reCount != null">`reCount`=#{reCount},</if>
</set> </set>
WHERE id=#{id} WHERE id=#{id}
</update> </update>

Loading…
Cancel
Save