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