Compare commits

...

5 Commits

Author SHA1 Message Date
liang.chao 5490fd2e8f 成套抱杆机具验收 2024-04-23 17:36:00 +08:00
liang.chao 74d7fc2e87 Merge remote-tracking branch 'origin/dev-cq-bug' into dev-cq-bug 2024-04-23 16:16:41 +08:00
liang.chao 182442491a Merge remote-tracking branch 'origin/dev-cq-bug' into dev-cq-bug 2024-04-23 14:54:40 +08:00
liang.chao af4498afd0 Merge remote-tracking branch 'origin/dev-cq-bug' into dev-cq-bug 2024-04-23 14:37:18 +08:00
liang.chao 05d4e08f4a tomcat版本替换 2024-04-23 13:13:48 +08:00
6 changed files with 25 additions and 1 deletions

View File

@ -205,7 +205,7 @@
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.81</version>
<version>9.0.86</version>
<scope>compile</scope>
<exclusions>
<exclusion>

View File

@ -12,4 +12,5 @@ public class MachinePart {
private String unitName;
private String typeName;
private Integer partNum;
private Integer typeId;
}

View File

@ -7,6 +7,7 @@ import com.bonus.sgzb.base.api.domain.MaMachineLabel;
import com.bonus.sgzb.base.api.domain.MaType;
import com.bonus.sgzb.material.domain.InputApplyDetails;
import com.bonus.sgzb.material.domain.MaInputRecord;
import com.bonus.sgzb.material.domain.MachinePart;
import com.bonus.sgzb.material.domain.PurchaseMacodeInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -277,4 +278,6 @@ public interface PurchaseMacodeInfoMapper {
* @return
*/
int selectPurchaseCheckDetailsStatus(Long taskId);
int updateMaTypeNum(MachinePart wholeSetDetail);
}

View File

@ -13,6 +13,7 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.security.utils.SecurityUtils;
import com.bonus.sgzb.material.domain.*;
import com.bonus.sgzb.material.mapper.*;
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
import com.bonus.sgzb.material.service.IPurchaseMacodeInfoService;
import com.bonus.sgzb.common.core.utils.DateUtils;
import com.bonus.sgzb.material.vo.EquipmentNumberVO;
@ -39,6 +40,9 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
@Resource
private TaskMapper taskMapper;
@Autowired
private IPurchaseCheckInfoService purchaseCheckInfoService;
@Resource
private BmQrcodeInfoMapper qrcodeInfoMapper;
@ -298,6 +302,17 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
.add(maType.getNum() == null ? new BigDecimal(0) : maType.getNum()));
purchaseMacodeInfoMapper.updateTypeByTypeId(maType);
//判断是否是成套机具是的话配件库存也要增加
if ("2".equals(maType.getManageType())){
PurchaseCheckInfo purchaseCheckInfo = new PurchaseCheckInfo();
purchaseCheckInfo.setPurchaseNum(maInputRecord.getInputNum().toString());
purchaseCheckInfo.setTypeId(maInputRecord.getTypeId());
List<MachinePart> wholeSetDetails = purchaseCheckInfoService.getWholeSetDetails(purchaseCheckInfo);
for (MachinePart wholeSetDetail : wholeSetDetails) {
purchaseMacodeInfoMapper.updateMaTypeNum(wholeSetDetail);
}
}
BigDecimal inputNum = checkDetailsMapper.selectInputNumByTypeId(taskId, typeId);
PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails();
purchaseCheckDetails.setTaskId(taskId);

View File

@ -312,6 +312,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getWholeSetDetails" resultType="com.bonus.sgzb.material.domain.MachinePart">
SELECT
mt2.type_name AS typeModelName,
mt2.type_id as typeId,
mt3.type_name AS typeName,
aa.part_num * #{purchaseNum} AS partNum,
mt2.unit_name as unitName

View File

@ -534,4 +534,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and type_id = #{typeId}
and ma_code = #{maCode}
</update>
<update id="updateMaTypeNum">
UPDATE ma_type
SET num = ifnull( num, 0 ) + #{partNum} WHERE type_id = #{typeId}
</update>
</mapper>