|
@@ -91,24 +91,32 @@ public class ZhcxPmqManagementRecoredServiceImpl extends ServiceImpl<ZhcxPmqMana
|
|
|
return R.ok("暂无需要派单");
|
|
|
}
|
|
|
// 第三层数据
|
|
|
- List<ZhcxPmqManagementDistributionDetailDo> detailDos = new ArrayList<>();
|
|
|
+ //List<ZhcxPmqManagementDistributionDetailDo> detailDos = new ArrayList<>();
|
|
|
for (ZhcxPmqManagementDistributionDo distribution : distributions) {
|
|
|
- distribution.setId(SecurityUtil.getUUID());
|
|
|
+ //distribution.setId(SecurityUtil.getUUID());
|
|
|
distribution.setConfirmerid(currentUser.getId());
|
|
|
distribution.setConfirmer(currentUser.getName());
|
|
|
distribution.setStatus(closestatus);
|
|
|
+ if(StringUtils.isEmpty(distribution.getId())){
|
|
|
+ distribution.setId(SecurityUtil.getUUID());
|
|
|
+ zhcxPmqManagementDistributionService.save(distribution);
|
|
|
+ }else {
|
|
|
+ zhcxPmqManagementDistributionService.updateById(distribution);
|
|
|
+ }
|
|
|
// 生成第三层数据结构
|
|
|
ZhcxPmqManagementDistributionDetailDo detailDo = new ZhcxPmqManagementDistributionDetailDo();
|
|
|
BeanUtil.copyProperties(distribution,detailDo);
|
|
|
detailDo.setId(SecurityUtil.getUUID());
|
|
|
detailDo.setDistributid(distribution.getId());
|
|
|
detailDo.setClosedata(new Date());
|
|
|
- detailDos.add(detailDo);
|
|
|
+ zhcxPmqManagementDistributionDetailService.save(detailDo);
|
|
|
+ //detailDos.add(detailDo);
|
|
|
}
|
|
|
// 保存2.5层
|
|
|
- zhcxPmqManagementDistributionService.saveBatch(distributions);
|
|
|
+ //zhcxPmqManagementDistributionService.saveBatch(distributions);
|
|
|
// 保存第三层数据
|
|
|
- zhcxPmqManagementDistributionDetailService.saveBatch(detailDos);
|
|
|
+ //zhcxPmqManagementDistributionDetailService.saveBatch(detailDos);
|
|
|
+
|
|
|
// 更新第二层的派单状态
|
|
|
//zhcxPmqManagementDistributionDao.updateDispatchStatus(id);
|
|
|
ZhcxPmqManagementRecoredDo recoredDo = this.getById(id);
|
|
@@ -234,7 +242,7 @@ public class ZhcxPmqManagementRecoredServiceImpl extends ServiceImpl<ZhcxPmqMana
|
|
|
|
|
|
@Override
|
|
|
public R getListData(String id) {
|
|
|
- List<ZhcxPmqManagementDistributionDo> distributions = getDistributionDataByPid(id);
|
|
|
+ List<ZhcxPmqManagementDistributionDo> distributions = baseMapper.getDistributionsByPid(id);
|
|
|
Map<String, Object> results = new HashMap<>();
|
|
|
results.put("records",distributions);
|
|
|
results.put("current",1);
|
|
@@ -247,7 +255,7 @@ public class ZhcxPmqManagementRecoredServiceImpl extends ServiceImpl<ZhcxPmqMana
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 构建2.5层三单数据(已保存) 不调用sqlserver查询机台状态
|
|
|
+ * 构建2.5层三单数据(已保存) 不调用sqlserver查询机台状态 (傻狗操作)
|
|
|
* @param id record_id
|
|
|
* @return 集合
|
|
|
*/
|
|
@@ -423,7 +431,7 @@ public class ZhcxPmqManagementRecoredServiceImpl extends ServiceImpl<ZhcxPmqMana
|
|
|
String[] idSplit = id.split(",");
|
|
|
for (String recordId : idSplit) {
|
|
|
// 执行第2.5层保存操作
|
|
|
- getDistributionDataByPid(recordId);
|
|
|
+ //getDistributionDataByPid(recordId);
|
|
|
}
|
|
|
// 查询组装
|
|
|
|