Compare commits

..

No commits in common. "d3f70525354f0bd6585c809819079780a8b4258d" and "2265d0cebca47a5a77611c07a19a1e33895943cc" have entirely different histories.

5 changed files with 6 additions and 8 deletions

View File

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

View File

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

View File

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

View File

@ -144,11 +144,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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,
pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,tk.task_status taskStatus,su.user_name purchaserName
pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,tk.task_status taskStatus
from purchase_check_info pci
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 sys_user su on pci.purchaser = su.user_id
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 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 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,
if(pmi.ma_code is null, if(pcd.status != 4, 0 , 1), pmi.status) status,
if(pmi.ma_code is null, if(pcd.status != 4, 0 , pcd.status), pmi.status) status,
if(pmi.ma_code is not null,1,pcd.check_num) checkNum
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