Browse Source

为出入库添加申请人部门

lwx_dev
erdanergou 3 years ago
parent
commit
6770913079
  1. 6
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  2. 6
      src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java
  3. 19
      src/main/java/com/dreamchaser/depository_manage/service/impl/StockTakingServiceImpl.java

6
src/main/java/com/dreamchaser/depository_manage/controller/PageController.java

@ -2045,7 +2045,7 @@ public class PageController {
recordP.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(recordP.getApplicantTime()))); recordP.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(recordP.getApplicantTime())));
recordP.setDepartmentheadTime(DateUtil.TimeStampToDateTime(Long.valueOf(recordP.getDepartmentheadTime()))); recordP.setDepartmentheadTime(DateUtil.TimeStampToDateTime(Long.valueOf(recordP.getDepartmentheadTime())));
recordP.setDepositoryManagerName(depositoryManagerNames.toString()); recordP.setDepositoryManagerName(depositoryManagerNames.toString());
recordP.setApplicantName(userByPort.getName()); recordP.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName());
recordP.setDepartmentheadName(departmentHeadName.toString()); recordP.setDepartmentheadName(departmentHeadName.toString());
recordP.setDepositoryName(depositoryName.toString()); recordP.setDepositoryName(depositoryName.toString());
recordP.setQuantity(sumQuantity); recordP.setQuantity(sumQuantity);
@ -2193,7 +2193,7 @@ public class PageController {
if (Integer.compare(flagForGroup, 2) != 0) { if (Integer.compare(flagForGroup, 2) != 0) {
// 如果不是组合 // 如果不是组合
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationInRecordPById.getApplicantId(), userKey, token); UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationInRecordPById.getApplicantId(), userKey, token);
applicationInRecordPById.setApplicantName(userByPort.getName()); applicationInRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName());
applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationInRecordPById.getApplicantTime()))); applicationInRecordPById.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationInRecordPById.getApplicantTime())));
if (applicationInRecordPById.getPrice() != null) { if (applicationInRecordPById.getPrice() != null) {
applicationInRecordPById.setPrice(applicationInRecordPById.getPrice() / 100); applicationInRecordPById.setPrice(applicationInRecordPById.getPrice() / 100);
@ -3654,7 +3654,7 @@ public class PageController {
ApplicationOutRecordMinP applicationOutMinById = depositoryRecordService.findApplicationOutMinById(minRecordId); ApplicationOutRecordMinP applicationOutMinById = depositoryRecordService.findApplicationOutMinById(minRecordId);
ApplicationOutRecordP applicationOutRecordPById = depositoryRecordService.findApplicationOutRecordPById(applicationOutMinById.getParentId()); ApplicationOutRecordP applicationOutRecordPById = depositoryRecordService.findApplicationOutRecordPById(applicationOutMinById.getParentId());
UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationOutRecordPById.getApplicantId(), userKey, token); UserByPort userByPort = LinkInterfaceUtil.FindUserById(applicationOutRecordPById.getApplicantId(), userKey, token);
applicationOutRecordPById.setApplicantName(userByPort.getName()); applicationOutRecordPById.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName());
SimpleTaskP simpleTaskP = new SimpleTaskP(applicationOutRecordPById, applicationOutMinById); SimpleTaskP simpleTaskP = new SimpleTaskP(applicationOutRecordPById, applicationOutMinById);
list.add(simpleTaskP); list.add(simpleTaskP);
} }

6
src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java

