Compare commits

...

2 Commits

Author SHA1 Message Date
dingjie d3f7052535 Merge remote-tracking branch 'origin/dev' into dev 2023-12-23 11:45:53 +08:00
dingjie 52a96de545 新购入库模块代码修改 2023-12-23 11:45:38 +08:00
5 changed files with 8 additions and 6 deletions

View File

@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND type_id = #{typeId} AND type_id = #{typeId}
</if> </if>
</where> </where>
order by m.id desc order by m.ma_id desc
</select> </select>

View File

@ -304,14 +304,15 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
// 修改编码管理的入库状态 // 修改编码管理的入库状态
MaType maType = purchaseMacodeInfoMapper.selectTypeByTypeId(typeId); MaType maType = purchaseMacodeInfoMapper.selectTypeByTypeId(typeId);
// 库存添加 // 库存添加
maType.setNum(maInputRecord.getInputNum().add(maType.getNum() == null ? new BigDecimal(0):maType.getNum())); maType.setNum((maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum())
.add(maType.getNum() == null ? new BigDecimal(0):maType.getNum()));
purchaseMacodeInfoMapper.updateTypeByTypeId(maType); purchaseMacodeInfoMapper.updateTypeByTypeId(maType);
BigDecimal inputNum = checkDetailsMapper.selectInputNUmByTypeId(taskId, typeId); BigDecimal inputNum = checkDetailsMapper.selectInputNUmByTypeId(taskId, typeId);
PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails(); PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails();
purchaseCheckDetails.setTaskId(taskId); purchaseCheckDetails.setTaskId(taskId);
purchaseCheckDetails.setTypeId(typeId); purchaseCheckDetails.setTypeId(typeId);
purchaseCheckDetails.setInputNum(inputNum.add(maInputRecord.getInputNum())); purchaseCheckDetails.setInputNum(inputNum.add(maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum()));
purchaseCheckDetails.setStatus(4); purchaseCheckDetails.setStatus(4);
checkDetailsMapper.updateByTaskIdTypeId(purchaseCheckDetails); checkDetailsMapper.updateByTaskIdTypeId(purchaseCheckDetails);
} }

View File

@ -209,7 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<update id="updateByTaskIdTypeId"> <update id="updateByTaskIdTypeId">
update purchase_check_details set check_num = #{checkNum} where task_id = #{taskId} and type_id = #{typeId} update purchase_check_details set check_num = #{checkNum},status = #{status} where task_id = #{taskId} and type_id = #{typeId}
</update> </update>
<update id="updateCheckDetails"> <update id="updateCheckDetails">
update purchase_check_details set status = '0' where task_id = #{taskId} update purchase_check_details set status = '0' where task_id = #{taskId}

View File

@ -144,10 +144,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectPutInListList" resultMap="PurchaseCheckInfoResult"> <select id="selectPutInListList" resultMap="PurchaseCheckInfoResult">
select pci.id,pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by, pci.create_time, pci.update_by, select pci.id,pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by, pci.create_time, pci.update_by,
pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,tk.task_status taskStatus pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,tk.task_status taskStatus,su.user_name purchaserName
from purchase_check_info pci from purchase_check_info pci
left join tm_task tk on pci.task_id = tk.task_id left join tm_task tk on pci.task_id = tk.task_id
left join (select id,name from sys_dic where p_id = 50) dict on tk.task_status = dict.id left join (select id,name from sys_dic where p_id = 50) dict on tk.task_status = dict.id
left join sys_user su on pci.purchaser = su.user_id
where task_type = 23 and tk.task_status in (26,28) where task_type = 23 and tk.task_status in (26,28)
<if test="purchaseTime != null and purchaseTime != ''"> and tk.code = #{code}</if> <if test="purchaseTime != null and purchaseTime != ''"> and tk.code = #{code}</if>
<if test="purchaseTime != null and purchaseTime != ''"> and pci.purchase_time = #{purchaseTime}</if> <if test="purchaseTime != null and purchaseTime != ''"> and pci.purchase_time = #{purchaseTime}</if>

View File

@ -260,7 +260,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectPutinDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo"> <select id="selectPutinDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
select pcd.production_time productionTime,mt.type_name specificationType, mt1.type_name typeName, pmi.ma_code maCode, select pcd.production_time productionTime,mt.type_name specificationType, mt1.type_name typeName, pmi.ma_code maCode,
mm.assets_code assetsCode ,pmi.fix_code fixCode,pcd.type_id typeId,pcd.task_id taskId, mt.code specsCode,mt1.code typeCode, mm.assets_code assetsCode ,pmi.fix_code fixCode,pcd.type_id typeId,pcd.task_id taskId, mt.code specsCode,mt1.code typeCode,
if(pmi.ma_code is null, if(pcd.status != 4, 0 , pcd.status), pmi.status) status, if(pmi.ma_code is null, if(pcd.status != 4, 0 , 1), pmi.status) status,
if(pmi.ma_code is not null,1,pcd.check_num) checkNum if(pmi.ma_code is not null,1,pcd.check_num) checkNum
from purchase_check_details pcd from purchase_check_details pcd
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id