业务流转设置了‘产品申购’自动生成‘采购计划’,无这个问题

申购单据审核提示‘系统繁忙’,可能是数据库多加了几条一样的数据
pro
1178634255 2 years ago
parent f9080d08b8
commit f5e1e8ff09

@ -120,12 +120,16 @@ public class IoPurChangeService {
BasicBusTypeChangeEntity basicBusTypeChangeEntity = new BasicBusTypeChangeEntity();
//查询申购详情
List<PurApplyDetailEntity> purApplyDetailEntityList = purApplyDetailService.findByOrderId(purApplyEntity.getId() + "");
System.out.println("//---------------------------------判断申购为已审核就生成计划单-------------------------------------------//");
//---------------------------------判断申购为已审核就生成计划单-------------------------------------------//
PurPlanEntity purPlanEntity = new PurPlanEntity();
List<PurPlanDetailEntity> purPlanDetailEntityList = new ArrayList<>();
if (purApplyEntity.getStatus() == 3) {
basicBusTypeChangeEntity = basicBusTypeChangeService.selectByOriginAction("CPSG");
if (basicBusTypeChangeEntity != null && StrUtil.isNotEmpty(basicBusTypeChangeEntity.getTargetBusAction()) && basicBusTypeChangeEntity.isEnable() == true) {
purPlanEntity.setBillNo(gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.JH_ORDER, "yyyyMMdd")));
purPlanEntity.setBillDate(purApplyEntity.getBillDate());
purPlanEntity.setStatus(basicBusTypeChangeEntity.getBusAuditStatus());
@ -145,6 +149,7 @@ public class IoPurChangeService {
//插入计划主表
purPlanService.insert(purPlanEntity);
//用stream流复制list
System.out.println("111111111111111111111111111我要进来咯666666666666666++++++++++++++++");
purPlanDetailEntityList = purApplyDetailEntityList.stream().map(e -> {
PurPlanDetailEntity d = new PurPlanDetailEntity();
d.setOrderIdFk(purPlanEntity.getId() + "");
@ -153,6 +158,7 @@ public class IoPurChangeService {
d.setCount(e.getCount());
d.setSupId(e.getSupId());
d.setZczbhhzbapzbh(e.getZczbhhzbapzbh());
System.out.println("ddddddddddddddddddddddddddddddd"+d);
return d;
}).collect(Collectors.toList());
purPlanDetailService.insertPurPlanDetailEntity(purPlanDetailEntityList);

@ -164,6 +164,7 @@ public class PurApplyController {
purApplyService.update(purApplyEntity);
if (purApplyRequest.getStatus() == 3) {
// generateDocument(purApplyEntity);
purChangeService.purApplyChange(purApplyEntity);
}

@ -4,9 +4,9 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_0510?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
password: root
hikari:
connection-timeout: 60000
maximum-pool-size: 20

Loading…
Cancel
Save