|
@@ -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
|
|