|
|
|
|
@ -3,23 +3,19 @@ package org.springblade.lims.service.impl; |
|
|
|
|
import cn.afterturn.easypoi.entity.ImageEntity; |
|
|
|
|
import cn.afterturn.easypoi.word.WordExportUtil; |
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
import com.alibaba.nacos.common.utils.CollectionUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.NoArgsConstructor; |
|
|
|
|
import org.apache.commons.lang3.RandomUtils; |
|
|
|
|
import org.apache.poi.xwpf.usermodel.XWPFDocument; |
|
|
|
|
import org.checkerframework.checker.units.qual.A; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.lims.entry.*; |
|
|
|
|
import org.springblade.lims.excel.ExamineTemplate2Excel; |
|
|
|
|
import org.springblade.lims.excel.PCR2Excel; |
|
|
|
|
import org.springblade.lims.excel.PCRExcel; |
|
|
|
|
import org.springblade.lims.mapper.EntrustMapper; |
|
|
|
|
import org.springblade.lims.service.*; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.resource.enums.SysTypeEnum; |
|
|
|
|
import org.springblade.resource.feign.IMessageClient; |
|
|
|
|
import org.springblade.system.cache.DictBizCache; |
|
|
|
|
import org.springblade.system.enums.DictBizEnum; |
|
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
|
@ -130,160 +126,159 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public Entrust addEntrust(Entrust entrust) { |
|
|
|
|
// 如果不是追加检测项目走if内
|
|
|
|
|
if (entrust.getOperatType() == null || !"1".equals(entrust.getOperatType())) { |
|
|
|
|
long id = RandomUtils.nextLong(); |
|
|
|
|
// 送检单位
|
|
|
|
|
Long entrustCustomerId = entrust.getEntrustCustomerId(); |
|
|
|
|
String entrustCustomerName = entrust.getEntrustCustomerName(); |
|
|
|
|
EntrustCustomer byId = customerService.getById(entrustCustomerId); |
|
|
|
|
if (byId != null) { |
|
|
|
|
entrust.setEntrustCustomerName(byId.getName()); |
|
|
|
|
} else { |
|
|
|
|
EntrustCustomer customer = new EntrustCustomer(); |
|
|
|
|
customer.setFullName(entrust.getSubmittedBy()); |
|
|
|
|
customer.setName(entrust.getEntrustCustomerName()); |
|
|
|
|
customer.setEmail(entrust.getPostalCode()); |
|
|
|
|
customer.setFax(entrust.getFacsimile()); |
|
|
|
|
customer.setPhone(entrust.getPhone()); |
|
|
|
|
customer.setStatus(1); |
|
|
|
|
customer.setId(RandomUtils.nextLong()); |
|
|
|
|
customerService.save(customer); |
|
|
|
|
} |
|
|
|
|
// 采样单位
|
|
|
|
|
EntrustCustomer byId1 = customerService.getById(entrust.getTakeCompanyId()); |
|
|
|
|
if (byId1 != null) { |
|
|
|
|
entrust.setTakeCompany(byId1.getName()); |
|
|
|
|
} else { |
|
|
|
|
EntrustCustomer customer = new EntrustCustomer(); |
|
|
|
|
customer.setFullName(entrust.getTakePerson()); |
|
|
|
|
customer.setName(entrust.getTakeCompany()); |
|
|
|
|
customer.setAddress(entrust.getTakeCompanyAddress()); |
|
|
|
|
customer.setPhone(entrust.getTakePhone()); |
|
|
|
|
customer.setStatus(2); |
|
|
|
|
customer.setId(RandomUtils.nextLong()); |
|
|
|
|
customerService.save(customer); |
|
|
|
|
} |
|
|
|
|
// 如果是追加检测项目
|
|
|
|
|
if (entrust.getOperatType() != null && "1".equals(entrust.getOperatType())) { |
|
|
|
|
entrust.setEntrustStatus("2.1"); |
|
|
|
|
this.updateById(entrust); |
|
|
|
|
return entrust; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 样品关联表入库
|
|
|
|
|
List<SimpleRel> rels = new ArrayList<>(); |
|
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
|
int year = now.getYear(); |
|
|
|
|
String month1; |
|
|
|
|
int month = now.getMonthValue(); |
|
|
|
|
String day1; |
|
|
|
|
int day = now.getDayOfMonth(); |
|
|
|
|
String hour1; |
|
|
|
|
int hour = now.getHour(); |
|
|
|
|
|
|
|
|
|
if (month < 10) { |
|
|
|
|
month1 = "0" + month; |
|
|
|
|
} else { |
|
|
|
|
month1 = "" + month; |
|
|
|
|
} |
|
|
|
|
if (day < 10) { |
|
|
|
|
day1 = "0" + day; |
|
|
|
|
} else { |
|
|
|
|
day1 = "" + day; |
|
|
|
|
} |
|
|
|
|
if (hour < 10) { |
|
|
|
|
hour1 = "0" + hour; |
|
|
|
|
} else { |
|
|
|
|
hour1 = "" + hour; |
|
|
|
|
} |
|
|
|
|
// 检测编号前缀
|
|
|
|
|
String[] strings = entrust.getAcceptanceNum().split("-"); |
|
|
|
|
String s = strings[1] + year + month1 + day1 + hour1 + "-"; |
|
|
|
|
|
|
|
|
|
StringBuilder simpleName = new StringBuilder(); |
|
|
|
|
Integer simpleCount = 0; |
|
|
|
|
List<Map<String, Object>> list = entrust.getSimpleNames(); |
|
|
|
|
|
|
|
|
|
// 样品排序
|
|
|
|
|
int sort = 1; |
|
|
|
|
for (Map<String, Object> map : list) { |
|
|
|
|
// 样品名称
|
|
|
|
|
String name = (String) map.get("simpleName"); |
|
|
|
|
simpleName.append(name).append(","); |
|
|
|
|
// 样品数量
|
|
|
|
|
Integer count = (Integer) map.get("simpleCount"); |
|
|
|
|
simpleCount += count; |
|
|
|
|
// 原始编号
|
|
|
|
|
String num = (String) map.get("originalNum"); |
|
|
|
|
String[] split = num.split("-"); |
|
|
|
|
int a = Integer.parseInt(split[0]); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < count; i++) { |
|
|
|
|
SimpleRel simpleRel = new SimpleRel(); |
|
|
|
|
if (entrust.getId() != null) { |
|
|
|
|
simpleRel.setEntrustId(entrust.getId()); |
|
|
|
|
} else { |
|
|
|
|
simpleRel.setEntrustId(id); |
|
|
|
|
} |
|
|
|
|
simpleRel.setSimpleName(name); |
|
|
|
|
simpleRel.setReagentNum(1); |
|
|
|
|
simpleRel.setReagentExperieNum(s + ((a - 1) * 2 + i + 1 + count)); |
|
|
|
|
simpleRel.setExamineNum(1); |
|
|
|
|
simpleRel.setExamineExperieNum(s + ((a - 1) * 2 + i + 1)); |
|
|
|
|
simpleRel.setRecessiveNum((i + a) + ""); |
|
|
|
|
simpleRel.setOriginalNum((i + a) + ""); |
|
|
|
|
simpleRel.setStatus(0); |
|
|
|
|
simpleRel.setSort(sort); |
|
|
|
|
rels.add(simpleRel); |
|
|
|
|
} |
|
|
|
|
sort++; |
|
|
|
|
} |
|
|
|
|
simpleRelService.saveBatch(rels); |
|
|
|
|
|
|
|
|
|
// 委托单入库/修改
|
|
|
|
|
if (entrust.getSampleReceiverId() != null) { |
|
|
|
|
R<User> userR = userClient.userInfoById(Long.valueOf(entrust.getSampleReceiverId())); |
|
|
|
|
User data = userR.getData(); |
|
|
|
|
if (data != null) { |
|
|
|
|
entrust.setSampleReceiverName(data.getName()); |
|
|
|
|
long id = RandomUtils.nextLong(); |
|
|
|
|
|
|
|
|
|
// 送检单位、采样单位之类的,如果没有就新增
|
|
|
|
|
addIfNull(entrust); |
|
|
|
|
|
|
|
|
|
// 样品关联表入库
|
|
|
|
|
List<SimpleRel> rels = new ArrayList<>(); |
|
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
|
|
|
|
|
|
String month1 = fullByZero(now.getMonthValue()); |
|
|
|
|
String day1 = fullByZero(now.getDayOfMonth()); |
|
|
|
|
String hour1 = fullByZero(now.getHour()); |
|
|
|
|
|
|
|
|
|
// 检测编号前缀
|
|
|
|
|
String[] strings = entrust.getAcceptanceNum().split("-"); |
|
|
|
|
String s = strings[1] + now.getYear() + month1 + day1 + hour1 + "-"; |
|
|
|
|
|
|
|
|
|
StringBuilder simpleName = new StringBuilder(); |
|
|
|
|
Integer simpleCount = 0; |
|
|
|
|
List<Map<String, Object>> list = entrust.getSimpleNames(); |
|
|
|
|
|
|
|
|
|
// 样品排序
|
|
|
|
|
int sort = 1; |
|
|
|
|
for (Map<String, Object> map : list) { |
|
|
|
|
// 样品名称
|
|
|
|
|
String name = (String) map.get("simpleName"); |
|
|
|
|
simpleName.append(name).append(","); |
|
|
|
|
// 样品数量
|
|
|
|
|
Integer count = (Integer) map.get("simpleCount"); |
|
|
|
|
simpleCount += count; |
|
|
|
|
// 原始编号
|
|
|
|
|
String num = (String) map.get("originalNum"); |
|
|
|
|
String[] split = num.split("-"); |
|
|
|
|
int a = Integer.parseInt(split[0]); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < count; i++) { |
|
|
|
|
SimpleRel simpleRel = new SimpleRel(); |
|
|
|
|
if (entrust.getId() != null) { |
|
|
|
|
simpleRel.setEntrustId(entrust.getId()); |
|
|
|
|
} else { |
|
|
|
|
simpleRel.setEntrustId(id); |
|
|
|
|
} |
|
|
|
|
simpleRel.setSimpleName(name); |
|
|
|
|
simpleRel.setReagentNum(1); |
|
|
|
|
simpleRel.setReagentExperieNum(s + ((a - 1) * 2 + i + 1 + count)); |
|
|
|
|
simpleRel.setExamineNum(1); |
|
|
|
|
simpleRel.setExamineExperieNum(s + ((a - 1) * 2 + i + 1)); |
|
|
|
|
simpleRel.setRecessiveNum((i + a) + ""); |
|
|
|
|
simpleRel.setOriginalNum((i + a) + ""); |
|
|
|
|
simpleRel.setStatus(0); |
|
|
|
|
simpleRel.setSort(sort); |
|
|
|
|
rels.add(simpleRel); |
|
|
|
|
} |
|
|
|
|
entrust.setSimpleName(simpleName.toString()); |
|
|
|
|
entrust.setSimpleCount(simpleCount); |
|
|
|
|
String originalNum = ""; |
|
|
|
|
if (simpleCount > 9) { |
|
|
|
|
originalNum = "01-" + simpleCount; |
|
|
|
|
} else { |
|
|
|
|
originalNum = "01-0" + simpleCount; |
|
|
|
|
} |
|
|
|
|
String s1 = JSON.toJSONString(entrust.getSimpleNames()); |
|
|
|
|
entrust.setSimpleJson(s1); |
|
|
|
|
entrust.setOriginalNum(originalNum); |
|
|
|
|
entrust.setIsDeleted(0); |
|
|
|
|
entrust.setCreateUser(null); |
|
|
|
|
entrust.setCreateTime(new Date()); |
|
|
|
|
entrust.setUpdateTime(new Date()); |
|
|
|
|
entrust.setUpdateUser(null); |
|
|
|
|
entrust.setEntrustStatus("1"); |
|
|
|
|
// 是否为合同新增委托单
|
|
|
|
|
if (entrust.getContractId() != null) { |
|
|
|
|
entrust.setEntrustType(2); |
|
|
|
|
Contract contract = new Contract(); |
|
|
|
|
contract.setId(entrust.getContractId()); |
|
|
|
|
contract.setStatus(2); |
|
|
|
|
contractService.updateById(contract); |
|
|
|
|
} else { |
|
|
|
|
entrust.setEntrustType(1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrust.getId() != null) { |
|
|
|
|
this.updateById(entrust); |
|
|
|
|
} else { |
|
|
|
|
entrust.setId(id); |
|
|
|
|
this.save(entrust); |
|
|
|
|
sort++; |
|
|
|
|
} |
|
|
|
|
simpleRelService.saveBatch(rels); |
|
|
|
|
|
|
|
|
|
// 委托单入库/修改
|
|
|
|
|
if (entrust.getSampleReceiverId() != null) { |
|
|
|
|
R<User> userR = userClient.userInfoById(Long.valueOf(entrust.getSampleReceiverId())); |
|
|
|
|
User data = userR.getData(); |
|
|
|
|
if (data != null) { |
|
|
|
|
entrust.setSampleReceiverName(data.getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
entrust.setSimpleName(simpleName.toString()); |
|
|
|
|
entrust.setSimpleCount(simpleCount); |
|
|
|
|
String originalNum = ""; |
|
|
|
|
if (simpleCount > 9) { |
|
|
|
|
originalNum = "01-" + simpleCount; |
|
|
|
|
} else { |
|
|
|
|
entrust.setEntrustStatus("2.1"); |
|
|
|
|
originalNum = "01-0" + simpleCount; |
|
|
|
|
} |
|
|
|
|
String s1 = JSON.toJSONString(entrust.getSimpleNames()); |
|
|
|
|
entrust.setSimpleJson(s1); |
|
|
|
|
entrust.setOriginalNum(originalNum); |
|
|
|
|
entrust.setIsDeleted(0); |
|
|
|
|
entrust.setCreateUser(null); |
|
|
|
|
entrust.setCreateTime(new Date()); |
|
|
|
|
entrust.setUpdateTime(new Date()); |
|
|
|
|
entrust.setUpdateUser(null); |
|
|
|
|
entrust.setEntrustStatus("1"); |
|
|
|
|
// 是否为合同新增委托单
|
|
|
|
|
if (entrust.getContractId() != null) { |
|
|
|
|
entrust.setEntrustType(2); |
|
|
|
|
Contract contract = new Contract(); |
|
|
|
|
contract.setId(entrust.getContractId()); |
|
|
|
|
contract.setStatus(2); |
|
|
|
|
contractService.updateById(contract); |
|
|
|
|
} else { |
|
|
|
|
entrust.setEntrustType(1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (entrust.getId() != null) { |
|
|
|
|
this.updateById(entrust); |
|
|
|
|
} else { |
|
|
|
|
entrust.setId(id); |
|
|
|
|
this.save(entrust); |
|
|
|
|
} |
|
|
|
|
// 新增或修改 检测集合
|
|
|
|
|
addOrUpdateExamines(entrust.getExamines(), entrust.getId()); |
|
|
|
|
return entrust; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 如果有就取用,没有就新增 |
|
|
|
|
* 有共同点,待抽 |
|
|
|
|
*/ |
|
|
|
|
private void addIfNull(Entrust entrust) { |
|
|
|
|
// 送检单位
|
|
|
|
|
EntrustCustomer byId = customerService.getById(entrust.getEntrustCustomerId()); |
|
|
|
|
if (byId != null) { |
|
|
|
|
entrust.setEntrustCustomerName(byId.getName()); |
|
|
|
|
} else { |
|
|
|
|
EntrustCustomer customer = new EntrustCustomer(); |
|
|
|
|
customer.setStatus(1); |
|
|
|
|
customer.setPhone(entrust.getPhone()); |
|
|
|
|
customer.setId(RandomUtils.nextLong()); |
|
|
|
|
customer.setFax(entrust.getFacsimile()); |
|
|
|
|
customer.setEmail(entrust.getPostalCode()); |
|
|
|
|
customer.setFullName(entrust.getSubmittedBy()); |
|
|
|
|
customer.setName(entrust.getEntrustCustomerName()); |
|
|
|
|
customerService.save(customer); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 采样单位
|
|
|
|
|
EntrustCustomer byId1 = customerService.getById(entrust.getTakeCompanyId()); |
|
|
|
|
if (byId1 != null) { |
|
|
|
|
entrust.setTakeCompany(byId1.getName()); |
|
|
|
|
} else { |
|
|
|
|
EntrustCustomer customer = new EntrustCustomer(); |
|
|
|
|
customer.setStatus(2); |
|
|
|
|
customer.setId(RandomUtils.nextLong()); |
|
|
|
|
customer.setPhone(entrust.getTakePhone()); |
|
|
|
|
customer.setName(entrust.getTakeCompany()); |
|
|
|
|
customer.setFullName(entrust.getTakePerson()); |
|
|
|
|
customer.setAddress(entrust.getTakeCompanyAddress()); |
|
|
|
|
customerService.save(customer); |
|
|
|
|
} |
|
|
|
|
// 委托单对应检测
|
|
|
|
|
List<Examine> examines = entrust.getExamines(); |
|
|
|
|
if (examines != null && examines.size() > 0) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 新增或修改检验集合 |
|
|
|
|
*/ |
|
|
|
|
private void addOrUpdateExamines(List<Examine> examines, Long entrustId) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(examines)) { |
|
|
|
|
List<Examine> saveList = new ArrayList<>(); |
|
|
|
|
List<Examine> updateList = new ArrayList<>(); |
|
|
|
|
for (int i = 0; i < examines.size(); i++) { |
|
|
|
|
@ -291,40 +286,53 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
if (examine.getId() != null) { |
|
|
|
|
updateList.add(examine); |
|
|
|
|
} else { |
|
|
|
|
examine.setExamineOrder(i + 1); |
|
|
|
|
examine.setEntrustId(entrust.getId()); |
|
|
|
|
examine.setExperieNum(""); |
|
|
|
|
examine.setStatus(0); |
|
|
|
|
examine.setIsDeleted(0); |
|
|
|
|
examine.setSimpleCount(0); |
|
|
|
|
// examine.setSimpleName(entrust.getSimpleName());
|
|
|
|
|
examine.setExperieNum(""); |
|
|
|
|
examine.setExamineOrder(i + 1); |
|
|
|
|
examine.setEntrustId(entrustId); |
|
|
|
|
examine.setCreateTime(new Date()); |
|
|
|
|
examine.setUpdateTime(new Date()); |
|
|
|
|
saveList.add(examine); |
|
|
|
|
} |
|
|
|
|
if (examine.getExamineItemId() != null) { |
|
|
|
|
ExamineItem examineItem = examineItemService.getById(examine.getExamineItemId()); |
|
|
|
|
Integer useCount = examineItem.getUseCount(); |
|
|
|
|
examineItem.setUseCount(++useCount); |
|
|
|
|
examineItemService.updateById(examineItem); |
|
|
|
|
} |
|
|
|
|
if (examine.getExamineWayId() != null) { |
|
|
|
|
ExamineWay examineWay = examineWayService.getById(examine.getExamineWayId()); |
|
|
|
|
Integer useCount = examineWay.getUseCount(); |
|
|
|
|
examineWay.setUseCount(++useCount); |
|
|
|
|
examineWayService.updateById(examineWay); |
|
|
|
|
} |
|
|
|
|
if (examine.getExamineBasisId() != null) { |
|
|
|
|
ExamineBasis examineBasis = examineBasisService.getById(examine.getExamineBasisId()); |
|
|
|
|
Integer useCount = examineBasis.getUseCount(); |
|
|
|
|
examineBasis.setUseCount(++useCount); |
|
|
|
|
examineBasisService.updateById(examineBasis); |
|
|
|
|
} |
|
|
|
|
// 使用次数 +1 操作
|
|
|
|
|
addUseCount(1, examine.getExamineItemId()); |
|
|
|
|
addUseCount(2, examine.getExamineWayId()); |
|
|
|
|
addUseCount(3, examine.getExamineBasisId()); |
|
|
|
|
} |
|
|
|
|
examineService.saveBatch(saveList); |
|
|
|
|
examineService.updateBatchById(updateList); |
|
|
|
|
} |
|
|
|
|
return entrust; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void addUseCount(int type, Long elementId) { |
|
|
|
|
if (elementId == null) { return; } |
|
|
|
|
if (type == 1) { |
|
|
|
|
ExamineItem examineItem = examineItemService.getById(elementId); |
|
|
|
|
Integer useCount = examineItem.getUseCount(); |
|
|
|
|
examineItem.setUseCount(++ useCount); |
|
|
|
|
examineItemService.updateById(examineItem); |
|
|
|
|
} |
|
|
|
|
if (type == 2) { |
|
|
|
|
ExamineWay examineWay = examineWayService.getById(elementId); |
|
|
|
|
Integer useCount = examineWay.getUseCount(); |
|
|
|
|
examineWay.setUseCount(++useCount); |
|
|
|
|
examineWayService.updateById(examineWay); |
|
|
|
|
} |
|
|
|
|
if (type == 3) { |
|
|
|
|
ExamineBasis examineBasis = examineBasisService.getById(elementId); |
|
|
|
|
Integer useCount = examineBasis.getUseCount(); |
|
|
|
|
examineBasis.setUseCount(++useCount); |
|
|
|
|
examineBasisService.updateById(examineBasis); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 工具类: 补0 |
|
|
|
|
*/ |
|
|
|
|
private String fullByZero(int i) { |
|
|
|
|
return i < 10 ? "0" + i : String.valueOf(i); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@ -336,7 +344,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
LambdaQueryWrapper<Examine> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper.eq(Examine::getEntrustId, id); |
|
|
|
|
List<Examine> examineList = examineService.list(wrapper); |
|
|
|
|
if (examineList != null && examineList.size() > 0) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(examineList)) { |
|
|
|
|
for (Examine examine : examineList) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
//检测项目
|
|
|
|
|
@ -467,12 +475,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
//检测数据
|
|
|
|
|
List<Examine> examineList = new ArrayList<>(); |
|
|
|
|
ExamineResult examineResult = null; |
|
|
|
|
if (eTaskList != null && eTaskList.size() > 0) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(eTaskList)) { |
|
|
|
|
eTaskList.forEach(item -> { |
|
|
|
|
QueryWrapper<Examine> examineQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
examineQueryWrapper.eq("e_task_id", item.getId()); |
|
|
|
|
List<Examine> list1 = examineService.list(examineQueryWrapper); |
|
|
|
|
if (list1 != null && list1.size() > 0) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(list1)) { |
|
|
|
|
for (Examine examine : list1) { |
|
|
|
|
examineList.add(examine); |
|
|
|
|
} |
|
|
|
|
@ -1522,7 +1530,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
wrapper.eq(Simple::getEntrustId, id); |
|
|
|
|
wrapper.eq(Simple::getIsReagent, "1"); |
|
|
|
|
List<Simple> simples = simpleService.list(wrapper); |
|
|
|
|
if (simples != null && simples.size() > 0) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(simples)) { |
|
|
|
|
for (Simple simple : simples) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("originalNum", simple.getOriginalNum()); |
|
|
|
|
@ -1600,7 +1608,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
keyValueList.add(temp); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (keyValueList != null && keyValueList.size() > 0) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(keyValueList)) { |
|
|
|
|
if (keyValueList.size() % 2 == 0) { |
|
|
|
|
for (int i = 0; i < keyValueList.size() / 2; i++) { |
|
|
|
|
Map<String, Object> row = new HashMap<>(); |
|
|
|
|
@ -1754,7 +1762,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
queryWrapper.eq(Examine::getEntrustId, id); |
|
|
|
|
queryWrapper.eq(Examine::getDeptId, deptId); |
|
|
|
|
List<Examine> examineList = examineService.list(queryWrapper); |
|
|
|
|
if (examineList != null && examineList.size() > 0) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(examineList)) { |
|
|
|
|
for (Examine examine : examineList) { |
|
|
|
|
map.put("simpleName", examine.getSimpleName()); |
|
|
|
|
map.put("simpleCount", examine.getSimpleCount()); |
|
|
|
|
@ -1841,7 +1849,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
// position1
|
|
|
|
|
wrapper.eq(Simple::getIsReagent, "1"); |
|
|
|
|
List<Simple> simpleList = simpleService.list(wrapper); |
|
|
|
|
if (simpleList != null && simpleList.size() > 0) { |
|
|
|
|
if (CollectionUtils.isNotEmpty(simpleList)) { |
|
|
|
|
for (Simple simple : simpleList) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("experieNum", simple.getExperieNum()); |
|
|
|
|
|