|
@@ -165,7 +165,7 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public void update2(ProjectInfoDTO dto) {
|
|
|
+ public void update2(ProjectInfoDetailVO dto) {
|
|
|
ProjectInfo oldInfo = this.getById(dto.getId());
|
|
|
if (oldInfo.getStartYear() != null){
|
|
|
if (!oldInfo.getStartYear().equals(dto.getStartYear()) || !oldInfo.getEndYear().equals(dto.getEndYear())){
|
|
@@ -1177,10 +1177,8 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
|
|
|
//判断是新增项目还是修改项目
|
|
|
if (project.getIsExist()){
|
|
|
/*修改项目*/
|
|
|
- //查询出项目详情
|
|
|
- ProjectInfoDetailVO detailVO = this.detail(project.getProjectId());
|
|
|
- ProjectInfoDTO dto = new ProjectInfoDTO();
|
|
|
- BeanUtils.copyProperties(detailVO,dto);
|
|
|
+ //查询出项目详情,用返回给前端的VO
|
|
|
+ ProjectInfoDetailVO dto = this.detail(project.getProjectId());
|
|
|
//修改指定几个项目信息
|
|
|
dto.setBuildScale(project.getBuildScale());
|
|
|
dto.setBuildScaleUnit(project.getBuildScaleUnit());
|
|
@@ -1191,7 +1189,7 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
|
|
|
dto.setIsPilotPlan(project.getIsPilotPlan());
|
|
|
//修改指定年的计划信息
|
|
|
for (ProjectInvestPlan plan : dto.getList()) {
|
|
|
- if (plan.getPlanYear() == project.getPlanYear()){
|
|
|
+ if (plan.getPlanYear().equals(project.getPlanYear())){
|
|
|
plan.setYearlyInvest(project.getYearlyInvest());
|
|
|
plan.setOneInvest(project.getOneInvest());
|
|
|
plan.setTwoInvest(project.getTwoInvest());
|
|
@@ -1307,6 +1305,9 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
|
|
|
if (year > LocalDate.now().getYear()){
|
|
|
throw new ServiceException("标题年份不能大于今年");
|
|
|
}
|
|
|
+ if (month < 0 || month > 12){
|
|
|
+ throw new ServiceException("标题月份必须在1-12之间");
|
|
|
+ }
|
|
|
Integer projectType;
|
|
|
Integer projectStage = 0;
|
|
|
if (title.contains("重")){
|
|
@@ -1396,19 +1397,19 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
|
|
|
BigDecimal twoInvest = StringChangeBigdecimal(dataFormatter.formatCellValue(row.getCell(10,Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)));
|
|
|
BigDecimal threeInvest = StringChangeBigdecimal(dataFormatter.formatCellValue(row.getCell(11,Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)));
|
|
|
BigDecimal fourInvest = StringChangeBigdecimal(dataFormatter.formatCellValue(row.getCell(12,Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)));
|
|
|
- String yearlyTarget = row.getCell(13, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String onePlan = row.getCell(14, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String twoPlan = row.getCell(15, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String threePlan = row.getCell(16, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String fourPlan = row.getCell(17, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String questionable = row.getCell(22, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String workAdvise = row.getCell(23, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String linkman = row.getCell(24, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String phone = row.getCell(25, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
+ String yearlyTarget = dataFormatter.formatCellValue(row.getCell(12, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String onePlan = dataFormatter.formatCellValue(row.getCell(14, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String twoPlan = dataFormatter.formatCellValue(row.getCell(15, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String threePlan = dataFormatter.formatCellValue(row.getCell(16, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String fourPlan = dataFormatter.formatCellValue(row.getCell(17, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String questionable = dataFormatter.formatCellValue(row.getCell(22, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String workAdvise = dataFormatter.formatCellValue(row.getCell(23, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String linkman = dataFormatter.formatCellValue(row.getCell(24, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String phone = dataFormatter.formatCellValue(row.getCell(25, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
/*月度信息行*/
|
|
|
BigDecimal investMoney = StringChangeBigdecimal(dataFormatter.formatCellValue(row.getCell(18,Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)));
|
|
|
- String workProgress = row.getCell(19, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
- String workProgressAll = row.getCell(20, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue();
|
|
|
+ String workProgress = dataFormatter.formatCellValue(row.getCell(19, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
+ String workProgressAll = dataFormatter.formatCellValue(row.getCell(20, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK));
|
|
|
BigDecimal planRatio = StringChangeBigdecimal(dataFormatter.formatCellValue(row.getCell(21,Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)));
|
|
|
if (planRatio != null && (planRatio.compareTo(BigDecimal.ZERO) == -1 || planRatio.compareTo(new BigDecimal(100)) == 1)){
|
|
|
throw new ServiceException("工程整体形象进度要在0-100之间");
|