Procházet zdrojové kódy

1.特审增加已关闭状态

liuhy před 2 roky
rodič
revize
b88d0bd67d

+ 2 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/configs/CheckStateCode.java

@@ -15,4 +15,6 @@ public final class CheckStateCode {
     public static final Integer CHECK_STSTE_4 = 4;
     /**稽核通过*/
     public static final Integer CHECK_STSTE_5 = 5;
+    /**关闭*/
+    public static final Integer CHECK_STSTE_6 = 6;
 }

+ 33 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/controller/SpecialExaminationContrller.java

@@ -37,6 +37,7 @@ import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.entity.ImportParams;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
@@ -644,12 +645,18 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
         passedCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3).eq(SmsCheckCustomerInfo::getCheckState, 5).eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
         long passedCount = customerInfoService.count(passedCountQueryWrapper);
 
+        // 稽核完成数
+        QueryWrapper<SmsCheckCustomerInfo> closeCountQueryWrapper = QueryGenerator.initQueryWrapper(new SmsCheckCustomerInfo(), request.getParameterMap());
+        closeCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3).eq(SmsCheckCustomerInfo::getCheckState, 6).eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
+        long closeCount = customerInfoService.count(closeCountQueryWrapper);
+
         dict.put("count", count);
         dict.put("handleCount", handelCount);
         dict.put("undoCount", undoCount);
         dict.put("uncheckCount", uncheckCount);
         dict.put("checkedCount", checkedCount);
         dict.put("passedCount", passedCount);
+        dict.put("closeCount", closeCount);
 
         return Result.OK(dict);
     }
@@ -788,4 +795,30 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
         }
     }
 
+
+    @AutoLog(value = "特审复开-关闭")
+    @ApiOperation(value = "特审复开-关闭", notes = "特审复开-关闭")
+    @PostMapping(value = "/close")
+    public Result<SmcSpecialCheckLog> findCheckLog(@RequestBody SmsCheckCustomerInfo smsCheckCustomerInfo) {
+        String id = smsCheckCustomerInfo.getId();
+        if (StringUtils.isEmpty(id)){
+            return Result.error("客户id不能为空");
+        }
+        SmsCheckCustomerInfo byId = infoService.getById(id);
+        Integer checkState = byId.getCheckState();
+        if (!CheckStateCode.CHECK_STSTE_4.equals(checkState)){
+            return Result.error("此复开单不可关闭");
+        }
+        SmsCheckCustomerInfo info = new SmsCheckCustomerInfo();
+        BeanUtils.copyProperties(byId,info);
+        info.setCheckState(CheckStateCode.CHECK_STSTE_6);
+        info.setId(id);
+        boolean updateById = infoService.updateById(info);
+        if (!updateById){
+            return Result.error("此复开单关闭失败");
+        }
+        return Result.ok("复开单关闭成功");
+    }
+
+
 }