@ -473,6 +473,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
/** /**
* 计算出库物料总数 * 计算出库物料总数
*
* @param state * @param state
* @return * @return
*/ */
@ -5082,7 +5083,8 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
SimpleApplicationOutOrInRecordP d = new SimpleApplicationOutOrInRecordP(record); SimpleApplicationOutOrInRecordP d = new SimpleApplicationOutOrInRecordP(record);
UserByPort userByPort = LinkInterfaceUtil.FindUserById(record.getApplicantId(), userKey, token); UserByPort userByPort = LinkInterfaceUtil.FindUserById(record.getApplicantId(), userKey, token);
d.setApplyRemark(d.getApplyRemark() == null ? "" : d.getApplyRemark()); d.setApplyRemark(d.getApplyRemark() == null ? "" : d.getApplyRemark());
d.setApplicantName(userByPort.getName()); d.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName());
result.add(d); result.add(d);
} }
return result; return result;
@ -5094,7 +5096,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
SimpleApplicationOutOrInRecordP d = new SimpleApplicationOutOrInRecordP(record); SimpleApplicationOutOrInRecordP d = new SimpleApplicationOutOrInRecordP(record);
UserByPort userByPort = LinkInterfaceUtil.FindUserById(record.getApplicantId(), userKey, token); UserByPort userByPort = LinkInterfaceUtil.FindUserById(record.getApplicantId(), userKey, token);
d.setApplyRemark(d.getApplyRemark() == null ? "" : d.getApplyRemark()); d.setApplyRemark(d.getApplyRemark() == null ? "" : d.getApplyRemark());
d.setApplicantName(userByPort.getName()); d.setApplicantName(userByPort.getMaindeparmentname() + "_" + userByPort.getName());
result.add(d); result.add(d);
} }
return result; return result;

19
src/main/java/com/dreamchaser/depository_manage/service/impl/StockTakingServiceImpl.java

@ -43,27 +43,20 @@ public class StockTakingServiceImpl implements StockTakingService {
@Autowired @Autowired
RedissonClient redissonClient; RedissonClient redissonClient;
@Autowired
private RedisPool redisPool;
@Autowired @Autowired
MaterialMapper materialMapper; MaterialMapper materialMapper;
@Autowired @Autowired
DepositoryRecordService depositoryRecordService; DepositoryRecordService depositoryRecordService;
@Autowired @Autowired
DepositoryRecordMapper depositoryRecordMapper; DepositoryRecordMapper depositoryRecordMapper;
@Autowired @Autowired
QyWxOperationService qyWxOperationService; QyWxOperationService qyWxOperationService;
@Autowired @Autowired
SplitUnitMapper splitUnitMapper; SplitUnitMapper splitUnitMapper;
@Autowired @Autowired
SplitUnitService splitUnitService; SplitUnitService splitUnitService;
@Autowired
private RedisPool redisPool;
/** /**
* 用于插入盘点记录主表 * 用于插入盘点记录主表
@ -265,7 +258,7 @@ public class StockTakingServiceImpl implements StockTakingService {
Depository depositoryRecordById = depositoryMapper.findDepositoryById(stockTaking.getDepositoryId()); Depository depositoryRecordById = depositoryMapper.findDepositoryById(stockTaking.getDepositoryId());
ssp.setDepositoryName(depositoryRecordById.getDname()); ssp.setDepositoryName(depositoryRecordById.getDname());
UserByPort userByPort = LinkInterfaceUtil.FindUserById(stockTaking.getOriginator(), userKey, token); UserByPort userByPort = LinkInterfaceUtil.FindUserById(stockTaking.getOriginator(), userKey, token);
ssp.setOriginatorName(userByPort.getName()); ssp.setOriginatorName(userByPort.getMaindeparmentname() + "_" + userByPort.getName());
stockTakingPS.add(ssp); stockTakingPS.add(ssp);
} }
return stockTakingPS; return stockTakingPS;
@ -1878,8 +1871,7 @@ public class StockTakingServiceImpl implements StockTakingService {
map.put("state", 1); map.put("state", 1);
} }
} } else {
else {
map.put("departmentManagerState", 2); map.put("departmentManagerState", 2);
map.put("completeTime", DateUtil.DateTimeToTimeStamp(simpleTime)); map.put("completeTime", DateUtil.DateTimeToTimeStamp(simpleTime));
map.put("state", 2); map.put("state", 2);
@ -1890,8 +1882,7 @@ public class StockTakingServiceImpl implements StockTakingService {
map.put("departmentManager", approver_user.getNumber()); map.put("departmentManager", approver_user.getNumber());
stockTakingMapper.updateStockTaking(map); stockTakingMapper.updateStockTaking(map);
return result; return result;
} } else {
else {
// 如果当前盘点记录已经审核过 // 如果当前盘点记录已经审核过
// 不做任何处理 // 不做任何处理

Loading…
Cancel
Save