技术监督bug修改

This commit is contained in:
2023-08-30 16:27:31 +08:00
parent e5967ef694
commit b0750f78fd
6 changed files with 71 additions and 5 deletions

View File

@@ -30,7 +30,7 @@
where
b.supv_Type = #{statisticType}
<if test="startTime!=null and endTime!=null">
and a.create_time between #{startTime} and #{endTime}
and a.plan_Rectification_Time between #{startTime} and #{endTime}
</if>
<if test="rectificationStatus !=null and rectificationStatus!=''">
and a.rectification_Status = #{rectificationStatus}

View File

@@ -27,6 +27,8 @@ import com.njcn.process.service.ISupvFileService;
import com.njcn.process.service.ISupvPlanService;
import com.njcn.system.api.DicDataFeignClient;
import com.njcn.system.enums.DicDataEnum;
import com.njcn.system.enums.DicDataTypeEnum;
import com.njcn.system.enums.SystemResponseEnum;
import com.njcn.system.pojo.po.DictData;
import com.njcn.user.api.DeptFeignClient;
import com.njcn.user.api.UserFeignClient;
@@ -94,6 +96,26 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
supvPlan.setReportIssueTime(PubUtils.localDateTimeFormat(supvPlanParam.getReportIssueTime()));
}
DictData dictDataStart = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.EFFECT_STATUS.getName(), DicDataEnum.Nocarried.getName()).getData();
DictData dictDataEnd = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.EFFECT_STATUS.getName(), DicDataEnum.Completed.getName()).getData();
if(Objects.isNull(dictDataStart) || Objects.isNull(dictDataEnd)){
throw new BusinessException(SystemResponseEnum.EFFECT_STATUS_EMPTY);
}
if(!dictDataStart.getId().equals(supvPlan.getEffectStatus())){
if(Objects.isNull(supvPlan.getEffectStartTime()) ){
throw new BusinessException("开始实施时间不可为空!");
}
}
if(dictDataEnd.getId().equals(supvPlan.getEffectStatus())){
if(Objects.isNull(supvPlan.getEffectEndTime()) ){
throw new BusinessException("结束实施时间不可为空!");
}
}
supvPlan.setIsUploadHead(0);
supvPlan.setPlanUserId(RequestUtil.getUserIndex());
if(StrUtil.isNotBlank(supvPlan.getEffectUserId())){
@@ -130,6 +152,25 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
supvPlan.setEffectUserName(userList.get(0).getName());
}
}
DictData dictDataStart = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.EFFECT_STATUS.getName(), DicDataEnum.Nocarried.getName()).getData();
DictData dictDataEnd = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.EFFECT_STATUS.getName(), DicDataEnum.Completed.getName()).getData();
if(Objects.isNull(dictDataStart) || Objects.isNull(dictDataEnd)){
throw new BusinessException(SystemResponseEnum.EFFECT_STATUS_EMPTY);
}
if(!dictDataStart.getId().equals(supvPlan.getEffectStatus())){
if(Objects.isNull(supvPlan.getEffectStartTime()) ){
throw new BusinessException("开始实施时间不可为空!");
}
}
if(dictDataEnd.getId().equals(supvPlan.getEffectStatus())){
if(Objects.isNull(supvPlan.getEffectEndTime()) ){
throw new BusinessException("结束实施时间不可为空!");
}
}
this.updateById(supvPlan);
return true;
}
@@ -173,7 +214,7 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
if (StrUtil.isNotBlank(supvPlanParam.getSupvOrgId())) {
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(supvPlanParam.getSupvOrgId()).getData();
lambdaQueryWrapper.in(SupvPlan::getSupvOrgId, deptIds)
.between(SupvPlan::getCreateTime, LocalDateTimeUtil.beginOfDay(LocalDate.parse(supvPlanParam.getSearchBeginTime()).atStartOfDay()), LocalDateTimeUtil.endOfDay(LocalDate.parse(supvPlanParam.getSearchEndTime()).atStartOfDay()))
.between(SupvPlan::getPlanSupvDate, LocalDateTimeUtil.beginOfDay(LocalDate.parse(supvPlanParam.getSearchBeginTime()).atStartOfDay()), LocalDateTimeUtil.endOfDay(LocalDate.parse(supvPlanParam.getSearchEndTime()).atStartOfDay()))
.eq(StrUtil.isNotBlank(supvPlanParam.getSupvType()),SupvPlan::getSupvType,supvPlanParam.getSupvType());
}