|
|
@@ -967,10 +967,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
|
|
|
|
|
|
|
|
|
private void pushTaskAndDun(Integer id,TOrderNew o) {
|
|
|
- List<TChangeTaskOut> listct=tChangeTaskMapper.selectByCid(id,3);
|
|
|
- HashMap<Integer, Integer> map=changeAddOrderTask(listct,null);
|
|
|
- List<TChangeTaskOut> listct2=tChangeTaskMapper.selectByCid(id,2);
|
|
|
- changeAddOrderTask(listct2,map);
|
|
|
+ pushChangeAddOrderTask(id);
|
|
|
+
|
|
|
//处理主项目显示派单年份
|
|
|
List<TChangeDunOut> listcd=tChangeDunMapper.selectByCid(id);
|
|
|
for (TChangeDunOut cd : listcd) {
|
|
|
@@ -1005,6 +1003,17 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 通过变更id来处理变更,先将父级新增、再新增子集。为了获取到订单项目的父子级关系
|
|
|
+ * @param id
|
|
|
+ */
|
|
|
+ private void pushChangeAddOrderTask(Integer id) {
|
|
|
+ List<TChangeTaskOut> listct=tChangeTaskMapper.selectByCid(id,3);
|
|
|
+ HashMap<Integer, Integer> map=changeAddOrderTask(listct,null);
|
|
|
+ List<TChangeTaskOut> listct2=tChangeTaskMapper.selectByCid(id,2);
|
|
|
+ changeAddOrderTask(listct2,map);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
*
|
|
|
* @param listct 变更数据
|
|
|
* @param input 新增数据Id
|
|
|
@@ -1039,6 +1048,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
|
|
|
if (tid==null)tid=tChangeTaskMapper.selectByPrimaryKey(cd.getChangeSplitSuper()).getTid();
|
|
|
ot.setSplitSuper(tid);
|
|
|
}
|
|
|
+ ot.setSplitId(pushSplitId(ot.getSplitSuper()));
|
|
|
+ ot.setCommodityPrice(new BigDecimal(0));
|
|
|
}
|
|
|
if (cd.getDeclarationBatch()!=null)ot.setDeclarationBatch(cd.getDeclarationBatch());
|
|
|
if (cd.getPatentType()!=null)ot.setPatentType(cd.getPatentType());
|
|
|
@@ -1066,6 +1077,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
|
|
|
ot.setId(cd.getTid());
|
|
|
ot.setCommodityPrice(cd.getCommodityPrice());
|
|
|
ot.setCommodityQuantity(cd.getCommodityQuantity());
|
|
|
+ if (ot.getSplitSuper()!=null)ot.setSplitId(pushSplitId(ot.getSplitSuper()));
|
|
|
if (cd.getDeclarationBatch()!=null)ot.setDeclarationBatch(cd.getDeclarationBatch());
|
|
|
if (cd.getPatentType()!=null)ot.setPatentType(cd.getPatentType());
|
|
|
tOrderTaskMapper.updateByPrimaryKeySelective(ot);
|
|
|
@@ -1078,11 +1090,17 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
|
|
|
}else if(cd.getType()==3) {
|
|
|
tOrderTaskMapper.deleteByPrimaryKey(cd.getTid());
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ private Integer pushSplitId(Integer splitSuper) {
|
|
|
+ //计算出拆分编号
|
|
|
+ Integer i = tOrderTaskMapper.getSplitCount(splitSuper);
|
|
|
+ i++;
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+
|
|
|
private void updateTaskMid(Integer id, String lastYear, BigDecimal lastYearCapital, BigDecimal lastYearIncome) {
|
|
|
TTaskMid tTaskMid = new TTaskMid();
|
|
|
tTaskMid.setTid(id);
|
|
|
@@ -1490,6 +1508,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
|
|
|
}
|
|
|
tChangeTask.setType(1);
|
|
|
tChangeTask.setCommodityQuantity(1);
|
|
|
+ tChangeTask.setCommodityPrice(new BigDecimal(0));
|
|
|
tChangeTask.setTaskComment(taskComment);
|
|
|
tChangeTask.setServiceYear(serviceYear);
|
|
|
tChangeTaskMapper.insertSelective(tChangeTask);
|