技术监督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());
}

View File

@@ -487,9 +487,26 @@ public enum DicDataEnum {
UNBALANCE("三项不平横","unbalance"),
FUND("基波","fund"),
;
/**pms******************************start*/
/**
* 实施状态
*/
Nocarried("未开展","Nocarried"),
Progressing("开展中","Progressing"),
Reviewing("待审核","Reviewing"),
Completed("已完成","Completed")
/**pms******************************end*/
;
private final String name;
private final String code;
private final Float value;

View File

@@ -93,6 +93,14 @@ public enum DicDataTypeEnum {
SUPV_PROBLEM_TYPE("监督问题类型","problem_type"),
RECTIFICATION_MEASURE("整改方案","RectificationMeasure"),
SUPV_PLAN_STATUS("监督计划状态","plan_status"),
BILL_TYPE("单据类型","bill_type"),
SPECIALITY_TYPE("所属专业","speciality_type"),
RECTIFICATION_STATUS_TYPE("整改情况","rectification_status_type"),
file_type("附件分类"," file_type"),
problem_level_type("问题等级"," problem_level_type"),
APP_BASE_INFORMATION_TYPE("app基础信息类型","appInformationType"),
APP_DEVICE_EVENT_TYPE("app设备事件类型","appDeviceEventType"),

View File

@@ -40,7 +40,7 @@ public enum SystemResponseEnum {
MONITOR_TYPE_EMPTY("A00368","查询字典监测点类别为空"),
ACTIVATED_STATE("A00369","必须存在一个已激活的系统类型"),
ADVANCE_REASON("A00370","查询字典暂降原因为空"),
EFFECT_STATUS_EMPTY("A00370","查询字典实施状态为空"),
EVENT_REPORT_REPEAT("A00361","暂态报告模板重复"),

View File

@@ -50,7 +50,7 @@ public class DictDataParam {
private Integer algoDescribe;
@ApiModelProperty("字典值")
@ApiModelProperty("字典值,用于记录字典的计算值如10kV记录为 10")
private String value;