|
@@ -1700,9 +1700,9 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public void saveEditSubInfoData(EditSubInfoDataVO vo, LoginUserVO userVO) {
|
|
|
+ public void saveEditSubInfoData(EditSubInfoGxjDataVO vo, LoginUserVO userVO) {
|
|
|
if (vo.getSubInfo() != null) {
|
|
|
- SubInfoVO subInfo = vo.getSubInfo();
|
|
|
+ SubInfoGxj subInfo = vo.getSubInfo();
|
|
|
if (subNameExits(subInfo.getSubName(), subInfo.getId())) {
|
|
|
throw new RuntimeException("项目名称已存在");
|
|
|
}
|
|
@@ -1734,29 +1734,29 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
}
|
|
|
|
|
|
//项目类型
|
|
|
- if (!Objects.equals(old.getKind(), subInfo.getKind())) {
|
|
|
-
|
|
|
- String[] kind = Optional.ofNullable(old.getKind()).orElse("").split(",");
|
|
|
- String kindName = "";
|
|
|
- for (String item : kind) {
|
|
|
- String oneKineName = tSysTableService.getTitleByKindAndCode(SysTableKind.XMLX, item);
|
|
|
- if (StringUtil.isNotEmpty(oneKineName)) {
|
|
|
- kindName += oneKineName + " ";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- String[] kind2 = subInfo.getKind().toString().split(",");
|
|
|
- String kindName2 = "";
|
|
|
- for (String item : kind2) {
|
|
|
- String oneKineName = tSysTableService.getTitleByKindAndCode(SysTableKind.XMLX, item);
|
|
|
- if (StringUtil.isNotEmpty(oneKineName)) {
|
|
|
- kindName2 += oneKineName + " ";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "kind", "项目类型", "", kindName, kindName2, null, userVO.getLoginName(), new Date(), "修改");
|
|
|
- }
|
|
|
+ // if (!Objects.equals(old.getKind(), subInfo.getKind())) {
|
|
|
+ //
|
|
|
+ // String[] kind = Optional.ofNullable(old.getKind()).orElse("").split(",");
|
|
|
+ // String kindName = "";
|
|
|
+ // for (String item : kind) {
|
|
|
+ // String oneKineName = tSysTableService.getTitleByKindAndCode(SysTableKind.XMLX, item);
|
|
|
+ // if (StringUtil.isNotEmpty(oneKineName)) {
|
|
|
+ // kindName += oneKineName + " ";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // String[] kind2 = subInfo.getKind().toString().split(",");
|
|
|
+ // String kindName2 = "";
|
|
|
+ // for (String item : kind2) {
|
|
|
+ // String oneKineName = tSysTableService.getTitleByKindAndCode(SysTableKind.XMLX, item);
|
|
|
+ // if (StringUtil.isNotEmpty(oneKineName)) {
|
|
|
+ // kindName2 += oneKineName + " ";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ //
|
|
|
+ // subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "kind", "项目类型", "", kindName, kindName2, null, userVO.getLoginName(), new Date(), "修改");
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
//投资类型
|
|
@@ -1769,13 +1769,13 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "amt_total", "总投资金额(万元)", "", old.getAmtTotal() + "", subInfo.getAmtTotal() + "", subInfo.getAmtTotal().subtract(old.getAmtTotal()), userVO.getLoginName(), new Date(), "修改");
|
|
|
}
|
|
|
|
|
|
- //项目资金来源(万元):
|
|
|
-
|
|
|
- if ((old.getAmtComptotal() == null ? BigDecimal.ZERO : old.getAmtComptotal()).compareTo(subInfo.getAmtComptotal() == null ? BigDecimal.ZERO : subInfo.getAmtComptotal()) != 0) {
|
|
|
- //到位资金
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "amt_comptotal", "到位资金(万元)", "", old.getAmtComptotal() == null ? "" : old.getAmtComptotal() + "", subInfo.getAmtComptotal() == null ? "" : subInfo.getAmtComptotal() + "", (subInfo.getAmtComptotal() == null ? new BigDecimal(0) : subInfo.getAmtComptotal()).subtract((old.getAmtComptotal() == null ? new BigDecimal(0) : old.getAmtComptotal())), userVO.getLoginName(), new Date(), "修改");
|
|
|
-
|
|
|
- }
|
|
|
+ // //项目资金来源(万元):
|
|
|
+ //
|
|
|
+ // if ((old.getAmtComptotal() == null ? BigDecimal.ZERO : old.getAmtComptotal()).compareTo(subInfo.getAmtComptotal() == null ? BigDecimal.ZERO : subInfo.getAmtComptotal()) != 0) {
|
|
|
+ // //到位资金
|
|
|
+ // subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "amt_comptotal", "到位资金(万元)", "", old.getAmtComptotal() == null ? "" : old.getAmtComptotal() + "", subInfo.getAmtComptotal() == null ? "" : subInfo.getAmtComptotal() + "", (subInfo.getAmtComptotal() == null ? new BigDecimal(0) : subInfo.getAmtComptotal()).subtract((old.getAmtComptotal() == null ? new BigDecimal(0) : old.getAmtComptotal())), userVO.getLoginName(), new Date(), "修改");
|
|
|
+ //
|
|
|
+ // }
|
|
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
@@ -1822,16 +1822,16 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
//监管单位
|
|
|
|
|
|
- if (!Objects.equals(old.getMainId(), subInfo.getMainId())) {
|
|
|
-
|
|
|
- String oldmainId = old.getMainId() == null ? "" : old.getMainId();
|
|
|
- String subInfoMainId = subInfo.getMainId() == null ? "" : subInfo.getMainId();
|
|
|
-
|
|
|
- String oldMainName = Optional.ofNullable(jUnitDao.findById(oldmainId)).orElse(new JUnit()).getTitle();
|
|
|
- String subInfoMainName = Optional.ofNullable(jUnitDao.findById(subInfoMainId)).orElse(new JUnit()).getTitle();
|
|
|
-
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "main_id", "监管单位", "", oldMainName, subInfoMainName, null, userVO.getLoginName(), new Date(), "修改");
|
|
|
- }
|
|
|
+ // if (!Objects.equals(old.getMainId(), subInfo.getMainId())) {
|
|
|
+ //
|
|
|
+ // String oldmainId = old.getMainId() == null ? "" : old.getMainId();
|
|
|
+ // String subInfoMainId = subInfo.getMainId() == null ? "" : subInfo.getMainId();
|
|
|
+ //
|
|
|
+ // String oldMainName = Optional.ofNullable(jUnitDao.findById(oldmainId)).orElse(new JUnit()).getTitle();
|
|
|
+ // String subInfoMainName = Optional.ofNullable(jUnitDao.findById(subInfoMainId)).orElse(new JUnit()).getTitle();
|
|
|
+ //
|
|
|
+ // subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "main_id", "监管单位", "", oldMainName, subInfoMainName, null, userVO.getLoginName(), new Date(), "修改");
|
|
|
+ // }
|
|
|
|
|
|
//修改建设地点 对应修改审批单位
|
|
|
/* DetachedCriteria detachedCriteria = DetachedCriteria.forClass(SubPreNew.class);
|
|
@@ -1860,134 +1860,134 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
subInfoDao.update(old);
|
|
|
|
|
|
//资金来源
|
|
|
- List<SubSourceVO> amtSource = subInfo.getSubSource();
|
|
|
- if (CollectionUtil.isNotEmpty(amtSource)) {
|
|
|
- List<SubSource> saveData = new ArrayList<>();
|
|
|
- for (SubSourceVO sourceVO : amtSource) {
|
|
|
- if (StringUtil.isEmpty(sourceVO.getId())) {
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), "", sourceVO.getAmt() + "", sourceVO.getAmt(), userVO.getLoginName(), new Date(), "新增");
|
|
|
- sourceVO.setSubId(old.getId());
|
|
|
- sourceVO.setId(Identities.uuid());
|
|
|
- sourceVO.setState("1");
|
|
|
- } else {
|
|
|
- SubSource subSourceOld = subSourceDao.findById(sourceVO.getId());
|
|
|
- BigDecimal oldAmtLy = Optional.ofNullable(subSourceOld.getAmt()).orElse(BigDecimal.ZERO);
|
|
|
- BigDecimal voAmtLy = Optional.ofNullable(sourceVO.getAmt()).orElse(BigDecimal.ZERO);
|
|
|
- if (oldAmtLy.compareTo(voAmtLy) != 0) {
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), subSourceOld.getAmt() + "", sourceVO.getAmt() + "", voAmtLy.subtract(oldAmtLy), userVO.getLoginName(), new Date(), "修改");
|
|
|
- }
|
|
|
- if (sourceVO.getLogicDeleteFlag() == 1) {
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), subSourceOld.getAmt() + "", "", new BigDecimal(0).subtract(oldAmtLy), userVO.getLoginName(), new Date(), "删除");
|
|
|
- }
|
|
|
- subSourceDao.delete(subSourceOld.getId());
|
|
|
- sourceVO.setAmtPay(subSourceOld.getAmtPay());
|
|
|
- sourceVO.setPlanDate(subSourceOld.getPlanDate());
|
|
|
- sourceVO.setState(subSourceOld.getState());
|
|
|
- }
|
|
|
- SubSource subSource = new SubSource();
|
|
|
- BeanUtils.copyProperties(sourceVO, subSource);
|
|
|
- subSource.setId(Identities.uuid());
|
|
|
- saveData.add(subSource);
|
|
|
- }
|
|
|
- for (int i = 0; i < saveData.size(); i++) {
|
|
|
- if (saveData.get(i).getLogicDeleteFlag() == 0) {
|
|
|
- SubSource source = saveData.get(i);
|
|
|
- source.setAmtXd(subSourceDetailDao.sumAmt(source.getSubId(), source.getSourceId(), null, "2").get("amtSj"));
|
|
|
- source.setAmtSb(subSourceDetailDao.sumAmt(source.getSubId(), source.getSourceId(), null, "1").get("amtSj"));
|
|
|
- }
|
|
|
- }
|
|
|
- subSourceDao.saveOrUpdateAll(saveData);
|
|
|
- }
|
|
|
- }
|
|
|
- if (vo.getManage() != null) {
|
|
|
- //保存监管单位
|
|
|
- SubInfoJgDwVO manageVO = vo.getManage();
|
|
|
- List<SubManage> list = manageVO.getManage();
|
|
|
- if (CollectionUtil.isNotEmpty(list)) {
|
|
|
- for (SubManage manage : list) {
|
|
|
- if (StringUtil.isEmpty(manage.getId())) {
|
|
|
- manage.setId(Identities.uuid());
|
|
|
- String newManageName = jUnitDao.findById(manage.getManageId()).getTitle();
|
|
|
- String newDepartName = StringUtil.isEmpty(manage.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(manage.getDepartId())).orElse(new JDepart()).getTitle();
|
|
|
- //String newDepartName=jDepartDao.findById(manage.getDepartId())==null?"":jDepartDao.findById(manage.getDepartId()).getTitle();
|
|
|
- newDepartName = (newDepartName == null ? "" : newDepartName);
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", "", newManageName + "/" + newDepartName, null, userVO.getLoginName(), new Date(), "新增");
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
-
|
|
|
- SubManage subManageOld = subManageDao.findById(manage.getId());
|
|
|
- if (!(StringUtil.isNotEmpty(subManageOld.getManageId()) ? subManageOld.getManageId() : "").equals(manage.getManageId()) || !(StringUtil.isNotEmpty(subManageOld.getDepartId()) ? subManageOld.getDepartId() : "").equals(manage.getDepartId())) {
|
|
|
- //获取监管单位,跟部门名称
|
|
|
- String oldManageName = StringUtil.isEmpty(subManageOld.getManageId()) ? "" : Optional.ofNullable(jUnitDao.findById(subManageOld.getManageId())).orElse(new JUnit()).getTitle();
|
|
|
- String newManageName = jUnitDao.findById(manage.getManageId()).getTitle();
|
|
|
-
|
|
|
- String oldDepartName = StringUtil.isEmpty(subManageOld.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(subManageOld.getDepartId())).orElse(new JDepart()).getTitle();
|
|
|
-// String newDepartName=jDepartDao.findById(manage.getDepartId())==null?"":jDepartDao.findById(manage.getDepartId()).getTitle();
|
|
|
- String newDepartName = StringUtil.isEmpty(manage.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(manage.getDepartId())).orElse(new JDepart()).getTitle();
|
|
|
-
|
|
|
-
|
|
|
- newDepartName = (newDepartName == null ? "" : newDepartName);
|
|
|
- oldDepartName = (oldDepartName == null ? "" : oldDepartName);
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", oldManageName + "/" + oldDepartName, newManageName + "/" + newDepartName, null, userVO.getLoginName(), new Date(), "修改");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if (manage.getLogicDeleteFlag() == 1) {
|
|
|
- //获取监管单位,跟部门名称
|
|
|
- String oldManageName = StringUtil.isEmpty(subManageOld.getManageId()) ? "" : Optional.ofNullable(jUnitDao.findById(subManageOld.getManageId())).orElse(new JUnit()).getTitle();
|
|
|
- String oldDepartName = StringUtil.isEmpty(subManageOld.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(subManageOld.getDepartId())).orElse(new JDepart()).getTitle();
|
|
|
- oldDepartName = (oldDepartName == null ? "" : oldDepartName);
|
|
|
- subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", oldManageName + "/" + oldDepartName, "", null, userVO.getLoginName(), new Date(), "删除");
|
|
|
- }
|
|
|
-
|
|
|
- // subManageDao.delete(subManageOld);
|
|
|
- subManageDao.delete(manage.getId());
|
|
|
-
|
|
|
- //设置新id
|
|
|
- manage.setId(Identities.uuid());
|
|
|
-
|
|
|
- }
|
|
|
- manage.setSubId(manageVO.getSubId());
|
|
|
- }
|
|
|
- subManageDao.saveOrUpdateAll(list);
|
|
|
- }
|
|
|
- }
|
|
|
- if (vo.getPlanList() != null) {
|
|
|
- //保存计划信息
|
|
|
- SubListPlanVO planVO = vo.getPlanList();
|
|
|
- SubInfo subInfo = subInfoDao.findById(planVO.getSubId());
|
|
|
- //重新保存已完成的实际金额置零
|
|
|
- subInfo.setAmtComp(BigDecimal.ZERO);
|
|
|
- //已完成进度和实际完成进度置零
|
|
|
- subInfo.setNumComp(BigDecimal.ZERO);
|
|
|
- subInfo.setNumTotal(BigDecimal.ZERO);
|
|
|
- List<SubPlan> planList = planVO.getList();
|
|
|
- //计划
|
|
|
- BigDecimal numTotal = new BigDecimal(0);
|
|
|
- BigDecimal endTotal = new BigDecimal(0);
|
|
|
- if (CollectionUtil.isNotEmpty(planList)) {
|
|
|
- for (SubPlan plan : planList) {
|
|
|
- plan.setSubId(subInfo.getId());
|
|
|
- if (StringUtil.isEmpty(plan.getId())) {
|
|
|
- plan.setId(Identities.uuid());
|
|
|
- }
|
|
|
- if (!Objects.equals(plan.getLogicDeleteFlag(), 1)) {
|
|
|
- if (StringUtil.isEmpty(plan.getStatusSp())) {
|
|
|
- plan.setStatusSp(SubPlanStatusEnum.WKG.getKey());
|
|
|
- } else if (Objects.equals(plan.getStatusSp(), SubPlanStatusEnum.YWG.getKey())) {
|
|
|
- endTotal = endTotal.add(plan.getNumRate());
|
|
|
- }
|
|
|
- //权重累加为总进度值
|
|
|
- numTotal = numTotal.add(plan.getNumRate());
|
|
|
- }
|
|
|
- }
|
|
|
- subPlanDao.saveOrUpdateAll(planList);
|
|
|
- }
|
|
|
- subInfo.setNumComp(endTotal);
|
|
|
- subInfo.setNumTotal(numTotal);
|
|
|
- subInfoDao.update(subInfo);
|
|
|
+ // List<SubSourceVO> amtSource = subInfo.getSubSource();
|
|
|
+ // if (CollectionUtil.isNotEmpty(amtSource)) {
|
|
|
+ // List<SubSource> saveData = new ArrayList<>();
|
|
|
+ // for (SubSourceVO sourceVO : amtSource) {
|
|
|
+ // if (StringUtil.isEmpty(sourceVO.getId())) {
|
|
|
+ // subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), "", sourceVO.getAmt() + "", sourceVO.getAmt(), userVO.getLoginName(), new Date(), "新增");
|
|
|
+ // sourceVO.setSubId(old.getId());
|
|
|
+ // sourceVO.setId(Identities.uuid());
|
|
|
+ // sourceVO.setState("1");
|
|
|
+ // } else {
|
|
|
+ // SubSource subSourceOld = subSourceDao.findById(sourceVO.getId());
|
|
|
+ // BigDecimal oldAmtLy = Optional.ofNullable(subSourceOld.getAmt()).orElse(BigDecimal.ZERO);
|
|
|
+ // BigDecimal voAmtLy = Optional.ofNullable(sourceVO.getAmt()).orElse(BigDecimal.ZERO);
|
|
|
+ // if (oldAmtLy.compareTo(voAmtLy) != 0) {
|
|
|
+ // subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), subSourceOld.getAmt() + "", sourceVO.getAmt() + "", voAmtLy.subtract(oldAmtLy), userVO.getLoginName(), new Date(), "修改");
|
|
|
+ // }
|
|
|
+ // if (sourceVO.getLogicDeleteFlag() == 1) {
|
|
|
+ // subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), subSourceOld.getAmt() + "", "", new BigDecimal(0).subtract(oldAmtLy), userVO.getLoginName(), new Date(), "删除");
|
|
|
+ // }
|
|
|
+ // subSourceDao.delete(subSourceOld.getId());
|
|
|
+ // sourceVO.setAmtPay(subSourceOld.getAmtPay());
|
|
|
+ // sourceVO.setPlanDate(subSourceOld.getPlanDate());
|
|
|
+ // sourceVO.setState(subSourceOld.getState());
|
|
|
+ // }
|
|
|
+ // SubSource subSource = new SubSource();
|
|
|
+ // BeanUtils.copyProperties(sourceVO, subSource);
|
|
|
+ // subSource.setId(Identities.uuid());
|
|
|
+ // saveData.add(subSource);
|
|
|
+ // }
|
|
|
+ // for (int i = 0; i < saveData.size(); i++) {
|
|
|
+ // if (saveData.get(i).getLogicDeleteFlag() == 0) {
|
|
|
+ // SubSource source = saveData.get(i);
|
|
|
+ // source.setAmtXd(subSourceDetailDao.sumAmt(source.getSubId(), source.getSourceId(), null, "2").get("amtSj"));
|
|
|
+ // source.setAmtSb(subSourceDetailDao.sumAmt(source.getSubId(), source.getSourceId(), null, "1").get("amtSj"));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // subSourceDao.saveOrUpdateAll(saveData);
|
|
|
+ // }
|
|
|
}
|
|
|
+// if (vo.getManage() != null) {
|
|
|
+// //保存监管单位
|
|
|
+// SubInfoJgDwVO manageVO = vo.getManage();
|
|
|
+// List<SubManage> list = manageVO.getManage();
|
|
|
+// if (CollectionUtil.isNotEmpty(list)) {
|
|
|
+// for (SubManage manage : list) {
|
|
|
+// if (StringUtil.isEmpty(manage.getId())) {
|
|
|
+// manage.setId(Identities.uuid());
|
|
|
+// String newManageName = jUnitDao.findById(manage.getManageId()).getTitle();
|
|
|
+// String newDepartName = StringUtil.isEmpty(manage.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(manage.getDepartId())).orElse(new JDepart()).getTitle();
|
|
|
+// //String newDepartName=jDepartDao.findById(manage.getDepartId())==null?"":jDepartDao.findById(manage.getDepartId()).getTitle();
|
|
|
+// newDepartName = (newDepartName == null ? "" : newDepartName);
|
|
|
+// subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", "", newManageName + "/" + newDepartName, null, userVO.getLoginName(), new Date(), "新增");
|
|
|
+//
|
|
|
+// } else {
|
|
|
+//
|
|
|
+//
|
|
|
+// SubManage subManageOld = subManageDao.findById(manage.getId());
|
|
|
+// if (!(StringUtil.isNotEmpty(subManageOld.getManageId()) ? subManageOld.getManageId() : "").equals(manage.getManageId()) || !(StringUtil.isNotEmpty(subManageOld.getDepartId()) ? subManageOld.getDepartId() : "").equals(manage.getDepartId())) {
|
|
|
+// //获取监管单位,跟部门名称
|
|
|
+// String oldManageName = StringUtil.isEmpty(subManageOld.getManageId()) ? "" : Optional.ofNullable(jUnitDao.findById(subManageOld.getManageId())).orElse(new JUnit()).getTitle();
|
|
|
+// String newManageName = jUnitDao.findById(manage.getManageId()).getTitle();
|
|
|
+//
|
|
|
+// String oldDepartName = StringUtil.isEmpty(subManageOld.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(subManageOld.getDepartId())).orElse(new JDepart()).getTitle();
|
|
|
+// // String newDepartName=jDepartDao.findById(manage.getDepartId())==null?"":jDepartDao.findById(manage.getDepartId()).getTitle();
|
|
|
+// String newDepartName = StringUtil.isEmpty(manage.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(manage.getDepartId())).orElse(new JDepart()).getTitle();
|
|
|
+//
|
|
|
+//
|
|
|
+// newDepartName = (newDepartName == null ? "" : newDepartName);
|
|
|
+// oldDepartName = (oldDepartName == null ? "" : oldDepartName);
|
|
|
+// subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", oldManageName + "/" + oldDepartName, newManageName + "/" + newDepartName, null, userVO.getLoginName(), new Date(), "修改");
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// if (manage.getLogicDeleteFlag() == 1) {
|
|
|
+// //获取监管单位,跟部门名称
|
|
|
+// String oldManageName = StringUtil.isEmpty(subManageOld.getManageId()) ? "" : Optional.ofNullable(jUnitDao.findById(subManageOld.getManageId())).orElse(new JUnit()).getTitle();
|
|
|
+// String oldDepartName = StringUtil.isEmpty(subManageOld.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(subManageOld.getDepartId())).orElse(new JDepart()).getTitle();
|
|
|
+// oldDepartName = (oldDepartName == null ? "" : oldDepartName);
|
|
|
+// subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", oldManageName + "/" + oldDepartName, "", null, userVO.getLoginName(), new Date(), "删除");
|
|
|
+// }
|
|
|
+//
|
|
|
+// // subManageDao.delete(subManageOld);
|
|
|
+// subManageDao.delete(manage.getId());
|
|
|
+//
|
|
|
+// //设置新id
|
|
|
+// manage.setId(Identities.uuid());
|
|
|
+//
|
|
|
+// }
|
|
|
+// manage.setSubId(manageVO.getSubId());
|
|
|
+// }
|
|
|
+// subManageDao.saveOrUpdateAll(list);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (vo.getPlanList() != null) {
|
|
|
+// //保存计划信息
|
|
|
+// SubListPlanVO planVO = vo.getPlanList();
|
|
|
+// SubInfo subInfo = subInfoDao.findById(planVO.getSubId());
|
|
|
+// //重新保存已完成的实际金额置零
|
|
|
+// subInfo.setAmtComp(BigDecimal.ZERO);
|
|
|
+// //已完成进度和实际完成进度置零
|
|
|
+// subInfo.setNumComp(BigDecimal.ZERO);
|
|
|
+// subInfo.setNumTotal(BigDecimal.ZERO);
|
|
|
+// List<SubPlan> planList = planVO.getList();
|
|
|
+// //计划
|
|
|
+// BigDecimal numTotal = new BigDecimal(0);
|
|
|
+// BigDecimal endTotal = new BigDecimal(0);
|
|
|
+// if (CollectionUtil.isNotEmpty(planList)) {
|
|
|
+// for (SubPlan plan : planList) {
|
|
|
+// plan.setSubId(subInfo.getId());
|
|
|
+// if (StringUtil.isEmpty(plan.getId())) {
|
|
|
+// plan.setId(Identities.uuid());
|
|
|
+// }
|
|
|
+// if (!Objects.equals(plan.getLogicDeleteFlag(), 1)) {
|
|
|
+// if (StringUtil.isEmpty(plan.getStatusSp())) {
|
|
|
+// plan.setStatusSp(SubPlanStatusEnum.WKG.getKey());
|
|
|
+// } else if (Objects.equals(plan.getStatusSp(), SubPlanStatusEnum.YWG.getKey())) {
|
|
|
+// endTotal = endTotal.add(plan.getNumRate());
|
|
|
+// }
|
|
|
+// //权重累加为总进度值
|
|
|
+// numTotal = numTotal.add(plan.getNumRate());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// subPlanDao.saveOrUpdateAll(planList);
|
|
|
+// }
|
|
|
+// subInfo.setNumComp(endTotal);
|
|
|
+// subInfo.setNumTotal(numTotal);
|
|
|
+// subInfoDao.update(subInfo);
|
|
|
+// }
|
|
|
|
|
|
}
|
|
|
|