Commit c10874a1 authored by 竹天卫's avatar 竹天卫

优化项目

parent 8d1caa3b
...@@ -311,6 +311,17 @@ public class EntrustController { ...@@ -311,6 +311,17 @@ public class EntrustController {
return BaseResponse.errorMsg("失败!"); return BaseResponse.errorMsg("失败!");
} }
@ApiOperation(value = "详情-委托客户查看基本信息")
@GetMapping("/getBaseDtailClient/{id}")
public BaseResponse getBaseDtailClient(@PathVariable Integer id) {
try {
return entrustService.getBaseDtailClient(id);
} catch (Exception e) {
log.debug("详情-委托客户查看基本信息{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "详情-样品处理信息") @ApiOperation(value = "详情-样品处理信息")
@GetMapping("/getSampleHandleDtail/{id}") @GetMapping("/getSampleHandleDtail/{id}")
public BaseResponse getSampleHandleDtail(@PathVariable Integer id) { public BaseResponse getSampleHandleDtail(@PathVariable Integer id) {
......
...@@ -106,6 +106,8 @@ public interface IEntrustService extends IService<Entrust> { ...@@ -106,6 +106,8 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse<EntrustVo> getBaseDtail(Integer id); BaseResponse<EntrustVo> getBaseDtail(Integer id);
BaseResponse<EntrustVo> getBaseDtailClient(Integer id);
BaseResponse<List<SampleHandleVo>> getSampleHandleDtail(Integer id); BaseResponse<List<SampleHandleVo>> getSampleHandleDtail(Integer id);
BaseResponse<List<SampleHandleEnclosureVo>> getSampleHandleDtailEnclosureList(Integer sampleHandleId); BaseResponse<List<SampleHandleEnclosureVo>> getSampleHandleDtailEnclosureList(Integer sampleHandleId);
......
...@@ -660,6 +660,63 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -660,6 +660,63 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
return BaseResponse.okData(entrustVo); return BaseResponse.okData(entrustVo);
} }
/**
* 委托客户查看基本信息
* @param id
* @return
*/
public BaseResponse<EntrustVo> getBaseDtailClient(Integer id) {
LoginUser loginUser = userService.getLoginUser();
if (loginUser == null) {
return BaseResponse.errorMsg("请登录账号");
}
if (id == null) {
return BaseResponse.errorMsg("参数错误");
}
EntrustVo entrustVo = entrustMapper.getDetail(id);
QueryWrapper<SampleTmp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("entrust_id", entrustVo.getId());
List<SampleTmp> sampleTmpList = sampleTmpService.list(queryWrapper);
List<SampleTmpVo> sampleTmpVoList = new ArrayList<>();
if (sampleTmpList != null && sampleTmpList.size() > 0) {
for (SampleTmp sampleTmp : sampleTmpList) {
SampleTmpVo sampleTmpVo = new SampleTmpVo();
BeanUtils.copyProperties(sampleTmp, sampleTmpVo);
String teamIds = sampleTmp.getTeamIds();
String teamName = "";
if (teamIds != null) {
String[] teamIdS = teamIds.split("、");
for (String teamId : teamIdS) {
Team team = teamMapper.selectById(Integer.valueOf(teamId));
if (team != null) {
team.getName();
teamName = teamName.equals("") ? team.getName() : (teamName + "、" + team.getName());
}
}
}
sampleTmpVo.setTeamName(teamName);
sampleTmpVoList.add(sampleTmpVo);
}
}
entrustVo.setSampleTmpList(sampleTmpVoList);
//查询报告,如果有上传的委托报告,用户可已进行下载
QueryWrapper<EntityEnclosure> wrapper = new QueryWrapper<>();
wrapper.eq("entity_type", EntityEnclosure.EntityType.ENTRUST_REPORT);
wrapper.eq("entity_id", entrustVo.getId());
wrapper.eq("is_deleted", 1);
List<EntityEnclosure> entityEnclosureList = entityEnclosureMapper.selectList(wrapper);
if(entityEnclosureList != null && entityEnclosureList.size()>0 ){
EntityEnclosure entityEnclosure = entityEnclosureList.get(0);
entrustVo.setAlias(entityEnclosure.getAlias());
entrustVo.setEnclosureUrl(entityEnclosure.getPdfUrl());
entrustVo.setExtName(entityEnclosure.getExtName());
}
return BaseResponse.okData(entrustVo);
}
/** /**
* 详情-样品处理信息 * 详情-样品处理信息
* *
...@@ -984,6 +1041,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -984,6 +1041,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
} }
//样品处理表 同一个样品多个相同处理项时 去重。 //样品处理表 同一个样品多个相同处理项时 去重。
if(handleVo != null && !handleIds.contains(handleVo.getId())){ if(handleVo != null && !handleIds.contains(handleVo.getId())){
//20201229修改 ,去重处理项id
handleIds.add(handleVo.getId());
SampleHandle sampleHandle = new SampleHandle(); SampleHandle sampleHandle = new SampleHandle();
sampleHandle.setSampleId(sample.getId()) sampleHandle.setSampleId(sample.getId())
.setUserId(handleVo.getUserId()) .setUserId(handleVo.getUserId())
...@@ -1658,6 +1717,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -1658,6 +1717,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
} }
distributionStatus = sdVo.getStatus() == 1 ? 1 : (sdVo.getStatus() == 2 ? 2 : 0); distributionStatus = sdVo.getStatus() == 1 ? 1 : (sdVo.getStatus() == 2 ? 2 : 0);
} }
//20201229 根据邹继远提出要求更改 如果为平行样时检测人员看到的本所编号就是平行样编号 是不一样的
sampleVo.setCementCode(sampleVo.getParallelCode());
//一个平行样样品 主样和副样不能为同一个用户检测 //一个平行样样品 主样和副样不能为同一个用户检测
sampleVoList.add(sampleVo); sampleVoList.add(sampleVo);
} }
......
...@@ -8,6 +8,7 @@ spring: ...@@ -8,6 +8,7 @@ spring:
datasource: datasource:
# 192.168.110.85 admin!@#123 # 192.168.110.85 admin!@#123
# url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false # url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://192.168.110.85:3306/sinoma_bangye?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root username: root
password: admin!@#123 password: admin!@#123
......
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