From b6c8cfb873fdb34e2a78acf8ce189f77d50c4be9 Mon Sep 17 00:00:00 2001 From: jiaosong <jiaosong6760@dingtalk.com> Date: 星期一, 14 八月 2023 15:16:06 +0800 Subject: [PATCH] # 工资表配置表 --- server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java b/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java index b955f0b..f33817e 100644 --- a/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java +++ b/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java @@ -97,7 +97,9 @@ || Objects.isNull(workPlansSaveDTO.getNum()) || Objects.isNull(workPlansSaveDTO.getFactoryId()) || Objects.isNull(workPlansSaveDTO.getUnitId()) - || Objects.isNull(workPlansSaveDTO.getMaterialId())){ + || Objects.isNull(workPlansSaveDTO.getMaterialId()) + || Objects.isNull(workPlansSaveDTO.getStartDate()) + || workPlansSaveDTO.getStartDate().getTime() > workPlansSaveDTO.getPlanDate().getTime()){ throw new BusinessException(ResponseStatus.BAD_REQUEST); } WorkPlans workPlans = new WorkPlans(); @@ -372,8 +374,14 @@ if(Constants.formatIntegerNum(p.getNum())<=0){ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掔敓浜ф暟閲忋�戞暟鎹敊璇紒"); } + if(p.getStartDate() == null){ + throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掑紑濮嬫棩鏈熴�戞暟鎹敊璇紝姝g‘鏍煎紡涓猴細yyyy-MM-dd锛堝2022-06-07锛夛紒"); + } if(p.getPlanDate() == null){ - throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掓棩鏈熴�戞暟鎹敊璇紝姝g‘鏍煎紡涓猴細yyyy-MM-dd锛堝2022-06-07锛夛紒"); + throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掔粨鏉熸棩鏈熴�戞暟鎹敊璇紝姝g‘鏍煎紡涓猴細yyyy-MM-dd锛堝2022-06-07锛夛紒"); + } + if(p.getPlanDate().getTime() <= p.getStartDate().getTime()){ + throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掑紑濮嬫棩鏈熴�戣鏃╀簬銆愯鍒掔粨鏉熸棩鏈熴�戯紒"); } if(StringUtils.isBlank(p.getMaterialCode())){ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愪骇鍝佺紪鐮併�戞暟鎹敊璇紒"); -- Gitblit v1.9.3