浏览代码

【功能修改】app 端:仓房信息,备选状态赋值.

duhuajie 2 周之前
父节点
当前提交
b9db5201b0

+ 39 - 0
delivery-module-core/delivery-module-core-api/src/main/java/com/unis/module/core/enums/project/DeliveryBxzt.java

@@ -0,0 +1,39 @@
1
+package com.unis.module.core.enums.project;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * @program: delivery-depot-admin
8
+ * @author: duhuajie
9
+ * @create: 2025-02-11
10
+ * @description: 备选状态:
11
+ * 1. 未选择:0:省未选择
12
+ * 2. 未核验:1:省已选择
13
+ * 3. 备选:省核验通过
14
+ * 4. 被认定:银行核验通过
15
+ * 5. 被选定:贷款人选定
16
+ * 6. 核验不通过:
17
+ */
18
+@Getter
19
+@AllArgsConstructor
20
+public enum DeliveryBxzt {
21
+
22
+    UNSELECTED(0,"未选择"),
23
+    UNVERIFIED(1,"未核验"),
24
+    CHOICE(2,"备选"),
25
+    RECOGNIZED(3,"被认定"),
26
+    SELECTED(4,"被选定"),
27
+    UNVERIFIED_FAIL(5,"省核验不通过"),
28
+    BANK_UNVERIFIED_FAIL(6,"银行核验不通过"),
29
+
30
+    ;
31
+    /**
32
+     * 字典编码
33
+     */
34
+    private final Integer code;
35
+    /**
36
+     * 字典描述
37
+     */
38
+    private final String name;
39
+}

+ 31 - 7
delivery-module-core/delivery-module-core-biz/src/main/java/com/unis/module/coding/service/task/TaskServiceImpl.java

@@ -11,6 +11,7 @@ import com.unis.framework.security.core.LoginUser;
11 11
 import com.unis.framework.security.core.util.SecurityFrameworkUtils;
12 12
 import com.unis.module.coding.controller.admin.task.vo.*;
13 13
 import com.unis.module.coding.dal.dataobject.bank.BankDO;
14
+import com.unis.module.coding.dal.dataobject.caxx.CaxxDO;
14 15
 import com.unis.module.coding.dal.dataobject.cwxx.CwxxDO;
15 16
 import com.unis.module.coding.dal.dataobject.cwxxyear.CwxxYearDO;
16 17
 import com.unis.module.coding.dal.dataobject.dk.DkDO;
@@ -28,6 +29,7 @@ import com.unis.module.coding.dal.mysql.kqxx.KqxxMapper;
28 29
 import com.unis.module.coding.dal.mysql.province.ProvinceMapper;
29 30
 import com.unis.module.coding.dal.mysql.users.UsersMapper;
30 31
 import com.unis.module.core.enums.ErrorCodeConstants;
32
+import com.unis.module.core.enums.project.DeliveryBxzt;
31 33
 import com.unis.module.core.enums.project.DeliveryHyState;
32 34
 import com.unis.module.system.api.permission.PermissionApi;
33 35
 import com.unis.module.system.enums.permission.RoleCodeEnum;
@@ -133,8 +135,12 @@ public class TaskServiceImpl implements TaskService {
133 135
             });
134 136
 
135 137
             //修改仓房信息:备选状态:
136
-            if(Objects.equals(DeliveryHyState.YES_HY.getCode(), reqVO.getHyState())){
137
-//                caxxMapper.updateByKqId();
138
+            if(Objects.equals(DeliveryHyState.YES_HY.getCode(), reqVO.getHyState()) && reqVO.getCaIds() != null ){
139
+                extractedBxzt(reqVO,DeliveryBxzt.CHOICE.getCode());
140
+            }
141
+
142
+            if(Objects.equals(DeliveryHyState.NO_HY.getCode(), reqVO.getHyState()) && reqVO.getCaIds() != null ){
143
+                extractedBxzt(reqVO,DeliveryBxzt.UNVERIFIED_FAIL.getCode());
138 144
             }
139 145
         }
140 146
         // 银行核验人员
@@ -147,14 +153,28 @@ public class TaskServiceImpl implements TaskService {
147 153
                 bankMapper.updateByKqId(bankDO, kqId, reqVO.getCaIds());
148 154
             });
149 155
 
150
-            //修改仓房信息:备选状态:todo
151
-            if(Objects.equals(DeliveryHyState.YES_HY.getCode(), reqVO.getHyState())){
152
-//                caxxMapper.updateByKqId();
156
+            //修改仓房信息:备选状态:
157
+            if(Objects.equals(DeliveryHyState.YES_HY.getCode(), reqVO.getHyState()) && reqVO.getCaIds() != null ){
158
+                extractedBxzt(reqVO,DeliveryBxzt.RECOGNIZED.getCode());
159
+            }
160
+            if(Objects.equals(DeliveryHyState.NO_HY.getCode(), reqVO.getHyState()) && reqVO.getCaIds() != null ){
161
+                extractedBxzt(reqVO,DeliveryBxzt.BANK_UNVERIFIED_FAIL.getCode());
153 162
             }
154 163
         }
164
+
165
+
155 166
         return true;
156 167
     }
157 168
 
169
+    private void extractedBxzt(TaskPageReqVO reqVO,Integer bxzt) {
170
+        reqVO.getCaIds().forEach(caId -> {
171
+            CaxxDO caxxDO = new CaxxDO();
172
+            caxxDO.setId(caId);
173
+            caxxDO.setBxzt(bxzt);
174
+            caxxMapper.updateById(caxxDO);
175
+        });
176
+    }
177
+
158 178
     @Override
159 179
     public Boolean getStoreroom(TaskPageReqVO reqVO) {
160 180
         if(reqVO.getCaIds() == null || reqVO.getCaIds().isEmpty()){
@@ -169,6 +189,10 @@ public class TaskServiceImpl implements TaskService {
169 189
                             .eq(UsersDO::getCreator, SecurityFrameworkUtils.getLoginUserId())
170 190
                             .eq(UsersDO::getCaId, caId)));
171 191
 
192
+            //修改仓房信息:备选状态:
193
+            if(reqVO.getCaIds() != null ){
194
+                extractedBxzt(reqVO,DeliveryBxzt.RECOGNIZED.getCode());
195
+            }
172 196
         } else {
173 197
             // 校验 是登录人可选的任务
174 198
             List<TaskCaxxRespVO> taskCaxxRespVOS = verifyStoreroom(reqVO);
@@ -180,8 +204,8 @@ public class TaskServiceImpl implements TaskService {
180 204
                             .setCaId(taskCaxxRespVO.getCaId())));
181 205
 
182 206
             //修改仓房信息:备选状态:
183
-            if(Objects.equals(DeliveryHyState.YES_HY.getCode(), reqVO.getHyState())){
184
-//                caxxMapper.updateByKqId();
207
+            if( reqVO.getCaIds() != null ){
208
+                extractedBxzt(reqVO,DeliveryBxzt.SELECTED.getCode());
185 209
             }
186 210
         }
187 211