Commit 0f6d039f authored by 竹天卫's avatar 竹天卫

产值计算优化

parent 2fcd9912
......@@ -1379,6 +1379,15 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.setProjectCode(project.getCode())
.setProjectName(project.getName());
}
//获取产值信息
QueryWrapper<NormProduction> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", 0);
queryWrapper.eq("status", 1);
List<NormProduction> normProduction = iNormProductionService.list(queryWrapper);
if (normProduction == null || normProduction.size() != 1) {
//还原本所编号最大值
return BaseResponse.errorMsg("请配置处理项的产值信息!");
}
/* //如果项目id或者项目编号为空,根据项目名称获取项目信息
if (StringUtils.isEmpty(entrust.getProjectCode())) {
ProjectVo projectVo = projectMapper.getByName(entrust.getProjectName());
......@@ -1455,18 +1464,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.setStatus(0)
.setAlias(handle.getName());
sampleHandleEnclosureMapper.insert(sampleHandleEnclosure);*/
//获取产值信息
QueryWrapper<NormProduction> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", 0);
queryWrapper.eq("status", 1);
List<NormProduction> normProduction = iNormProductionService.list(queryWrapper);
if (normProduction == null || normProduction.size() != 1) {
//评审未通过,删除评审后的样品
sampleMapper.deleteBatchIds(sampleList);
//还原本所编号最大值
redisUtil.setString("maxCementCode", redisMaxCementCode);
return BaseResponse.errorMsg("请配置处理项的产值信息!");
}
}
//消息推送
BaseResponse wrapper = userMessageService.sendMessage(sampleHandle.getUserId(), "您有一条样品处理信息等待处理", entrust.getId(), SysUserMessage.MessageType.ENTRUST);
......
......@@ -131,7 +131,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
throw new IllegalArgumentException("联系管理员.配置产值信息!");
}
preciprice.setAnalyseRate(BigDecimal.valueOf(normProduction.getAnalyseRate()));
preciprice.setAssessRate(BigDecimal.valueOf(normProduction.getAssessId()));
preciprice.setAssessRate(BigDecimal.valueOf(normProduction.getAssessRate()));
preciprice.setAssessValue(BigDecimal.valueOf(normProduction.getAssessValue()));
preciprice.setReportedAnalyseResult(BigDecimal.valueOf(normProduction.getReportedAnalyseResult()));
preciprice.setReportedResultRate(BigDecimal.valueOf(normProduction.getReportedResultRate()));
......@@ -323,7 +323,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
if (!BeanUtil.isEmpty(userId)) {
qw.eq("user_id", userId);
}
qw.eq("status", 1);
// qw.eq("status", 1);
qw.orderByDesc("create_time");
List<Preciprice> list = this.list(qw);
List<NormProduction.NormProductionUserDetail> rts = new ArrayList<>(list.size());
......@@ -408,7 +408,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
if (!BeanUtil.isEmpty(userId)) {
qw.eq("user_id", userId);
}
qw.eq("status", 1);
// qw.eq("status", 1);
qw.orderByDesc("create_time");
List<Preciprice> list = this.list(qw);
List<NormProduction.NormProductionUserDetail> rts = new ArrayList<>(list.size());
......@@ -570,7 +570,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
}else{
qw.eq("target_id", objId);
}
qw.eq("status", 1);
// qw.eq("status", 1);
qw.orderByDesc("create_time");
List<Preciprice> list = this.list(qw);
List<NormProduction.NormProductionDetail> rts = new ArrayList<>(list.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment