|
|
|
@ -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);
|
|
|
|
|