Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2b46a06bfd
|
|
@ -223,7 +223,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
if (CollectionUtil.isNotEmpty(leaseApplyRequestVo.getLeaseApplyDetailsList())) {
|
if (CollectionUtil.isNotEmpty(leaseApplyRequestVo.getLeaseApplyDetailsList())) {
|
||||||
// 业务逻辑代码
|
// 业务逻辑代码
|
||||||
leaseApplyDetailsMapper.deleteLeaseApplyDetailsByParentIds(ids);
|
leaseApplyDetailsMapper.deleteLeaseApplyDetailsByParentIds(ids);
|
||||||
insertPurchaseCheckDetails(leaseApplyRequestVo.getLeaseApplyDetailsList(), leaseApplyInfo.getTaskId());
|
insertPurchaseCheckDetails(leaseApplyRequestVo.getLeaseApplyDetailsList(), leaseApplyInfo.getId());
|
||||||
}
|
}
|
||||||
// 修改外层info
|
// 修改外层info
|
||||||
leaseApplyInfoMapper.updateLeaseApplyInfo(leaseApplyInfo);
|
leaseApplyInfoMapper.updateLeaseApplyInfo(leaseApplyInfo);
|
||||||
|
|
|
||||||
|
|
@ -88,4 +88,11 @@ public interface PurchaseBindMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateNum(@Param("dto") PurchaseDto dto, @Param("num") int num);
|
int updateNum(@Param("dto") PurchaseDto dto, @Param("num") int num);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询详情
|
||||||
|
* @param purchaseDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PurchaseVo> getDetailById(PurchaseDto purchaseDto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,8 +196,9 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
try {
|
try {
|
||||||
List<PurchaseVo> details = purchaseBindMapper.getDetails(purchaseDto);
|
List<PurchaseVo> details = purchaseBindMapper.getDetails(purchaseDto);
|
||||||
|
List<PurchaseVo> purchaseVoList = purchaseBindMapper.getDetailById(purchaseDto);
|
||||||
if (CollectionUtils.isNotEmpty(details)) {
|
if (CollectionUtils.isNotEmpty(details)) {
|
||||||
result += updatePurchaseInfoAndDetails(details, details.get(0), Integer.parseInt(purchaseDto.getPurchaseId()));
|
result += updatePurchaseInfoAndDetails(purchaseVoList, details.get(0), Integer.parseInt(purchaseDto.getPurchaseId()));
|
||||||
List<PurchaseVo> statusList = purchaseStorageMapper.select(details.get(0).getTaskId().toString());
|
List<PurchaseVo> statusList = purchaseStorageMapper.select(details.get(0).getTaskId().toString());
|
||||||
result += updateTaskStatus(statusList);
|
result += updateTaskStatus(statusList);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,15 +140,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteLeaseApplyDetailsByParentIds" parameterType="Long">
|
<delete id="deleteLeaseApplyDetailsByParentIds" parameterType="Long">
|
||||||
delete from lease_apply_details where parent_id in (
|
delete from lease_apply_details where parent_id in
|
||||||
select task_id
|
|
||||||
from lease_apply_info
|
|
||||||
where
|
|
||||||
id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="getByParentId" resultType="com.bonus.material.lease.domain.LeaseApplyDetails">
|
<select id="getByParentId" resultType="com.bonus.material.lease.domain.LeaseApplyDetails">
|
||||||
|
|
|
||||||
|
|
@ -281,4 +281,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getDetailById" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||||
|
SELECT
|
||||||
|
pcd.task_id AS taskId,
|
||||||
|
pcd.id AS purchaseId,
|
||||||
|
mt1.type_name AS materialName,
|
||||||
|
mt.type_name AS materialModel,
|
||||||
|
pcd.check_num AS purchaseNum,
|
||||||
|
pcd.check_num AS checkNum,
|
||||||
|
pcd.bind_num AS bindNum,
|
||||||
|
pcd.type_id as typeId,
|
||||||
|
mt.unit_name AS unitName,
|
||||||
|
ms.supplier AS supplierName,
|
||||||
|
pcd.production_time AS productDate,
|
||||||
|
mt.manage_type AS manageType,
|
||||||
|
pcd.`status` AS STATUS,
|
||||||
|
pm.ma_code AS maCode,
|
||||||
|
pm.out_fac_code AS outFacCode,
|
||||||
|
pm.qr_code AS qrCode
|
||||||
|
FROM
|
||||||
|
purchase_check_details pcd
|
||||||
|
LEFT JOIN tm_task tt ON pcd.task_id = tt.task_id
|
||||||
|
LEFT JOIN purchase_check_info pci ON pci.task_id = pcd.task_id
|
||||||
|
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
|
LEFT JOIN ma_supplier_info ms ON pcd.supplier_id = ms.supplier_id
|
||||||
|
LEFT JOIN purchase_macode_info pm on pcd.task_id = pm.task_id and pm.type_id = pcd.type_id
|
||||||
|
where 1 = 1
|
||||||
|
<if test="typeId != null and typeId != ''">
|
||||||
|
AND mt.id = #{typeId}
|
||||||
|
</if>
|
||||||
|
<if test="taskId != null">
|
||||||
|
AND pcd.task_id = #{taskId}
|
||||||
|
</if>
|
||||||
|
<if test="purchaseId != null">
|
||||||
|
AND pcd.id = #{purchaseId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue