|
@@ -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;
|
|
@@ -19,6 +20,7 @@ import com.unis.module.coding.dal.dataobject.kqxx.KqxxDO;
|
19
|
20
|
import com.unis.module.coding.dal.dataobject.province.ProvinceDO;
|
20
|
21
|
import com.unis.module.coding.dal.dataobject.users.UsersDO;
|
21
|
22
|
import com.unis.module.coding.dal.mysql.bank.BankMapper;
|
|
23
|
+import com.unis.module.coding.dal.mysql.caxx.CaxxMapper;
|
22
|
24
|
import com.unis.module.coding.dal.mysql.cwxx.CwxxMapper;
|
23
|
25
|
import com.unis.module.coding.dal.mysql.cwxxyear.CwxxYearMapper;
|
24
|
26
|
import com.unis.module.coding.dal.mysql.dk.DkMapper;
|
|
@@ -27,6 +29,7 @@ import com.unis.module.coding.dal.mysql.kqxx.KqxxMapper;
|
27
|
29
|
import com.unis.module.coding.dal.mysql.province.ProvinceMapper;
|
28
|
30
|
import com.unis.module.coding.dal.mysql.users.UsersMapper;
|
29
|
31
|
import com.unis.module.core.enums.ErrorCodeConstants;
|
|
32
|
+import com.unis.module.core.enums.project.DeliveryBxzt;
|
30
|
33
|
import com.unis.module.core.enums.project.DeliveryHyState;
|
31
|
34
|
import com.unis.module.system.api.permission.PermissionApi;
|
32
|
35
|
import com.unis.module.system.enums.permission.RoleCodeEnum;
|
|
@@ -39,6 +42,7 @@ import org.springframework.validation.annotation.Validated;
|
39
|
42
|
import javax.annotation.Resource;
|
40
|
43
|
import java.time.LocalDateTime;
|
41
|
44
|
import java.util.List;
|
|
45
|
+import java.util.Objects;
|
42
|
46
|
import java.util.Set;
|
43
|
47
|
|
44
|
48
|
import static com.unis.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
@@ -72,7 +76,8 @@ public class TaskServiceImpl implements TaskService {
|
72
|
76
|
private BankMapper bankMapper;
|
73
|
77
|
@Resource
|
74
|
78
|
private UsersMapper usersMapper;
|
75
|
|
-
|
|
79
|
+ @Resource
|
|
80
|
+ private CaxxMapper caxxMapper;
|
76
|
81
|
@Override
|
77
|
82
|
public IPage<TaskRespVO> getTaskList(TaskPageReqVO pageReqVO) {
|
78
|
83
|
// 根据角色不同,查询不同数据
|
|
@@ -85,7 +90,7 @@ public class TaskServiceImpl implements TaskService {
|
85
|
90
|
@Override
|
86
|
91
|
public IPage<TaskRespVO> getAllStoreroomList(TaskPageReqVO pageReqVO) {
|
87
|
92
|
// 根据角色不同,查询不同数据
|
88
|
|
- addParamDeptIds(pageReqVO);
|
|
93
|
+ addParamDeptIds(pageReqVO);
|
89
|
94
|
|
90
|
95
|
IPage<TaskRespVO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
91
|
96
|
return dkMapper.getAllStoreroomList(page, pageReqVO);
|
|
@@ -126,8 +131,17 @@ public class TaskServiceImpl implements TaskService {
|
126
|
131
|
.setHyState(reqVO.getHyState())
|
127
|
132
|
.setHyryId(SecurityFrameworkUtils.getLoginUserId())
|
128
|
133
|
.setHyryName(SecurityFrameworkUtils.getLoginUserNickname());
|
129
|
|
- provinceMapper.updateByKqId(provinceDO, kqId);
|
|
134
|
+ provinceMapper.updateByKqId(provinceDO, kqId, reqVO.getCaIds());
|
130
|
135
|
});
|
|
136
|
+
|
|
137
|
+ //修改仓房信息:备选状态:
|
|
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());
|
|
144
|
+ }
|
131
|
145
|
}
|
132
|
146
|
// 银行核验人员
|
133
|
147
|
if(roleCodes.contains(RoleCodeEnum.BANK_VERIFICATION_PERSONNEL.getCode())) {
|
|
@@ -136,12 +150,31 @@ public class TaskServiceImpl implements TaskService {
|
136
|
150
|
.setHyState(reqVO.getHyState())
|
137
|
151
|
.setHyryId(SecurityFrameworkUtils.getLoginUserId())
|
138
|
152
|
.setHyryName(SecurityFrameworkUtils.getLoginUserNickname());
|
139
|
|
- bankMapper.updateByKqId(bankDO, kqId);
|
|
153
|
+ bankMapper.updateByKqId(bankDO, kqId, reqVO.getCaIds());
|
140
|
154
|
});
|
|
155
|
+
|
|
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());
|
|
162
|
+ }
|
141
|
163
|
}
|
|
164
|
+
|
|
165
|
+
|
142
|
166
|
return true;
|
143
|
167
|
}
|
144
|
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
|
+
|
145
|
178
|
@Override
|
146
|
179
|
public Boolean getStoreroom(TaskPageReqVO reqVO) {
|
147
|
180
|
if(reqVO.getCaIds() == null || reqVO.getCaIds().isEmpty()){
|
|
@@ -156,6 +189,10 @@ public class TaskServiceImpl implements TaskService {
|
156
|
189
|
.eq(UsersDO::getCreator, SecurityFrameworkUtils.getLoginUserId())
|
157
|
190
|
.eq(UsersDO::getCaId, caId)));
|
158
|
191
|
|
|
192
|
+ //修改仓房信息:备选状态:
|
|
193
|
+ if(reqVO.getCaIds() != null ){
|
|
194
|
+ extractedBxzt(reqVO,DeliveryBxzt.RECOGNIZED.getCode());
|
|
195
|
+ }
|
159
|
196
|
} else {
|
160
|
197
|
// 校验 是登录人可选的任务
|
161
|
198
|
List<TaskCaxxRespVO> taskCaxxRespVOS = verifyStoreroom(reqVO);
|
|
@@ -165,6 +202,11 @@ public class TaskServiceImpl implements TaskService {
|
165
|
202
|
.setId(YitIdHelper.nextId())
|
166
|
203
|
.setKqId(taskCaxxRespVO.getKqId())
|
167
|
204
|
.setCaId(taskCaxxRespVO.getCaId())));
|
|
205
|
+
|
|
206
|
+ //修改仓房信息:备选状态:
|
|
207
|
+ if( reqVO.getCaIds() != null ){
|
|
208
|
+ extractedBxzt(reqVO,DeliveryBxzt.SELECTED.getCode());
|
|
209
|
+ }
|
168
|
210
|
}
|
169
|
211
|
|
170
|
212
|
return true;
|