|
|
@@ -9,10 +9,8 @@ import com.unissoft.model.ProcessMain;
|
|
9
|
9
|
import com.unissoft.model.ProcessSub;
|
|
10
|
10
|
import com.unissoft.model.SysUserPO;
|
|
11
|
11
|
import com.unissoft.result.PageParam;
|
|
12
|
|
-import com.unissoft.utils.UserUtils;
|
|
13
|
12
|
import com.unissoft.MyConstant;
|
|
14
|
13
|
import com.unissoft.dto.ProcessToBeDone;
|
|
15
|
|
-import com.unissoft.feign.SystemFeign;
|
|
16
|
14
|
import com.unissoft.mapper.ProcessAuditMapper;
|
|
17
|
15
|
import com.unissoft.mapper.ProcessBasisMapper;
|
|
18
|
16
|
import com.unissoft.mapper.ProcessBasisSonMapper;
|
|
|
@@ -72,9 +70,6 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
72
|
70
|
private ProcessBasisService processBasisService;
|
|
73
|
71
|
|
|
74
|
72
|
@Autowired
|
|
75
|
|
- private SystemFeign systemFeign;
|
|
76
|
|
-
|
|
77
|
|
- @Autowired
|
|
78
|
73
|
private RestTemplate restTemplate;
|
|
79
|
74
|
|
|
80
|
75
|
|
|
|
@@ -268,7 +263,6 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
268
|
263
|
ResponseEntity<String> forEntity = restTemplate.getForEntity(MyConstant.SYSTEM_WAREHOUSE + processAudit.getHouseId(), String.class);
|
|
269
|
264
|
JSONObject jsonObject = JSON.parseObject(forEntity.getBody());
|
|
270
|
265
|
BasicsWarehouse ware = JSONObject.toJavaObject(jsonObject, BasicsWarehouse.class);
|
|
271
|
|
-// BasicsWarehouse ware = systemFeign.getByIdHouse(processAudit.getHouseId());
|
|
272
|
266
|
if (null != ware) {
|
|
273
|
267
|
processAudit.setHouseName(ware.gethName());
|
|
274
|
268
|
}
|
|
|
@@ -276,7 +270,6 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
276
|
270
|
ResponseEntity<String> userInfos = restTemplate.getForEntity(MyConstant.SYSTEM_USER + processAudit.getApplyPeople(), String.class);
|
|
277
|
271
|
JSONObject jsonObjectuser = JSON.parseObject(userInfos.getBody());
|
|
278
|
272
|
SysUserPO userInfo = JSONObject.toJavaObject(jsonObjectuser, SysUserPO.class);
|
|
279
|
|
-// SysUserPO userInfo = systemFeign.getUserById(processAudit.getApplyPeople());
|
|
280
|
273
|
//赋值
|
|
281
|
274
|
if (null != userInfo) {
|
|
282
|
275
|
processAudit.setApplyName(userInfo.getPersonnelName());
|
|
|
@@ -534,20 +527,25 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
534
|
527
|
|
|
535
|
528
|
if (pageInfo.getTotal() > 0) {
|
|
536
|
529
|
for (ProcessAudit processAudit : pageInfo.getRecords()) {
|
|
537
|
|
- //根据仓房id获取仓房名称
|
|
538
|
|
- BasicsWarehouse ware = systemFeign.getByIdHouse(processAudit.getHouseId());
|
|
|
530
|
+ //根据仓房id获取仓房名称
|
|
|
531
|
+ ResponseEntity<String> forEntity = restTemplate.getForEntity(MyConstant.SYSTEM_WAREHOUSE + processAudit.getHouseId(), String.class);
|
|
|
532
|
+ JSONObject jsonObject = JSON.parseObject(forEntity.getBody());
|
|
|
533
|
+ BasicsWarehouse ware = JSONObject.toJavaObject(jsonObject, BasicsWarehouse.class);
|
|
539
|
534
|
if (null != ware) {
|
|
540
|
535
|
processAudit.setHouseName(ware.gethName());
|
|
541
|
536
|
}
|
|
542
|
537
|
//获取申请人的信息
|
|
543
|
|
- SysUserPO userInfo = systemFeign.getUserById(processAudit.getApplyPeople());
|
|
|
538
|
+ ResponseEntity<String> userInfos = restTemplate.getForEntity(MyConstant.SYSTEM_USER + processAudit.getApplyPeople(), String.class);
|
|
|
539
|
+ JSONObject jsonObjectuser = JSON.parseObject(userInfos.getBody());
|
|
|
540
|
+ SysUserPO userInfo = JSONObject.toJavaObject(jsonObjectuser, SysUserPO.class);
|
|
544
|
541
|
//赋值
|
|
545
|
542
|
if (null != userInfo) {
|
|
546
|
|
- processAudit.setApplyName(userInfo.getuName());
|
|
|
543
|
+ processAudit.setApplyName(userInfo.getPersonnelName());
|
|
547
|
544
|
processAudit.setCompanyName(userInfo.getCompanyName());
|
|
548
|
545
|
processAudit.setDepartmentName(userInfo.getDepartmentName());
|
|
549
|
546
|
}
|
|
550
|
547
|
|
|
|
548
|
+
|
|
551
|
549
|
}
|
|
552
|
550
|
}
|
|
553
|
551
|
|
|
|
@@ -586,20 +584,25 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
586
|
584
|
Page<ProcessAudit> pageInfo = processAuditMapper.selectPage(page, ew);
|
|
587
|
585
|
if (pageInfo.getTotal() > 0) {
|
|
588
|
586
|
for (ProcessAudit processAudit : pageInfo.getRecords()) {
|
|
589
|
|
- //根据仓房id获取仓房名称
|
|
590
|
|
- BasicsWarehouse ware = systemFeign.getByIdHouse(processAudit.getHouseId());
|
|
|
587
|
+ //根据仓房id获取仓房名称
|
|
|
588
|
+ ResponseEntity<String> forEntity = restTemplate.getForEntity(MyConstant.SYSTEM_WAREHOUSE + processAudit.getHouseId(), String.class);
|
|
|
589
|
+ JSONObject jsonObject = JSON.parseObject(forEntity.getBody());
|
|
|
590
|
+ BasicsWarehouse ware = JSONObject.toJavaObject(jsonObject, BasicsWarehouse.class);
|
|
591
|
591
|
if (null != ware) {
|
|
592
|
592
|
processAudit.setHouseName(ware.gethName());
|
|
593
|
593
|
}
|
|
594
|
594
|
//获取申请人的信息
|
|
595
|
|
- SysUserPO userInfo = systemFeign.getUserById(processAudit.getApplyPeople());
|
|
|
595
|
+ ResponseEntity<String> userInfos = restTemplate.getForEntity(MyConstant.SYSTEM_USER + processAudit.getApplyPeople(), String.class);
|
|
|
596
|
+ JSONObject jsonObjectuser = JSON.parseObject(userInfos.getBody());
|
|
|
597
|
+ SysUserPO userInfo = JSONObject.toJavaObject(jsonObjectuser, SysUserPO.class);
|
|
596
|
598
|
//赋值
|
|
597
|
599
|
if (null != userInfo) {
|
|
598
|
|
- processAudit.setApplyName(userInfo.getuName());
|
|
|
600
|
+ processAudit.setApplyName(userInfo.getPersonnelName());
|
|
599
|
601
|
processAudit.setCompanyName(userInfo.getCompanyName());
|
|
600
|
602
|
processAudit.setDepartmentName(userInfo.getDepartmentName());
|
|
601
|
603
|
}
|
|
602
|
604
|
|
|
|
605
|
+
|
|
603
|
606
|
}
|
|
604
|
607
|
}
|
|
605
|
608
|
return pageInfo;
|