Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -96,7 +96,7 @@ public class CaseEventController {
|
|||||||
|
|
||||||
Entrustment one = entrustmentService.getOne(Wrappers.<Entrustment>lambdaQuery().eq(Entrustment::getCaseId, id));
|
Entrustment one = entrustmentService.getOne(Wrappers.<Entrustment>lambdaQuery().eq(Entrustment::getCaseId, id));
|
||||||
cevo.setEntrustmentType(one.getEntrustmentType());
|
cevo.setEntrustmentType(one.getEntrustmentType());
|
||||||
// cevo.setType(one.getType());
|
cevo.setOldIdentificationResult(one.getOldIdentificationResult());
|
||||||
return R.ok(cevo);
|
return R.ok(cevo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +242,7 @@ public class CaseEventController {
|
|||||||
entrustmentService.update(Wrappers.<Entrustment>lambdaUpdate()
|
entrustmentService.update(Wrappers.<Entrustment>lambdaUpdate()
|
||||||
.eq(Entrustment::getId, dto.getEntrustId())
|
.eq(Entrustment::getId, dto.getEntrustId())
|
||||||
.set(Entrustment::getEntrustmentType, dto.getEntrustmentType())
|
.set(Entrustment::getEntrustmentType, dto.getEntrustmentType())
|
||||||
// .set(StrUtil.isNotBlank(dto.getType()), Entrustment::getType, dto.getType())
|
.set(StrUtil.isNotBlank(dto.getOldIdentificationResult()), Entrustment::getOldIdentificationResult, dto.getOldIdentificationResult())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return R.ok(caseEvent, "保存案件信息成功");
|
return R.ok(caseEvent, "保存案件信息成功");
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public class EntrustmentController {
|
|||||||
.eq(StrUtil.isNotBlank(caseId), "e.case_id", caseId)
|
.eq(StrUtil.isNotBlank(caseId), "e.case_id", caseId)
|
||||||
.in((statuses != null) && (statuses.size() > 0), "e.status", statuses)
|
.in((statuses != null) && (statuses.size() > 0), "e.status", statuses)
|
||||||
.eq(dataSources != null, "e.data_sources", dataSources)
|
.eq(dataSources != null, "e.data_sources", dataSources)
|
||||||
.inSql(checkoutQuery.equals(1), "e.id", "SELECT entrust_id FROM b_entrust_material_checkout_result") // 筛选检材检出结果记录不为0 的委托
|
// .inSql(checkoutQuery.equals(1), "e.id", "SELECT entrust_id FROM b_entrust_material_checkout_result") // 筛选检材检出结果记录不为0 的委托
|
||||||
.like(StrUtil.isNotBlank(caseName), "c.case_name", caseName)
|
.like(StrUtil.isNotBlank(caseName), "c.case_name", caseName)
|
||||||
.orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 9, "CAST(SUBSTRING(e.accept_no, 1,4) AS UNSIGNED)", "CAST(SUBSTRING(e.accept_no, 6) AS UNSIGNED)")
|
.orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 9, "CAST(SUBSTRING(e.accept_no, 1,4) AS UNSIGNED)", "CAST(SUBSTRING(e.accept_no, 6) AS UNSIGNED)")
|
||||||
.orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 7, "CAST(SUBSTRING(e.entrustment_no, 4,4) AS UNSIGNED)", "CAST(SUBSTRING(e.entrustment_no, 9) AS UNSIGNED)")
|
.orderByDesc(statuses != null && statuses.size() > 0 && statuses.get(0) == 7, "CAST(SUBSTRING(e.entrustment_no, 4,4) AS UNSIGNED)", "CAST(SUBSTRING(e.entrustment_no, 9) AS UNSIGNED)")
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ public class EntrustmentIdentificationMaterialController {
|
|||||||
/**
|
/**
|
||||||
* 受理人对检材进行受理
|
* 受理人对检材进行受理
|
||||||
*
|
*
|
||||||
* @param identificationMaterial
|
* @param identificationMaterialList
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "受理人对检材进行受理提交", notes = "受理人对检材进行受理提交, opCode: 1=通过, -1=不通过, 0=未审核\n" +
|
@ApiOperation(value = "受理人对检材进行受理提交", notes = "受理人对检材进行受理提交, opCode: 1=通过, -1=不通过, 0=未审核\n" +
|
||||||
@@ -672,15 +672,21 @@ public class EntrustmentIdentificationMaterialController {
|
|||||||
@PreAuthorize("@pms.hasPermission('EntrustmentAccept')")
|
@PreAuthorize("@pms.hasPermission('EntrustmentAccept')")
|
||||||
public R uploadAcceptAttachmentObj(@PathVariable("identificationMaterialId") String identificationMaterialId, @RequestPart("file") MultipartFile file) throws Exception {
|
public R uploadAcceptAttachmentObj(@PathVariable("identificationMaterialId") String identificationMaterialId, @RequestPart("file") MultipartFile file) throws Exception {
|
||||||
EntrustmentIdentificationMaterial im = entrustmentIdentificationMaterialService.getById(identificationMaterialId);
|
EntrustmentIdentificationMaterial im = entrustmentIdentificationMaterialService.getById(identificationMaterialId);
|
||||||
|
String entrustId = im.getEntrustmentId();
|
||||||
if (im != null) {
|
if (im != null) {
|
||||||
if (im.getAcceptPassed() == null || im.getAcceptPassed() != 1) {
|
if (im.getAcceptPassed() == null || im.getAcceptPassed() != 1) {
|
||||||
System.out.println(String.format("uploadAcceptAttachmentObj: entrustmentId=%s identificationMaterialId=%s OriginalFilename=%s", im.getEntrustmentId(), identificationMaterialId, file.getOriginalFilename()));
|
System.out.println(String.format("uploadAcceptAttachmentObj: entrustmentId=%s identificationMaterialId=%s OriginalFilename=%s", entrustId, identificationMaterialId, file.getOriginalFilename()));
|
||||||
String path = OSSDirectoryConstants.ACCEPT_DIRECTORY + "/" + im.getEntrustmentId() + "/" + identificationMaterialId;
|
String path = OSSDirectoryConstants.ACCEPT_DIRECTORY + "/" + entrustId + "/" + identificationMaterialId;
|
||||||
boolean r = ossFile.fileUpload(file, path);
|
boolean r = ossFile.fileUpload(file, path);
|
||||||
Map<String, String> ResultData = new HashMap<>();
|
Map<String, String> ResultData = new HashMap<>();
|
||||||
ResultData.put("fileName", FileNameUtil.getName(file.getOriginalFilename()));
|
ResultData.put("fileName", FileNameUtil.getName(file.getOriginalFilename()));
|
||||||
ResultData.put("path", path);
|
ResultData.put("path", path);
|
||||||
if (r) {
|
if (r) {
|
||||||
|
Entrustment entrust = entrustmentService.getById(entrustId);
|
||||||
|
if (!entrust.getMaterialImageFlag()) {
|
||||||
|
// 如果该委托并上传检材照片则更新
|
||||||
|
entrustmentService.update(Wrappers.<Entrustment>lambdaUpdate().eq(Entrustment::getId, entrustId).set(Entrustment::getMaterialImageFlag, Boolean.TRUE));
|
||||||
|
}
|
||||||
return R.ok(ResultData, "上传成功");
|
return R.ok(ResultData, "上传成功");
|
||||||
}
|
}
|
||||||
return R.failed("上传失败");
|
return R.failed("上传失败");
|
||||||
@@ -741,6 +747,10 @@ public class EntrustmentIdentificationMaterialController {
|
|||||||
boolean r = ossFile.fileSave(path + "/" + fileName, is);
|
boolean r = ossFile.fileSave(path + "/" + fileName, is);
|
||||||
if (r) {
|
if (r) {
|
||||||
Thread.sleep(10);
|
Thread.sleep(10);
|
||||||
|
if (!entrustObj.getMaterialImageFlag()) {
|
||||||
|
// 如果该委托并上传检材照片则更新
|
||||||
|
entrustmentService.update(Wrappers.<Entrustment>lambdaUpdate().eq(Entrustment::getId, entrustId).set(Entrustment::getMaterialImageFlag, Boolean.TRUE));
|
||||||
|
}
|
||||||
return R.ok(ResultData, "上传成功");
|
return R.ok(ResultData, "上传成功");
|
||||||
}
|
}
|
||||||
return R.failed("上传失败");
|
return R.failed("上传失败");
|
||||||
|
|||||||
@@ -23,7 +23,11 @@ public class DrugLiteConvert {
|
|||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
String drugToString = JSONArray.toJSONString(drugLitesJson);
|
String drugToString = JSONArray.toJSONString(drugLitesJson);
|
||||||
List<DrugLite> drugLiteList = JSONArray.parseArray(drugToString, DrugLite.class).stream().sorted(Comparator.comparing(DrugLite::getName)).collect(Collectors.toList());;
|
return getDrugLites(drugToString);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<DrugLite> getDrugLites(String drugToString) {
|
||||||
|
List<DrugLite> drugLiteList = JSONArray.parseArray(drugToString, DrugLite.class).stream().sorted(Comparator.comparing(DrugLite::getName)).collect(Collectors.toList());
|
||||||
return drugLiteList;
|
return drugLiteList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
package digital.laboratory.platform.entrustment.convert;
|
package digital.laboratory.platform.entrustment.convert;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import digital.laboratory.platform.entrustment.dto.EntrustMaterialCheckoutResultDTO;
|
import digital.laboratory.platform.entrustment.dto.EntrustMaterialCheckoutResultDTO;
|
||||||
import digital.laboratory.platform.entrustment.entity.EntrustMaterialCheckoutResult;
|
import digital.laboratory.platform.entrustment.entity.EntrustMaterialCheckoutResult;
|
||||||
import digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO;
|
import digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO;
|
||||||
|
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||||
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -15,7 +19,11 @@ public class EntrustMaterialCheckoutResultConvert {
|
|||||||
public static EntrustMaterialCheckoutResult dtoToEntity(EntrustMaterialCheckoutResultDTO dto) {
|
public static EntrustMaterialCheckoutResult dtoToEntity(EntrustMaterialCheckoutResultDTO dto) {
|
||||||
if (dto == null) return null;
|
if (dto == null) return null;
|
||||||
EntrustMaterialCheckoutResult entrustMaterialCheckoutResult = new EntrustMaterialCheckoutResult();
|
EntrustMaterialCheckoutResult entrustMaterialCheckoutResult = new EntrustMaterialCheckoutResult();
|
||||||
entrustMaterialCheckoutResult.setQualitativeResult(dto.getQualitativeResult());
|
if (CollUtil.isNotEmpty(dto.getQualitativeResult())) {
|
||||||
|
entrustMaterialCheckoutResult.setQualitativeResult(JSON.toJSONString(dto.getQualitativeResult()));
|
||||||
|
} else {
|
||||||
|
entrustMaterialCheckoutResult.setQualitativeResult(null);
|
||||||
|
}
|
||||||
entrustMaterialCheckoutResult.setQuantitativeResult(dto.getQuantitativeResult().stream().collect(Collectors.joining("、")));
|
entrustMaterialCheckoutResult.setQuantitativeResult(dto.getQuantitativeResult().stream().collect(Collectors.joining("、")));
|
||||||
entrustMaterialCheckoutResult.setOtherResult(dto.getOtherResult());
|
entrustMaterialCheckoutResult.setOtherResult(dto.getOtherResult());
|
||||||
entrustMaterialCheckoutResult.setCheckoutRemark(dto.getCheckoutRemark());
|
entrustMaterialCheckoutResult.setCheckoutRemark(dto.getCheckoutRemark());
|
||||||
@@ -28,7 +36,7 @@ public class EntrustMaterialCheckoutResultConvert {
|
|||||||
EntrustMaterialCheckoutResultVO vo = new EntrustMaterialCheckoutResultVO();
|
EntrustMaterialCheckoutResultVO vo = new EntrustMaterialCheckoutResultVO();
|
||||||
vo.setId(entity.getId());
|
vo.setId(entity.getId());
|
||||||
vo.setQualitativeResult(entity.getQualitativeResult());
|
vo.setQualitativeResult(entity.getQualitativeResult());
|
||||||
vo.setQuantitativeResult(StrUtil.split(entity.getQuantitativeResult(), "、"));
|
vo.setQuantitativeResult(entity.getQuantitativeResult());
|
||||||
vo.setOtherResult(entity.getOtherResult());
|
vo.setOtherResult(entity.getOtherResult());
|
||||||
vo.setCheckoutRemark(entity.getCheckoutRemark());
|
vo.setCheckoutRemark(entity.getCheckoutRemark());
|
||||||
return vo;
|
return vo;
|
||||||
|
|||||||
@@ -97,10 +97,8 @@ public class UpdateCaseAndEntrustTypeDTO {
|
|||||||
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
|
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
|
||||||
private Integer entrustmentType;
|
private Integer entrustmentType;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty(value="原鉴定结果(鉴定情况)," +
|
||||||
* 20250121 新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分
|
"常规毒品:首次鉴定、初筛(不要报告、只要结果)、补充鉴定、重新鉴定;" +
|
||||||
* 存字符串,不用code表达
|
"生物样本:首次鉴定、初筛(不要报告、只要结果)、涉缅人员、自愿戒治人员、补充鉴定、重新鉴定")
|
||||||
*/
|
private String oldIdentificationResult;
|
||||||
@ApiModelProperty("新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分")
|
|
||||||
private String type;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ public class EntrustMaterialCheckoutResult extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 定性结果
|
* 定性结果
|
||||||
*/
|
*/
|
||||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
// @TableField(typeHandler = FastjsonTypeHandler.class)
|
||||||
private List<DrugLite> qualitativeResult;
|
private String qualitativeResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定量结果
|
* 定量结果
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public class Entrustment extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 原鉴定结果
|
* 原鉴定结果
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="原鉴定结果," +
|
@ApiModelProperty(value="原鉴定结果(鉴定情况)," +
|
||||||
"常规毒品:首次鉴定、初筛(不要报告、只要结果)、补充鉴定、重新鉴定;" +
|
"常规毒品:首次鉴定、初筛(不要报告、只要结果)、补充鉴定、重新鉴定;" +
|
||||||
"生物样本:首次鉴定、初筛(不要报告、只要结果)、涉缅人员、自愿戒治人员、补充鉴定、重新鉴定")
|
"生物样本:首次鉴定、初筛(不要报告、只要结果)、涉缅人员、自愿戒治人员、补充鉴定、重新鉴定")
|
||||||
private String oldIdentificationResult;
|
private String oldIdentificationResult;
|
||||||
@@ -748,12 +748,7 @@ public class Entrustment extends BaseEntity {
|
|||||||
@ApiModelProperty(value="是否退回(0:未退回,-1:已退回)")
|
@ApiModelProperty(value="是否退回(0:未退回,-1:已退回)")
|
||||||
private Integer returnOrNot;
|
private Integer returnOrNot;
|
||||||
|
|
||||||
// /**
|
@ApiModelProperty("标记该委托是否已经上传了检材照片, 默认false")
|
||||||
// * 20250121 新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分
|
private Boolean materialImageFlag = false;
|
||||||
// * 存字符串,不用code表达
|
|
||||||
// */
|
|
||||||
// @ApiModelProperty("新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分")
|
|
||||||
// private String type;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface EntrustMaterialCheckoutResultMapper extends BaseMapper<EntrustMaterialCheckoutResult> {
|
public interface EntrustMaterialCheckoutResultMapper extends BaseMapper<EntrustMaterialCheckoutResult> {
|
||||||
|
|
||||||
IPage<EntrustMaterialCheckoutResultVO> getEntrustMaterialCheckoutResultVOPage(@Param("page") IPage<EntrustMaterialCheckoutResult> page, @Param(Constants.WRAPPER) Wrapper<EntrustMaterialCheckoutResult> qw);
|
IPage<EntrustMaterialCheckoutResultVO> getEntrustMaterialCheckoutResultVOPage(@Param("page") IPage<EntrustMaterialCheckoutResult> page, @Param(Constants.WRAPPER) Wrapper<EntrustMaterialCheckoutResultVO> qw);
|
||||||
|
|
||||||
|
|
||||||
List<EntrustMaterialCheckoutResultVO> voList(@Param(Constants.WRAPPER) Wrapper<EntrustMaterialCheckoutResult> qw);
|
List<EntrustMaterialCheckoutResultVO> voList(@Param(Constants.WRAPPER) Wrapper<EntrustMaterialCheckoutResult> qw);
|
||||||
|
|||||||
@@ -67,27 +67,34 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl<Entrus
|
|||||||
@Override
|
@Override
|
||||||
public String buildEntrustMaterialCheckoutResultStr(String entrustId) {
|
public String buildEntrustMaterialCheckoutResultStr(String entrustId) {
|
||||||
// 先获取检材列表
|
// 先获取检材列表
|
||||||
List<EntrustmentIdentificationMaterial> materialList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery().eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustId));
|
// List<EntrustmentIdentificationMaterial> materialList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery().eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustId));
|
||||||
Map<String, EntrustmentIdentificationMaterial> materialMap = materialList.stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity()));
|
// Map<String, EntrustmentIdentificationMaterial> materialMap = materialList.stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity()));
|
||||||
// 获取检测结果
|
// 获取检测结果
|
||||||
List<EntrustMaterialCheckoutResult> checkoutResultList = super.list(Wrappers.<EntrustMaterialCheckoutResult>lambdaQuery().eq(EntrustMaterialCheckoutResult::getEntrustId, entrustId));
|
List<EntrustMaterialCheckoutResultVO> checkoutResultList = baseMapper.voList(Wrappers.<EntrustMaterialCheckoutResult>query().eq("emr.entrust_id", entrustId));
|
||||||
if (CollUtil.isEmpty(checkoutResultList)) {
|
if (CollUtil.isEmpty(checkoutResultList)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<EntrustMaterialCheckoutResultVO> materialCheckoutResults = checkoutResultList.stream().filter(o -> StrUtil.isNotBlank(o.getQualitativeResult())).collect(Collectors.toList());
|
||||||
|
List<EntrustMaterialCheckoutResultVO> materialNotCheckoutResults = checkoutResultList.stream().filter(o -> StrUtil.isEmpty(o.getQualitativeResult())).collect(Collectors.toList());
|
||||||
|
|
||||||
List<String> resultStrList = new ArrayList<>();
|
List<String> resultStrList = new ArrayList<>();
|
||||||
// 对检测结果进行分组
|
// 对检测结果进行分组
|
||||||
Map<String, List<EntrustMaterialCheckoutResult>> checkoutResultGroupMap = checkoutResultList.stream().collect(Collectors.groupingBy(item -> DrugLiteConvert.joiningDrugListNameToStr(item.getQualitativeResult(), "、")));
|
Map<String, List<EntrustMaterialCheckoutResultVO>> checkoutResultGroupMap = materialCheckoutResults.stream().collect(Collectors.groupingBy(item -> DrugLiteConvert.joiningDrugListNameToStr(DrugLiteConvert.getDrugLites(item.getQualitativeResult()), "、")));
|
||||||
|
|
||||||
checkoutResultGroupMap.forEach((key, value) -> {
|
checkoutResultGroupMap.forEach((key, value) -> {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder
|
builder
|
||||||
.append(value.stream().map(item -> materialMap.get(item.getId()).getOrderNo1()).collect(Collectors.joining("、")))
|
.append(value.stream().map(item -> item.getOrderNo() + "号检材").sorted().collect(Collectors.joining("、")))
|
||||||
.append(" : [")
|
.append(" : [")
|
||||||
.append(key)
|
.append(key)
|
||||||
.append("]");
|
.append("]");
|
||||||
resultStrList.add(builder.toString());
|
resultStrList.add(builder.toString());
|
||||||
});
|
});
|
||||||
|
if (CollUtil.isNotEmpty(materialNotCheckoutResults)) {
|
||||||
|
String notCheckoutStr = materialNotCheckoutResults.stream().map(result -> result.getOrderNo() + "号检材").sorted().collect(Collectors.joining("、")) + materialNotCheckoutResults.get(0).getCheckoutRemark();
|
||||||
|
return resultStrList.stream().sorted().collect(Collectors.joining("\n")) + notCheckoutStr;
|
||||||
|
}
|
||||||
return resultStrList.stream().sorted().collect(Collectors.joining("\n"));
|
return resultStrList.stream().sorted().collect(Collectors.joining("\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,26 +195,31 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl<Entrus
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IPage<EntrustMaterialCheckoutResultVO> voiPage(EntrustMaterialCheckoutResultQuery query) {
|
public IPage<EntrustMaterialCheckoutResultVO> voiPage(EntrustMaterialCheckoutResultQuery query) {
|
||||||
IPage<EntrustMaterialCheckoutResult> page = this.page(
|
// IPage<EntrustMaterialCheckoutResult> page = this.page(
|
||||||
|
// new Page<>(query.getCurrent(), query.getSize()),
|
||||||
|
// Wrappers.<EntrustMaterialCheckoutResult>lambdaQuery()
|
||||||
|
// .eq(StrUtil.isNotBlank(query.getEntrustId()), EntrustMaterialCheckoutResult::getEntrustId, query.getEntrustId())
|
||||||
|
// .orderByDesc(EntrustMaterialCheckoutResult::getUpdateTime)
|
||||||
|
// );
|
||||||
|
// IPage<EntrustMaterialCheckoutResultVO> voPage = new Page<>();
|
||||||
|
// BeanUtils.copyProperties(page, voPage, "records");
|
||||||
|
// List<EntrustMaterialCheckoutResult> records = page.getRecords();
|
||||||
|
// if (CollUtil.isNotEmpty(records)) {
|
||||||
|
// List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterials = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery().in(EntrustmentIdentificationMaterial::getId, records.stream().map(EntrustMaterialCheckoutResult::getId).collect(Collectors.toSet())));
|
||||||
|
// Map<String, EntrustmentIdentificationMaterial> materialMap = entrustmentIdentificationMaterials.stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity()));
|
||||||
|
// List<EntrustMaterialCheckoutResultVO> entrustMaterialCheckoutResultVOS = records.stream().map(record -> {
|
||||||
|
// EntrustMaterialCheckoutResultVO entrustMaterialCheckoutResultVO = EntrustMaterialCheckoutResultConvert.entityToVO(record);
|
||||||
|
// entrustMaterialCheckoutResultVO.setName(materialMap.get(record.getId()).getName());
|
||||||
|
// return entrustMaterialCheckoutResultVO;
|
||||||
|
// }).collect(Collectors.toList());
|
||||||
|
// voPage.setRecords(entrustMaterialCheckoutResultVOS);
|
||||||
|
// }
|
||||||
|
return baseMapper.getEntrustMaterialCheckoutResultVOPage(
|
||||||
new Page<>(query.getCurrent(), query.getSize()),
|
new Page<>(query.getCurrent(), query.getSize()),
|
||||||
Wrappers.<EntrustMaterialCheckoutResult>lambdaQuery()
|
Wrappers.<EntrustMaterialCheckoutResultVO>query()
|
||||||
.eq(StrUtil.isNotBlank(query.getEntrustId()), EntrustMaterialCheckoutResult::getEntrustId, query.getEntrustId())
|
.eq(StrUtil.isNotBlank(query.getEntrustId()), "emr.entrust_id", query.getEntrustId())
|
||||||
.orderByDesc(EntrustMaterialCheckoutResult::getUpdateTime)
|
.orderByAsc("em.order_no")
|
||||||
);
|
);
|
||||||
IPage<EntrustMaterialCheckoutResultVO> voPage = new Page<>();
|
|
||||||
BeanUtils.copyProperties(page, voPage, "records");
|
|
||||||
List<EntrustMaterialCheckoutResult> records = page.getRecords();
|
|
||||||
if (CollUtil.isNotEmpty(records)) {
|
|
||||||
List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterials = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery().in(EntrustmentIdentificationMaterial::getId, records.stream().map(EntrustMaterialCheckoutResult::getId).collect(Collectors.toSet())));
|
|
||||||
Map<String, EntrustmentIdentificationMaterial> materialMap = entrustmentIdentificationMaterials.stream().collect(Collectors.toMap(EntrustmentIdentificationMaterial::getId, Function.identity()));
|
|
||||||
List<EntrustMaterialCheckoutResultVO> entrustMaterialCheckoutResultVOS = records.stream().map(record -> {
|
|
||||||
EntrustMaterialCheckoutResultVO entrustMaterialCheckoutResultVO = EntrustMaterialCheckoutResultConvert.entityToVO(record);
|
|
||||||
entrustMaterialCheckoutResultVO.setName(materialMap.get(record.getId()).getName());
|
|
||||||
return entrustMaterialCheckoutResultVO;
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
voPage.setRecords(entrustMaterialCheckoutResultVOS);
|
|
||||||
}
|
|
||||||
return voPage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -315,7 +327,7 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl<Entrus
|
|||||||
excelDTO.setFormName(material.getFormName());
|
excelDTO.setFormName(material.getFormName());
|
||||||
EntrustMaterialCheckoutResult entrustMaterialCheckoutResult = checkoutResultMap.get(material.getId());
|
EntrustMaterialCheckoutResult entrustMaterialCheckoutResult = checkoutResultMap.get(material.getId());
|
||||||
excelDTO.setQualitativeResult(
|
excelDTO.setQualitativeResult(
|
||||||
DrugLiteConvert.convertDirtyLiteByJSON(entrustMaterialCheckoutResult.getQualitativeResult())
|
DrugLiteConvert.getDrugLites(entrustMaterialCheckoutResult.getQualitativeResult())
|
||||||
.stream().map(DrugLite::getName).collect(Collectors.joining("、"))
|
.stream().map(DrugLite::getName).collect(Collectors.joining("、"))
|
||||||
);
|
);
|
||||||
excelDTO.setQuantitativeResult(entrustMaterialCheckoutResult.getQuantitativeResult());
|
excelDTO.setQuantitativeResult(entrustMaterialCheckoutResult.getQuantitativeResult());
|
||||||
|
|||||||
@@ -517,6 +517,11 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
|
|||||||
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", im.getEntrustmentId()));
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", im.getEntrustmentId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 对已经审核过的委托进行处理
|
||||||
|
if (entrustment.getStatus().compareTo(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CONFIRM.getStatus()) >= 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK.getStatus()) {
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CHECK.getStatus()) {
|
||||||
throw new RuntimeException("委托不在待审核状态");
|
throw new RuntimeException("委托不在待审核状态");
|
||||||
}
|
}
|
||||||
@@ -720,6 +725,10 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
|
|||||||
throw new RuntimeException("委托不在正在受理状态");
|
throw new RuntimeException("委托不在正在受理状态");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (im.getAcceptPassed() == 1) {
|
||||||
|
throw new RuntimeException(String.format("当前id为 [%s] 的检材已经受理,受理编号为 [%s]!", im.getId(), im.getAcceptNo()));
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------
|
//-------------------
|
||||||
// 更新数据库表数据
|
// 更新数据库表数据
|
||||||
//-------------------
|
//-------------------
|
||||||
@@ -776,10 +785,11 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
|
|||||||
im.setSample2Quantity(identificationMaterial.getSample2Quantity());
|
im.setSample2Quantity(identificationMaterial.getSample2Quantity());
|
||||||
im.setSample2BoxId(identificationMaterial.getSample2BoxId());
|
im.setSample2BoxId(identificationMaterial.getSample2BoxId());
|
||||||
|
|
||||||
if ((identificationMaterial.getSample1Quantity() == null) ||
|
// 20250218 陈科长提出的不要复称
|
||||||
(identificationMaterial.getSample1Quantity().equals(BigDecimal.ZERO))) {
|
// if ((identificationMaterial.getSample1Quantity() == null) ||
|
||||||
throw new RuntimeException(String.format("样本1的数量不能为空, 也不能为 0"));
|
// (identificationMaterial.getSample1Quantity().equals(BigDecimal.ZERO))) {
|
||||||
}
|
// throw new RuntimeException(String.format("样本1的数量不能为空, 也不能为 0"));
|
||||||
|
// }
|
||||||
if (StrUtil.isBlank(identificationMaterial.getSample1No())) {
|
if (StrUtil.isBlank(identificationMaterial.getSample1No())) {
|
||||||
im.setSample1No(sampleService.getNewSampleNo(im.getImNo(), 1));
|
im.setSample1No(sampleService.getNewSampleNo(im.getImNo(), 1));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -451,9 +452,9 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 构造鉴定事项确认书的数据
|
* 构造鉴定事项确认书的数据
|
||||||
*
|
*
|
||||||
* @param caseEvent
|
* @param caseEvent 案件信息
|
||||||
* @param entrustment
|
* @param entrustment 委托信息
|
||||||
* @param materialList
|
* @param materialList 委托检材列表信息
|
||||||
* @param isAccepted -1 未受理,0 1 受理之后的状态
|
* @param isAccepted -1 未受理,0 1 受理之后的状态
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -548,7 +549,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 分别求分析样是多少份,留存样是多少份
|
* 分别求分析样是多少份,留存样是多少份
|
||||||
*
|
*
|
||||||
* @param materialList
|
* @param materialList 检材列表
|
||||||
* @param flag
|
* @param flag
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -561,11 +562,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// }else {
|
// }else {
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
if (item.getSample1Quantity() != null && item.getSample1Quantity().compareTo(BigDecimal.ZERO) > 0) {
|
return item.getSample1Quantity() != null && item.getSample1Quantity().compareTo(BigDecimal.ZERO) > 0;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
List<EntrustmentIdentificationMaterial> rtList = materialList.stream().filter(item -> {
|
List<EntrustmentIdentificationMaterial> rtList = materialList.stream().filter(item -> {
|
||||||
// if(item.getSample2RepeatWeigh()!=null&&item.getSample2RepeatWeigh().compareTo(BigDecimal.ZERO)>0)
|
// if(item.getSample2RepeatWeigh()!=null&&item.getSample2RepeatWeigh().compareTo(BigDecimal.ZERO)>0)
|
||||||
@@ -574,11 +571,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// }else {
|
// }else {
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
if (item.getSample2Quantity() != null && item.getSample2Quantity().compareTo(BigDecimal.ZERO) > 0) {
|
return item.getSample2Quantity() != null && item.getSample2Quantity().compareTo(BigDecimal.ZERO) > 0;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
if (flag.equals("A")) {
|
if (flag.equals("A")) {
|
||||||
return anList;
|
return anList;
|
||||||
@@ -605,9 +598,9 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 构造封装质量
|
* 构造封装质量
|
||||||
*
|
*
|
||||||
* @param materialList
|
* @param materialList 检材列表
|
||||||
* @param flag
|
* @param flag A 分析样 R 留存样 其他 分析+留存
|
||||||
* @return
|
* @return 构造封装质量
|
||||||
*/
|
*/
|
||||||
private BigDecimal getAllMaterialMount(List<EntrustmentIdentificationMaterial> materialList, String flag) {
|
private BigDecimal getAllMaterialMount(List<EntrustmentIdentificationMaterial> materialList, String flag) {
|
||||||
BigDecimal mount1 = new BigDecimal(0);
|
BigDecimal mount1 = new BigDecimal(0);
|
||||||
@@ -676,16 +669,16 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// 根据 totalSampleMass 大小来决定保留的小数位数
|
// 根据 totalSampleMass 大小来决定保留的小数位数
|
||||||
if (totalSampleMass.compareTo(new BigDecimal(100)) >= 0) {
|
if (totalSampleMass.compareTo(new BigDecimal(100)) >= 0) {
|
||||||
// 如果 totalSampleMass 大于 100,保留 1 位小数
|
// 如果 totalSampleMass 大于 100,保留 1 位小数
|
||||||
eg.setTotalSampleDes(totalSampleMass.setScale(1, BigDecimal.ROUND_HALF_UP) + item.getUnit());
|
eg.setTotalSampleDes(totalSampleMass.setScale(1, RoundingMode.HALF_UP) + item.getUnit());
|
||||||
} else {
|
} else {
|
||||||
// 否则保留 2 位小数
|
// 否则保留 2 位小数
|
||||||
eg.setTotalSampleDes(totalSampleMass.setScale(2, BigDecimal.ROUND_HALF_UP) + item.getUnit());
|
eg.setTotalSampleDes(totalSampleMass.setScale(2, RoundingMode.HALF_UP) + item.getUnit());
|
||||||
}
|
}
|
||||||
return eg;
|
return eg;
|
||||||
}
|
}
|
||||||
|
|
||||||
private BigDecimal calculateTotalSampleMass(EntrustmentIdentificationMaterial item, MaterialListForBookVo eg) {
|
private BigDecimal calculateTotalSampleMass(EntrustmentIdentificationMaterial item, MaterialListForBookVo eg) {
|
||||||
BigDecimal totalSampleMass = BigDecimal.ZERO;
|
BigDecimal totalSampleMass;
|
||||||
//因为现在有的检材可以不用复称,例如送来的一支电子烟,所以我们用送检的数量与单位进行描述即可
|
//因为现在有的检材可以不用复称,例如送来的一支电子烟,所以我们用送检的数量与单位进行描述即可
|
||||||
if (item.getSample1RepeatWeigh() == null || item.getSample1RepeatWeigh().compareTo(BigDecimal.ZERO) == 0) {
|
if (item.getSample1RepeatWeigh() == null || item.getSample1RepeatWeigh().compareTo(BigDecimal.ZERO) == 0) {
|
||||||
eg.setAnalysisSampleDes(item.getSample1Quantity() + item.getUnit());
|
eg.setAnalysisSampleDes(item.getSample1Quantity() + item.getUnit());
|
||||||
@@ -727,8 +720,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 构建检材描述和鉴定要求
|
* 构建检材描述和鉴定要求
|
||||||
*
|
*
|
||||||
* @param materialList
|
* @param materialList 检材列表
|
||||||
* @return
|
* @return 构建检材描述和鉴定要求的字符串
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String buildMaterialDes(List<EntrustmentIdentificationMaterial> materialList) {
|
public String buildMaterialDes(List<EntrustmentIdentificationMaterial> materialList) {
|
||||||
@@ -756,11 +749,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
@Override
|
@Override
|
||||||
public String buildIdentfyReq(List<EntrustmentIdentificationMaterial> materialList) {
|
public String buildIdentfyReq(List<EntrustmentIdentificationMaterial> materialList) {
|
||||||
Map<String, List<EntrustmentIdentificationMaterial>> retGroup = materialList.stream().collect(Collectors.groupingBy(item -> item.getAnalysisOption() + "_" + getDrugNameMsg(item.getCandidateDrugs())));
|
Map<String, List<EntrustmentIdentificationMaterial>> retGroup = materialList.stream().collect(Collectors.groupingBy(item -> item.getAnalysisOption() + "_" + getDrugNameMsg(item.getCandidateDrugs())));
|
||||||
List<String> desList = new ArrayList<>();
|
|
||||||
StringBuffer retSb = new StringBuffer();
|
StringBuffer retSb = new StringBuffer();
|
||||||
retGroup.forEach((k, v) -> {
|
retGroup.forEach((k, v) -> retSb.append(getNameDesStr(v)).append(","));
|
||||||
retSb.append(getNameDesStr(v)).append(",");
|
|
||||||
});
|
|
||||||
retSb.delete(retSb.length() - 1, retSb.length());
|
retSb.delete(retSb.length() - 1, retSb.length());
|
||||||
return retSb.toString();
|
return retSb.toString();
|
||||||
}
|
}
|
||||||
@@ -815,7 +805,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
//对分析项目+目标物的组合进行排序,优先描述小的
|
//对分析项目+目标物的组合进行排序,优先描述小的
|
||||||
private List<Map.Entry<String, List<EntrustmentIdentificationMaterial>>> orderAnalysisOptionAndDrug(Map<String, List<EntrustmentIdentificationMaterial>> targetMapData) {
|
private List<Map.Entry<String, List<EntrustmentIdentificationMaterial>>> orderAnalysisOptionAndDrug(Map<String, List<EntrustmentIdentificationMaterial>> targetMapData) {
|
||||||
List<Map.Entry<String, List<EntrustmentIdentificationMaterial>>> retList =
|
List<Map.Entry<String, List<EntrustmentIdentificationMaterial>>> retList =
|
||||||
new ArrayList<Map.Entry<String, List<EntrustmentIdentificationMaterial>>>(targetMapData.entrySet());
|
new ArrayList<>(targetMapData.entrySet());
|
||||||
Collections.sort(retList, new Comparator<Map.Entry<String, List<EntrustmentIdentificationMaterial>>>() {
|
Collections.sort(retList, new Comparator<Map.Entry<String, List<EntrustmentIdentificationMaterial>>>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(Map.Entry<String, List<EntrustmentIdentificationMaterial>> o1,
|
public int compare(Map.Entry<String, List<EntrustmentIdentificationMaterial>> o1,
|
||||||
@@ -843,7 +833,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
private String getDrugNameMsg(List<DrugLite> drugLites) {
|
private String getDrugNameMsg(List<DrugLite> drugLites) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (DrugLite lite : drugLites) {
|
for (DrugLite lite : drugLites) {
|
||||||
DrugLite drugLite = (DrugLite) JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(lite)), DrugLite.class);
|
DrugLite drugLite = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(lite)), DrugLite.class);
|
||||||
sb.append(drugLite.getName());
|
sb.append(drugLite.getName());
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
@@ -854,18 +844,16 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
//对 xx号,xx号检材中的xx1、xx2进行 xx 分析,
|
//对 xx号,xx号检材中的xx1、xx2进行 xx 分析,
|
||||||
//对1号、2号检材中的海洛因、甲基苯丙胺进行定量分析
|
//对1号、2号检材中的海洛因、甲基苯丙胺进行定量分析
|
||||||
// 1.定性,2.定量 3.定性定量 4.关联性性 5.其他
|
// 1.定性,2.定量 3.定性定量 4.关联性性 5.其他
|
||||||
StringBuffer sbMaterialName = new StringBuffer();
|
StringBuilder sbMaterialName = new StringBuilder();
|
||||||
StringBuffer sbDrugDes = new StringBuffer();
|
StringBuffer sbDrugDes = new StringBuffer();
|
||||||
StringBuffer sbAnalysisDes = new StringBuffer();
|
StringBuilder sbAnalysisDes = new StringBuilder();
|
||||||
int executeCount = 0;
|
int executeCount = 0;
|
||||||
for (EntrustmentIdentificationMaterial materialObj : targetList) {
|
for (EntrustmentIdentificationMaterial materialObj : targetList) {
|
||||||
sbMaterialName.append(materialObj.getShortNameDes()).append(",");
|
sbMaterialName.append(materialObj.getShortNameDes()).append(",");
|
||||||
//只执行一次且执行一次
|
//只执行一次且执行一次
|
||||||
if (executeCount == 0) {
|
if (executeCount == 0) {
|
||||||
List<DrugLite> drugLiteList = DrugLiteConvert.convertDirtyLiteByJSON(materialObj.getCandidateDrugs());
|
List<DrugLite> drugLiteList = DrugLiteConvert.convertDirtyLiteByJSON(materialObj.getCandidateDrugs());
|
||||||
drugLiteList.forEach(item -> {
|
drugLiteList.forEach(item -> sbDrugDes.append(item.getName()).append("、"));
|
||||||
sbDrugDes.append(item.getName()).append("、");
|
|
||||||
});
|
|
||||||
sbDrugDes.delete(sbDrugDes.length() - 1, sbDrugDes.length());//删除多余的连接号
|
sbDrugDes.delete(sbDrugDes.length() - 1, sbDrugDes.length());//删除多余的连接号
|
||||||
sbAnalysisDes.append(AnalysisOptionEnums.fromCode(materialObj.getAnalysisOption()).getChineseName());
|
sbAnalysisDes.append(AnalysisOptionEnums.fromCode(materialObj.getAnalysisOption()).getChineseName());
|
||||||
}
|
}
|
||||||
@@ -883,9 +871,9 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
//对 xx号,xx号检材中的xx1、xx2进行 xx 分析,
|
//对 xx号,xx号检材中的xx1、xx2进行 xx 分析,
|
||||||
//对1号、2号检材中的海洛因、甲基苯丙胺进行定量分析
|
//对1号、2号检材中的海洛因、甲基苯丙胺进行定量分析
|
||||||
// 1.定性,2.定量 3.定性定量 4.关联性性 5.其他
|
// 1.定性,2.定量 3.定性定量 4.关联性性 5.其他
|
||||||
StringBuffer sbMaterialName = new StringBuffer();
|
StringBuilder sbMaterialName = new StringBuilder();
|
||||||
StringBuffer sbDrugDes = new StringBuffer();
|
StringBuffer sbDrugDes = new StringBuffer();
|
||||||
StringBuffer sbAnalysisDes = new StringBuffer();
|
StringBuilder sbAnalysisDes = new StringBuilder();
|
||||||
int executeCount = 0;
|
int executeCount = 0;
|
||||||
for (EntrustmentIdentificationMaterial materialObj : targetList) {
|
for (EntrustmentIdentificationMaterial materialObj : targetList) {
|
||||||
sbMaterialName.append(materialObj.getOrderNo1()).append(",");
|
sbMaterialName.append(materialObj.getOrderNo1()).append(",");
|
||||||
@@ -893,9 +881,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
if (executeCount == 0) {
|
if (executeCount == 0) {
|
||||||
// String drugToString = JSONArray.toJSONString(materialObj.getCandidateDrugs());
|
// String drugToString = JSONArray.toJSONString(materialObj.getCandidateDrugs());
|
||||||
List<DrugLite> drugLiteList = DrugLiteConvert.convertDirtyLiteByJSON(materialObj.getCandidateDrugs());
|
List<DrugLite> drugLiteList = DrugLiteConvert.convertDirtyLiteByJSON(materialObj.getCandidateDrugs());
|
||||||
drugLiteList.forEach(item -> {
|
drugLiteList.forEach(item -> sbDrugDes.append(item.getName()).append("、"));
|
||||||
sbDrugDes.append(item.getName()).append("、");
|
|
||||||
});
|
|
||||||
sbDrugDes.delete(sbDrugDes.length() - 1, sbDrugDes.length());//删除多余的连接号
|
sbDrugDes.delete(sbDrugDes.length() - 1, sbDrugDes.length());//删除多余的连接号
|
||||||
sbAnalysisDes.append(AnalysisOptionEnums.fromCode(materialObj.getAnalysisOption()).getChineseName());
|
sbAnalysisDes.append(AnalysisOptionEnums.fromCode(materialObj.getAnalysisOption()).getChineseName());
|
||||||
}
|
}
|
||||||
@@ -922,18 +908,16 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
targetList.forEach(item -> {
|
targetList.forEach(item -> {
|
||||||
String drugToString = JSONArray.toJSONString(item.getCandidateDrugs());
|
String drugToString = JSONArray.toJSONString(item.getCandidateDrugs());
|
||||||
List<DrugLite> drugLiteList = JSONArray.parseArray(drugToString, DrugLite.class);
|
List<DrugLite> drugLiteList = JSONArray.parseArray(drugToString, DrugLite.class);
|
||||||
drugLiteList.forEach(drugLite -> {
|
allDrugLite.addAll(drugLiteList);
|
||||||
allDrugLite.add(drugLite);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
retList = allDrugLite.stream().filter(distinctKey(i -> i.getName())).collect(Collectors.toList());
|
retList = allDrugLite.stream().filter(distinctKey(DrugLite::getName)).collect(Collectors.toList());
|
||||||
return retList;
|
return retList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取文书名称
|
* 获取文书名称
|
||||||
*
|
*
|
||||||
* @param entrustId
|
* @param entrustId 委托id
|
||||||
* @param whatBook entrust-委托书 identItemBook-鉴定事项确认书 identfyBook-鉴定书
|
* @param whatBook entrust-委托书 identItemBook-鉴定事项确认书 identfyBook-鉴定书
|
||||||
* @param docType 该参数只有用于委托书上
|
* @param docType 该参数只有用于委托书上
|
||||||
* @return
|
* @return
|
||||||
@@ -975,8 +959,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 检验完成
|
* 检验完成
|
||||||
*
|
*
|
||||||
* @param entrustId
|
* @param entrustId 委托id
|
||||||
* @return
|
* @return 返回检验是否完成标识
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean testsFinish(String entrustId) {
|
public boolean testsFinish(String entrustId) {
|
||||||
@@ -1008,11 +992,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
public Boolean checkDeliverPhoto(String entrustId) {
|
public Boolean checkDeliverPhoto(String entrustId) {
|
||||||
String path = OSSDirectoryConstants.DOCUMENT_ACCEPT_DIRECTORY + "/" + entrustId + "/" + OSSDirectoryConstants.DOCUMENT_ACCEPT_DIRECTORY_DELIVER;
|
String path = OSSDirectoryConstants.DOCUMENT_ACCEPT_DIRECTORY + "/" + entrustId + "/" + OSSDirectoryConstants.DOCUMENT_ACCEPT_DIRECTORY_DELIVER;
|
||||||
List<String> fileList = ossFile.fileList(path);
|
List<String> fileList = ossFile.fileList(path);
|
||||||
if (fileList.size() > 0) {
|
return !fileList.isEmpty();
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1048,7 +1028,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
log.info("本次检材数量:{} 条", saveToTransObj.size());
|
log.info("本次检材数量:{} 条", saveToTransObj.size());
|
||||||
R r = remoteSampleService.enterSample(saveToTransObj);
|
R r = remoteSampleService.enterSample(saveToTransObj);
|
||||||
log.info("更新委托的状态:{} 条", historyEntrustList.size());
|
log.info("更新委托的状态:{} 条", historyEntrustList.size());
|
||||||
this.updateBatchById(historyEntrustList);
|
super.updateBatchById(historyEntrustList);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1080,9 +1060,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (noWeighMaterialList.size() > 0) {
|
return !noWeighMaterialList.isEmpty();
|
||||||
return true;
|
|
||||||
} else return false;
|
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -1109,7 +1087,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
log.info("共计更新案件案情简要信息{}条", caseUpdateList.size());
|
log.info("共计更新案件案情简要信息{}条", caseUpdateList.size());
|
||||||
log.info("共计更新送检人电话信息{}条", entrustUpdateList.size());
|
log.info("共计更新送检人电话信息{}条", entrustUpdateList.size());
|
||||||
caseEventService.updateBatchById(caseUpdateList);
|
caseEventService.updateBatchById(caseUpdateList);
|
||||||
this.updateBatchById(entrustUpdateList);
|
super.updateBatchById(entrustUpdateList);
|
||||||
}
|
}
|
||||||
if (flag.equals("1")) {
|
if (flag.equals("1")) {
|
||||||
thirdMaterialList.forEach(item -> {
|
thirdMaterialList.forEach(item -> {
|
||||||
@@ -1176,7 +1154,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
throw new RuntimeException("委托已经提交, 不能再进行修改");
|
throw new RuntimeException("委托已经提交, 不能再进行修改");
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(String.format("保存委托, entrust.getCandidateDrugs()=%s", entrust.getCandidateDrugs()));
|
System.out.printf("保存委托, entrust.getCandidateDrugs()=%s%n", entrust.getCandidateDrugs());
|
||||||
|
|
||||||
|
|
||||||
//-- 更新送检员表的信息
|
//-- 更新送检员表的信息
|
||||||
@@ -1200,7 +1178,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
//-------------------
|
//-------------------
|
||||||
// 更新数据库表数据
|
// 更新数据库表数据
|
||||||
//-------------------
|
//-------------------
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", entrust.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", entrust.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
updateWrapper.set("client_org_id", entrust.getClientOrgId());
|
updateWrapper.set("client_org_id", entrust.getClientOrgId());
|
||||||
@@ -1270,7 +1248,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
|
|
||||||
// 检验目的(药品筛选清单)定义在委托上
|
// 检验目的(药品筛选清单)定义在委托上
|
||||||
// 我们复制一份到检材上, 以后可以从检材带入到实验室的样本中
|
// 我们复制一份到检材上, 以后可以从检材带入到实验室的样本中
|
||||||
UpdateWrapper<EntrustmentIdentificationMaterial> imUpdateWrapper = new UpdateWrapper<EntrustmentIdentificationMaterial>();
|
UpdateWrapper<EntrustmentIdentificationMaterial> imUpdateWrapper = new UpdateWrapper<>();
|
||||||
imUpdateWrapper.eq("entrustment_id", entrustment.getId()); // 查询条件是 entrustment_id 相等
|
imUpdateWrapper.eq("entrustment_id", entrustment.getId()); // 查询条件是 entrustment_id 相等
|
||||||
imUpdateWrapper.set("candidate_drugs", entrustment.getCandidateDrugs(), "typeHandler=com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler");
|
imUpdateWrapper.set("candidate_drugs", entrustment.getCandidateDrugs(), "typeHandler=com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler");
|
||||||
entrustmentIdentificationMaterialService.update(null, imUpdateWrapper);
|
entrustmentIdentificationMaterialService.update(null, imUpdateWrapper);
|
||||||
@@ -1282,7 +1260,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
public Entrustment bizSubmitter_Apply(Entrustment entrust, DLPUser dlpUser) {
|
public Entrustment bizSubmitter_Apply(Entrustment entrust, DLPUser dlpUser) {
|
||||||
Entrustment result;
|
Entrustment result;
|
||||||
String oldUserId = SecurityUtils.getCurrentUserId();
|
String oldUserId = SecurityUtils.getCurrentUserId();
|
||||||
System.out.println(String.format("Old user id=%s", oldUserId));
|
System.out.printf("Old user id=%s%n", oldUserId);
|
||||||
|
|
||||||
// 检查委托原来的状态
|
// 检查委托原来的状态
|
||||||
Entrustment entrustment = this.getById(entrust.getId());
|
Entrustment entrustment = this.getById(entrust.getId());
|
||||||
@@ -1310,13 +1288,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
if (!StrUtil.equalsIgnoreCase("1", AppStartupRunner.getCfg(CommonConstants.DLP_CODE_ENTRUSTMENT_CLIENT_CHOICE_CHECKERS))) {
|
if (!StrUtil.equalsIgnoreCase("1", AppStartupRunner.getCfg(CommonConstants.DLP_CODE_ENTRUSTMENT_CLIENT_CHOICE_CHECKERS))) {
|
||||||
// List<SysUser> users = this.taskAvailableUserList_Check();
|
// List<SysUser> users = this.taskAvailableUserList_Check();
|
||||||
List<SysUser> users = commonFeignService.remoteGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, CollUtil.newArrayList("EntrustmentCheck"));
|
List<SysUser> users = commonFeignService.remoteGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, CollUtil.newArrayList("EntrustmentCheck"));
|
||||||
String candidateUser = "";
|
String candidateUser = users.stream().map(SysUser::getUserId).collect(Collectors.joining(","));
|
||||||
for (SysUser u : users) {
|
|
||||||
if (candidateUser.length() > 0) {
|
|
||||||
candidateUser += ",";
|
|
||||||
}
|
|
||||||
candidateUser += u.getUserId();
|
|
||||||
}
|
|
||||||
entrustment.setCheckCandidateUser(candidateUser); // 不使用用户提交的候选人名单
|
entrustment.setCheckCandidateUser(candidateUser); // 不使用用户提交的候选人名单
|
||||||
} else {
|
} else {
|
||||||
if (StrUtil.isBlank(entrust.getCheckCandidateUser())) {
|
if (StrUtil.isBlank(entrust.getCheckCandidateUser())) {
|
||||||
@@ -1332,7 +1304,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
entrustment.setStatus(ProcessFlowMapper.getNextStatus(entrustment.getStatus(), 1));
|
entrustment.setStatus(ProcessFlowMapper.getNextStatus(entrustment.getStatus(), 1));
|
||||||
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
||||||
if (pis == null) {
|
if (pis == null) {
|
||||||
pis = new ArrayList<UpdateInfo>();
|
pis = new ArrayList<>();
|
||||||
}
|
}
|
||||||
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
||||||
dlpUser.getName(),
|
dlpUser.getName(),
|
||||||
@@ -1374,7 +1346,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
List<EntrustmentIdentificationMaterial> materialList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>query()
|
List<EntrustmentIdentificationMaterial> materialList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>query()
|
||||||
.eq("entrustment_id", entrustment.getId())
|
.eq("entrustment_id", entrustment.getId())
|
||||||
.orderByAsc("create_time"));
|
.orderByAsc("create_time"));
|
||||||
if (materialList == null || materialList.size() == 0) {
|
if (CollUtil.isEmpty(materialList)) {
|
||||||
throw new CheckedException("请至少添加一个检材后再提交!");
|
throw new CheckedException("请至少添加一个检材后再提交!");
|
||||||
}
|
}
|
||||||
if (StrUtil.isBlank(entrust.getEntrustRequirement())) {
|
if (StrUtil.isBlank(entrust.getEntrustRequirement())) {
|
||||||
@@ -1402,7 +1374,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
throw new RuntimeException(String.format("委托不在待审核状态, 审核任务认领人: %s", entrustment.getCheckClaimUser()));
|
throw new RuntimeException(String.format("委托不在待审核状态, 审核任务认领人: %s", entrustment.getCheckClaimUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
String checkCandidateUsers[] = entrustment.getCheckCandidateUser().split(",");
|
String[] checkCandidateUsers = entrustment.getCheckCandidateUser().split(",");
|
||||||
boolean currentUserIsCandidate = false;
|
boolean currentUserIsCandidate = false;
|
||||||
for (String candidateUser : checkCandidateUsers) {
|
for (String candidateUser : checkCandidateUsers) {
|
||||||
if (candidateUser.equals(dlpUser.getId())) {
|
if (candidateUser.equals(dlpUser.getId())) {
|
||||||
@@ -1430,7 +1402,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
//-------------------
|
//-------------------
|
||||||
// 更新数据库表数据
|
// 更新数据库表数据
|
||||||
//-------------------
|
//-------------------
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
updateWrapper.set("check_claim_user", entrustment.getCheckClaimUser());
|
updateWrapper.set("check_claim_user", entrustment.getCheckClaimUser());
|
||||||
@@ -1502,13 +1474,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
if (!StrUtil.equalsIgnoreCase("1", AppStartupRunner.getCfg(CommonConstants.DLP_CODE_ENTRUSTMENT_CHECKER_CHOICE_APPROVERS))) {
|
if (!StrUtil.equalsIgnoreCase("1", AppStartupRunner.getCfg(CommonConstants.DLP_CODE_ENTRUSTMENT_CHECKER_CHOICE_APPROVERS))) {
|
||||||
// List<SysUser> users = this.taskAvailableUserList_Approve();
|
// List<SysUser> users = this.taskAvailableUserList_Approve();
|
||||||
List<SysUser> users = commonFeignService.remoteGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, CollUtil.newArrayList("EntrustmentApprove"));
|
List<SysUser> users = commonFeignService.remoteGetUsersByPermission(CommonConstants.ORG_TREE_ROOT_ID, CollUtil.newArrayList("EntrustmentApprove"));
|
||||||
String candidateUser = "";
|
String candidateUser = users.stream().map(SysUser::getUserId).collect(Collectors.joining(","));
|
||||||
for (SysUser u : users) {
|
|
||||||
if (candidateUser.length() > 0) {
|
|
||||||
candidateUser += ",";
|
|
||||||
}
|
|
||||||
candidateUser += u.getUserId();
|
|
||||||
}
|
|
||||||
entrustment.setApproveCandidateUser(candidateUser); // 不使用用户提交的候选人名单
|
entrustment.setApproveCandidateUser(candidateUser); // 不使用用户提交的候选人名单
|
||||||
} else {
|
} else {
|
||||||
if (StrUtil.isBlank(entrust.getApproveCandidateUser())) {
|
if (StrUtil.isBlank(entrust.getApproveCandidateUser())) {
|
||||||
@@ -1563,7 +1530,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
|
|
||||||
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
||||||
if (pis == null) {
|
if (pis == null) {
|
||||||
pis = new ArrayList<UpdateInfo>();
|
pis = new ArrayList<>();
|
||||||
}
|
}
|
||||||
if (opCode == 1) {
|
if (opCode == 1) {
|
||||||
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
||||||
@@ -1586,7 +1553,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
}
|
}
|
||||||
// entrustment.setProcessInfo(pis);
|
// entrustment.setProcessInfo(pis);
|
||||||
|
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
updateWrapper.set("destructive_analysis", entrust.getDestructiveAnalysis());
|
updateWrapper.set("destructive_analysis", entrust.getDestructiveAnalysis());
|
||||||
@@ -1656,7 +1623,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
throw new RuntimeException(String.format("委托不在待审批状态, 审批任务认领人: %s", entrustment.getApproveClaimUser()));
|
throw new RuntimeException(String.format("委托不在待审批状态, 审批任务认领人: %s", entrustment.getApproveClaimUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
String approveCandidateUsers[] = StringUtils.isNotBlank(entrustment.getApproveCandidateUser()) ? entrustment.getApproveCandidateUser().split(",") : new String[]{};
|
String[] approveCandidateUsers = StringUtils.isNotBlank(entrustment.getApproveCandidateUser()) ? entrustment.getApproveCandidateUser().split(",") : new String[]{};
|
||||||
|
|
||||||
boolean currentUserIsCandidate = false;
|
boolean currentUserIsCandidate = false;
|
||||||
for (String candidateUser : approveCandidateUsers) {
|
for (String candidateUser : approveCandidateUsers) {
|
||||||
@@ -1683,7 +1650,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
//-------------------
|
//-------------------
|
||||||
// 更新数据库表数据
|
// 更新数据库表数据
|
||||||
//-------------------
|
//-------------------
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
updateWrapper.set("approve_claim_user", entrustment.getApproveClaimUser());
|
updateWrapper.set("approve_claim_user", entrustment.getApproveClaimUser());
|
||||||
@@ -1708,7 +1675,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
public Entrustment bizApprover_Apply(Entrustment entrust, Integer opCode, DLPUser dlpUser) {
|
public Entrustment bizApprover_Apply(Entrustment entrust, Integer opCode, DLPUser dlpUser) {
|
||||||
|
|
||||||
if (opCode == null) {
|
if (opCode == null) {
|
||||||
throw new RuntimeException(String.format("审批必须提供 opCode"));
|
throw new RuntimeException("审批必须提供 opCode");
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (StrUtil.isBlank(entrust.getApproveComments())) {
|
// if (StrUtil.isBlank(entrust.getApproveComments())) {
|
||||||
@@ -1748,7 +1715,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 审批任务已经提交了, 转到新的环节
|
// 审批任务已经提交了, 转到新的环节
|
||||||
int newStatus = -1; // 新的状态(环节)
|
int newStatus; // 新的状态(环节)
|
||||||
{
|
{
|
||||||
newStatus = ProcessFlowMapper.getNextStatus(entrustment.getStatus(), opCode);
|
newStatus = ProcessFlowMapper.getNextStatus(entrustment.getStatus(), opCode);
|
||||||
if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) {
|
if (newStatus == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) {
|
||||||
@@ -1784,9 +1751,9 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
|
|
||||||
// 从数据库表中取出保存的委托对象, 后续的操作我们以此为准
|
// 从数据库表中取出保存的委托对象, 后续的操作我们以此为准
|
||||||
//entrustment = entrustmentService.getById(entrust.getId());
|
//entrustment = entrustmentService.getById(entrust.getId());
|
||||||
if (entrustment == null) {
|
// if (entrustment == null) {
|
||||||
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrust.getId()));
|
// throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrust.getId()));
|
||||||
}
|
// }
|
||||||
//第三方系统审批---------------------------------------------开始
|
//第三方系统审批---------------------------------------------开始
|
||||||
//需要判断是第三方系统的数据才可以做第三方的同步
|
//需要判断是第三方系统的数据才可以做第三方的同步
|
||||||
try {
|
try {
|
||||||
@@ -1822,11 +1789,11 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
@Override
|
@Override
|
||||||
public Entrustment bizConfirm_Apply(Entrustment entrust, Integer opCode, DLPUser dlpUser) {
|
public Entrustment bizConfirm_Apply(Entrustment entrust, Integer opCode, DLPUser dlpUser) {
|
||||||
if (opCode == null) {
|
if (opCode == null) {
|
||||||
throw new RuntimeException(String.format("送检确认必须提供 opCode"));
|
throw new RuntimeException("送检确认必须提供 opCode");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isBlank(entrust.getDeliverConfirmComments())) {
|
if (StrUtil.isBlank(entrust.getDeliverConfirmComments())) {
|
||||||
throw new RuntimeException(String.format("必须提供送检确认意见"));
|
throw new RuntimeException("必须提供送检确认意见");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查委托原来的状态
|
// 检查委托原来的状态
|
||||||
@@ -1869,7 +1836,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
entrustment.setPreviousStatus(entrustment.getStatus()); // 可能是从其他环节转过来的, 一旦提交, 保存上一个状态
|
entrustment.setPreviousStatus(entrustment.getStatus()); // 可能是从其他环节转过来的, 一旦提交, 保存上一个状态
|
||||||
entrustment.setStatus(newStatus); // 新的状态(环节), 可能会是审批或提交前
|
entrustment.setStatus(newStatus); // 新的状态(环节), 可能会是审批或提交前
|
||||||
|
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
updateWrapper.set("deliver_confirm_user", entrustment.getDeliverConfirmUser());
|
updateWrapper.set("deliver_confirm_user", entrustment.getDeliverConfirmUser());
|
||||||
@@ -1948,11 +1915,11 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 设置送检信息
|
* 设置送检信息
|
||||||
*
|
*
|
||||||
* @param entrustment
|
* @param entrustment 委托信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private static UpdateWrapper<Entrustment> getEntrustDeliverUpdateWrapper(Entrustment entrustment) {
|
private static UpdateWrapper<Entrustment> getEntrustDeliverUpdateWrapper(Entrustment entrustment) {
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
// updateWrapper.set("deliverer1_user_id", entrustment.getDeliverer1UserId());
|
// updateWrapper.set("deliverer1_user_id", entrustment.getDeliverer1UserId());
|
||||||
@@ -1978,7 +1945,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
public Entrustment bizDeliver_Apply(Entrustment entrust, Integer opCode, DLPUser dlpUser) {
|
public Entrustment bizDeliver_Apply(Entrustment entrust, Integer opCode, DLPUser dlpUser) {
|
||||||
|
|
||||||
if (opCode == null) {
|
if (opCode == null) {
|
||||||
throw new RuntimeException(String.format("送检操作必须提供 opCode"));
|
throw new RuntimeException("送检操作必须提供 opCode");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查委托原来的状态
|
// 检查委托原来的状态
|
||||||
@@ -2005,7 +1972,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
|
|
||||||
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
||||||
if (pis == null) {
|
if (pis == null) {
|
||||||
pis = new ArrayList<UpdateInfo>();
|
pis = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
||||||
@@ -2021,7 +1988,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
entrustment.setPreviousStatus(entrustment.getStatus()); // 可能是从其他环节转过来的, 一旦提交, 保存上一个状态
|
entrustment.setPreviousStatus(entrustment.getStatus()); // 可能是从其他环节转过来的, 一旦提交, 保存上一个状态
|
||||||
entrustment.setStatus(newStatus); // 新的状态(环节), 可能会是受理
|
entrustment.setStatus(newStatus); // 新的状态(环节), 可能会是受理
|
||||||
|
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
|
|
||||||
@@ -2067,7 +2034,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
|
// ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
|
||||||
// httpServletResponse.setContentType(new MimetypesFileTypeMap().getContentType(entrustmentLetterFileName));
|
// httpServletResponse.setContentType(new MimetypesFileTypeMap().getContentType(entrustmentLetterFileName));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage()));
|
System.out.printf("minioFile objectExist() Exception. %s%n", e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -2076,8 +2043,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 获取委托vo类,并验证数据是否合法
|
* 获取委托vo类,并验证数据是否合法
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id 委托id
|
||||||
* @param dlpUser
|
* @param dlpUser 当前用户
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private EntrustmentVO getEntrustmentVOAndVaildData(String id, DLPUser dlpUser) {
|
private EntrustmentVO getEntrustmentVOAndVaildData(String id, DLPUser dlpUser) {
|
||||||
@@ -2101,7 +2068,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 生成鉴定委托书
|
* 生成鉴定委托书
|
||||||
*
|
*
|
||||||
* @return
|
* @return 是否生成成功
|
||||||
*/
|
*/
|
||||||
private boolean GenerateEntrustmentLetterPDF(EntrustmentVO ev) throws Exception {
|
private boolean GenerateEntrustmentLetterPDF(EntrustmentVO ev) throws Exception {
|
||||||
System.out.println("bizGenerateEntrustmentWord.................");
|
System.out.println("bizGenerateEntrustmentWord.................");
|
||||||
@@ -2113,7 +2080,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
Map<String, Object> dm = ClassUtils.objectToMap(ev);
|
Map<String, Object> dm = ClassUtils.objectToMap(ev);
|
||||||
if (ev.getEntrustmentTime() == null) {
|
if (ev.getEntrustmentTime() == null) {
|
||||||
ev.setEntrustmentTime(LocalDateTime.now());
|
ev.setEntrustmentTime(LocalDateTime.now());
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
updateWrapper.set("entrustment_time", ev.getEntrustmentTime());
|
updateWrapper.set("entrustment_time", ev.getEntrustmentTime());
|
||||||
@@ -2173,9 +2140,9 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
for (EntrustmentIdentificationMaterial entrustmentIdentificationMaterial : materialList) {
|
for (EntrustmentIdentificationMaterial entrustmentIdentificationMaterial : materialList) {
|
||||||
BigDecimal quantity = entrustmentIdentificationMaterial.getQuantity();
|
BigDecimal quantity = entrustmentIdentificationMaterial.getQuantity();
|
||||||
if (quantity.compareTo(compareNumber) >= 0) {
|
if (quantity.compareTo(compareNumber) >= 0) {
|
||||||
entrustmentIdentificationMaterial.setQuantity(quantity.setScale(1, BigDecimal.ROUND_HALF_UP));
|
entrustmentIdentificationMaterial.setQuantity(quantity.setScale(1, RoundingMode.HALF_UP));
|
||||||
} else {
|
} else {
|
||||||
entrustmentIdentificationMaterial.setQuantity(quantity.setScale(2, BigDecimal.ROUND_HALF_UP));
|
entrustmentIdentificationMaterial.setQuantity(quantity.setScale(2, RoundingMode.HALF_UP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dm.put("materialList", materialList);
|
dm.put("materialList", materialList);
|
||||||
@@ -2216,12 +2183,12 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
boolean fileSave = ossFile.fileSave(OSSDirectoryConstants.DOCUMENT_ENTRUSTMENT_DIRECTORY + "/" + ev.getId() + "/" + entrustmentLetterFileName + ".docx", fisWord);
|
boolean fileSave = ossFile.fileSave(OSSDirectoryConstants.DOCUMENT_ENTRUSTMENT_DIRECTORY + "/" + ev.getId() + "/" + entrustmentLetterFileName + ".docx", fisWord);
|
||||||
fosWord.close();
|
fosWord.close();
|
||||||
fisWord.close();
|
fisWord.close();
|
||||||
System.out.println(String.format("转换为 Word 结束"));
|
System.out.println("转换为 Word 结束");
|
||||||
return fileSave;
|
return fileSave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean auditEntrustDataOfThirdSys(String userFlag, String entrustId, String dataPath, String result, String reMark) throws Exception {
|
public boolean auditEntrustDataOfThirdSys(String userFlag, String entrustId, String dataPath, String result, String reMark) {
|
||||||
EntrustOfThirdSys entrustOfThirdSys = synchronizeDataService.getThirdSysEntrustByMainId(entrustId);
|
EntrustOfThirdSys entrustOfThirdSys = synchronizeDataService.getThirdSysEntrustByMainId(entrustId);
|
||||||
if (entrustOfThirdSys == null) {
|
if (entrustOfThirdSys == null) {
|
||||||
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrustId));
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的委托", entrustId));
|
||||||
@@ -2272,7 +2239,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// 更新数据库表数据
|
// 更新数据库表数据
|
||||||
//-------------------
|
//-------------------
|
||||||
|
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", entrustment.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
updateWrapper.set("destructive_analysis", entrust.getDestructiveAnalysis());
|
updateWrapper.set("destructive_analysis", entrust.getDestructiveAnalysis());
|
||||||
@@ -2304,11 +2271,11 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// 20250114 贵阳禁毒需求,受理编号在提交审核时就生成
|
// 20250114 贵阳禁毒需求,受理编号在提交审核时就生成
|
||||||
// String newEntrustAcceptNo = "";
|
// String newEntrustAcceptNo = "";
|
||||||
if (opCode == null) {
|
if (opCode == null) {
|
||||||
throw new RuntimeException(String.format("受理必须提供 opCode"));
|
throw new RuntimeException("受理必须提供 opCode");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isBlank(entrust.getAcceptComments())) {
|
if (StrUtil.isBlank(entrust.getAcceptComments())) {
|
||||||
throw new RuntimeException(String.format("必须提供受理意见"));
|
throw new RuntimeException("必须提供受理意见");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查委托原来的状态
|
// 检查委托原来的状态
|
||||||
@@ -2336,7 +2303,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
//检查检材是否复秤,不复秤不能受理
|
//检查检材是否复秤,不复秤不能受理
|
||||||
boolean b = this.checkRepeatWeigh(entrustment);
|
boolean b = this.checkRepeatWeigh(entrustment);
|
||||||
if (b) {
|
if (b) {
|
||||||
throw new RuntimeException(String.format("有未复秤的样本,请给样本复秤"));
|
throw new RuntimeException("有未复秤的样本,请给样本复秤");
|
||||||
}
|
}
|
||||||
// 如果是确认受理, 需要检材全部都确认受理
|
// 如果是确认受理, 需要检材全部都确认受理
|
||||||
// 检查检材的受理状态
|
// 检查检材的受理状态
|
||||||
@@ -2426,7 +2393,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
|
|
||||||
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
||||||
if (pis == null) {
|
if (pis == null) {
|
||||||
pis = new ArrayList<UpdateInfo>();
|
pis = new ArrayList<>();
|
||||||
}
|
}
|
||||||
if (opCode == 1) {
|
if (opCode == 1) {
|
||||||
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
||||||
@@ -2477,27 +2444,25 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
boolean ret = acceptThirdSysEntrust("/api/identify/entrust/{entrustId}/accept", entrustment);
|
boolean ret = acceptThirdSysEntrust("/api/identify/entrust/{entrustId}/accept", entrustment);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
log.info("大数据平台受理成功 {}", entrustment.getId());
|
log.info("大数据平台受理成功 {}", entrustment.getId());
|
||||||
if (opCode > 0) {
|
List<EntrustmentIdentificationMaterial> imList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>query()
|
||||||
List<EntrustmentIdentificationMaterial> imList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>query()
|
.eq("entrustment_id", entrustment.getId()));
|
||||||
.eq("entrustment_id", entrustment.getId()));
|
List<Sample> newSampleList = new ArrayList<>();
|
||||||
List<Sample> newSampleList = new ArrayList<Sample>();
|
for (EntrustmentIdentificationMaterial im : imList) {
|
||||||
for (EntrustmentIdentificationMaterial im : imList) {
|
|
||||||
|
|
||||||
List<Sample> oldSampleList = sampleService.createSample(im, entrustment.getClientOrgId(), dlpUser.getId());
|
List<Sample> oldSampleList = sampleService.createSample(im, entrustment.getClientOrgId(), dlpUser.getId());
|
||||||
for (Sample oldSamObj : oldSampleList) {
|
for (Sample oldSamObj : oldSampleList) {
|
||||||
Sample newSamObj = new Sample();
|
Sample newSamObj = new Sample();
|
||||||
BeanUtils.copyProperties(oldSamObj, newSamObj);
|
BeanUtils.copyProperties(oldSamObj, newSamObj);
|
||||||
newSampleList.add(newSamObj);
|
newSampleList.add(newSamObj);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
System.out.println("-------------准备写入远程检材系统的数据量为:" + newSampleList.size());
|
|
||||||
//调用流转系统的接口,并将数据写过去
|
|
||||||
remoteSampleService.enterSample(newSampleList);
|
|
||||||
}
|
}
|
||||||
|
System.out.println("-------------准备写入远程检材系统的数据量为:" + newSampleList.size());
|
||||||
|
//调用流转系统的接口,并将数据写过去
|
||||||
|
remoteSampleService.enterSample(newSampleList);
|
||||||
} else {
|
} else {
|
||||||
isSuccess = false;
|
isSuccess = false;
|
||||||
log.info("大数据平台受理失败 {}", entrustment.getId());
|
log.info("大数据平台受理失败 {}", entrustment.getId());
|
||||||
throw new RuntimeException(String.format("同步受理信息至大数据平台失败,此次受理失败,请从大数据平台重新受理,然后将在本系统已受理页面将委托同步!"));
|
throw new RuntimeException("同步受理信息至大数据平台失败,此次受理失败,请从大数据平台重新受理,然后将在本系统已受理页面将委托同步!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
System.out.println("不支持的受理类型参数");
|
System.out.println("不支持的受理类型参数");
|
||||||
@@ -2505,7 +2470,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
} else {
|
} else {
|
||||||
List<EntrustmentIdentificationMaterial> imList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>query()
|
List<EntrustmentIdentificationMaterial> imList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>query()
|
||||||
.eq("entrustment_id", entrustment.getId()));
|
.eq("entrustment_id", entrustment.getId()));
|
||||||
List<Sample> newSampleList = new ArrayList<Sample>();
|
List<Sample> newSampleList = new ArrayList<>();
|
||||||
for (EntrustmentIdentificationMaterial im : imList) {
|
for (EntrustmentIdentificationMaterial im : imList) {
|
||||||
|
|
||||||
List<Sample> oldSampleList = sampleService.createSample(im, entrustment.getClientOrgId(), dlpUser.getId());
|
List<Sample> oldSampleList = sampleService.createSample(im, entrustment.getClientOrgId(), dlpUser.getId());
|
||||||
@@ -2526,7 +2491,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// throw new RuntimeException("同步大数据平台受理出错,此次受理失败");
|
// throw new RuntimeException("同步大数据平台受理出错,此次受理失败");
|
||||||
}
|
}
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
throw new RuntimeException(String.format("同步受理信息至大数据平台失败,此次受理失败,请从大数据平台重新受理,然后将在本系统已受理页面将委托同步!"));
|
throw new RuntimeException("同步受理信息至大数据平台失败,此次受理失败,请从大数据平台重新受理,然后将在本系统已受理页面将委托同步!");
|
||||||
}
|
}
|
||||||
return entrustment;
|
return entrustment;
|
||||||
}
|
}
|
||||||
@@ -2584,7 +2549,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// 转换临时目录中的 word 文档为 PDF
|
// 转换临时目录中的 word 文档为 PDF
|
||||||
String pdfFilePath = OSSDirectoryConstants.IDENTIFY_BOOK_DIRECTORY + "/" + ev.getId() + "/" + identifyItemsConfirmLetterFileName + ".pdf";
|
String pdfFilePath = OSSDirectoryConstants.IDENTIFY_BOOK_DIRECTORY + "/" + ev.getId() + "/" + identifyItemsConfirmLetterFileName + ".pdf";
|
||||||
String wordFilePath = OSSDirectoryConstants.IDENTIFY_BOOK_DIRECTORY + "/" + ev.getId() + "/" + identifyItemsConfirmLetterFileName + ".docx";
|
String wordFilePath = OSSDirectoryConstants.IDENTIFY_BOOK_DIRECTORY + "/" + ev.getId() + "/" + identifyItemsConfirmLetterFileName + ".docx";
|
||||||
String downFile = "";
|
String downFile;
|
||||||
//判断是要获取PDF还是word
|
//判断是要获取PDF还是word
|
||||||
if (pdfOrWord.equals("1")) {
|
if (pdfOrWord.equals("1")) {
|
||||||
downFile = wordFilePath;
|
downFile = wordFilePath;
|
||||||
@@ -2611,7 +2576,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage()));
|
System.out.printf("minioFile objectExist() Exception. %s%n", e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new RuntimeException(e.getMessage());
|
throw new RuntimeException(e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -2630,7 +2595,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
|
|
||||||
if (ev.getEntrustmentTime() == null) {
|
if (ev.getEntrustmentTime() == null) {
|
||||||
ev.setEntrustmentTime(LocalDateTime.now());
|
ev.setEntrustmentTime(LocalDateTime.now());
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
updateWrapper.set("entrustment_time", ev.getEntrustmentTime());
|
updateWrapper.set("entrustment_time", ev.getEntrustmentTime());
|
||||||
@@ -2708,7 +2673,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
isPDF.close();
|
isPDF.close();
|
||||||
|
|
||||||
|
|
||||||
System.out.println(String.format("转换为 PDF 结束"));
|
System.out.println("转换为 PDF 结束");
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -2735,7 +2700,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
entrustment.setPreviousStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()); // 老的状态也为待提交
|
entrustment.setPreviousStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()); // 老的状态也为待提交
|
||||||
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
List<UpdateInfo> pis = entrustment.getProcessInfo();
|
||||||
if (pis == null) {
|
if (pis == null) {
|
||||||
pis = new ArrayList<UpdateInfo>();
|
pis = new ArrayList<>();
|
||||||
}
|
}
|
||||||
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
||||||
dlpUser.getName(),
|
dlpUser.getName(),
|
||||||
@@ -2762,12 +2727,12 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!StrUtil.equalsIgnoreCase(dlpUser.getOrgId(), entrustment.getClientOrgId())) {
|
if (!StrUtil.equalsIgnoreCase(dlpUser.getOrgId(), entrustment.getClientOrgId())) {
|
||||||
return R.failed(String.format("这个委托的委托单位不是你的所属单位, 你无权删除!"));
|
return R.failed("这个委托的委托单位不是你的所属单位, 你无权删除!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus() ||
|
if (entrustment.getStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus() ||
|
||||||
entrustment.getPreviousStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) {
|
entrustment.getPreviousStatus() != EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()) {
|
||||||
return R.failed(String.format("这个委托已被提交过, 不能删除!"));
|
return R.failed("这个委托已被提交过, 不能删除!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2790,8 +2755,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R uploadAttachmentObj_Base64(String entrustmentId, JSONObject jsonParam) throws Exception {
|
public R uploadAttachmentObj_Base64(String entrustmentId, JSONObject jsonParam) {
|
||||||
System.out.println(String.format("uploadPhotoObj: entrustmentId=%s jsonParam.size()=%d", entrustmentId, jsonParam.size()));
|
System.out.printf("uploadPhotoObj: entrustmentId=%s jsonParam.size()=%d%n", entrustmentId, jsonParam.size());
|
||||||
Entrustment entrustment = this.getById(entrustmentId);
|
Entrustment entrustment = this.getById(entrustmentId);
|
||||||
if (entrustment != null) {
|
if (entrustment != null) {
|
||||||
|
|
||||||
@@ -2801,7 +2766,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
try {
|
try {
|
||||||
String suffix = image.substring(11, image.indexOf(";"));
|
String suffix = image.substring(11, image.indexOf(";"));
|
||||||
String fileName = DateUtil.format(new Date(), "yyyyMMddHHmmss") + "." + suffix;
|
String fileName = DateUtil.format(new Date(), "yyyyMMddHHmmss") + "." + suffix;
|
||||||
System.out.println(String.format("fileName=[%s]", fileName));
|
System.out.printf("fileName=[%s]%n", fileName);
|
||||||
|
|
||||||
//去掉头信息
|
//去掉头信息
|
||||||
String imgBase64 = image.substring(image.indexOf(",") + 1);
|
String imgBase64 = image.substring(image.indexOf(",") + 1);
|
||||||
@@ -2845,7 +2810,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
}
|
}
|
||||||
//String fileName = DateUtil.format(new Date(), "yyyyMMddHHmmss") + "-"+(picCount+1)+"." + suffix;
|
//String fileName = DateUtil.format(new Date(), "yyyyMMddHHmmss") + "-"+(picCount+1)+"." + suffix;
|
||||||
String fileName = IdWorker.get32UUID() + "." + suffix;
|
String fileName = IdWorker.get32UUID() + "." + suffix;
|
||||||
System.out.println(String.format("fileName=[%s]", fileName));
|
System.out.printf("fileName=[%s]%n", fileName);
|
||||||
//去掉头信息
|
//去掉头信息
|
||||||
String imgBase64 = image.substring(image.indexOf(",") + 1);
|
String imgBase64 = image.substring(image.indexOf(",") + 1);
|
||||||
byte[] decoded = org.apache.commons.codec.binary.Base64.decodeBase64(imgBase64);
|
byte[] decoded = org.apache.commons.codec.binary.Base64.decodeBase64(imgBase64);
|
||||||
@@ -2872,7 +2837,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R uploadAcceptAttachmentObj_Base64(String entrustmentId, JSONObject jsonParam) throws Exception {
|
public R uploadAcceptAttachmentObj_Base64(String entrustmentId, JSONObject jsonParam) throws Exception {
|
||||||
System.out.println(String.format("uploadPhotoObj: entrustmentId=%s jsonParam.size()=%d", entrustmentId, jsonParam.size()));
|
System.out.printf("uploadPhotoObj: entrustmentId=%s jsonParam.size()=%d%n", entrustmentId, jsonParam.size());
|
||||||
Entrustment entrustment = this.getById(entrustmentId);
|
Entrustment entrustment = this.getById(entrustmentId);
|
||||||
if (entrustment != null) {
|
if (entrustment != null) {
|
||||||
|
|
||||||
@@ -2882,7 +2847,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
try {
|
try {
|
||||||
String suffix = image.substring(11, image.indexOf(";"));
|
String suffix = image.substring(11, image.indexOf(";"));
|
||||||
String fileName = DateUtil.format(new Date(), "yyyyMMddHHmmss") + "." + suffix;
|
String fileName = DateUtil.format(new Date(), "yyyyMMddHHmmss") + "." + suffix;
|
||||||
System.out.println(String.format("fileName=[%s]", fileName));
|
System.out.printf("fileName=[%s]%n", fileName);
|
||||||
|
|
||||||
//去掉头信息
|
//去掉头信息
|
||||||
String imgBase64 = image.substring(image.indexOf(",") + 1);
|
String imgBase64 = image.substring(image.indexOf(",") + 1);
|
||||||
@@ -2934,7 +2899,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
return R.ok(commonFeignService.remoteGetUsersByPermission(entrustment.getClientOrgId(), CollUtil.newArrayList("EntrustmentConfirm")));
|
return R.ok(commonFeignService.remoteGetUsersByPermission(entrustment.getClientOrgId(), CollUtil.newArrayList("EntrustmentConfirm")));
|
||||||
} else if (entrustment.getStatus() == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CONFIRM.getStatus()) {
|
} else if (entrustment.getStatus() == EntrustmentStatusConstants.ENTRUSTMENT_STATUS_WAITING_CONFIRM.getStatus()) {
|
||||||
// 在确认者手中: 已审批, 待确认
|
// 在确认者手中: 已审批, 待确认
|
||||||
List<SysUser> users = new ArrayList<SysUser>();
|
List<SysUser> users = new ArrayList<>();
|
||||||
SysUser submitter = remoteUserService.innerGetById(entrustment.getSubmitter()).getData();
|
SysUser submitter = remoteUserService.innerGetById(entrustment.getSubmitter()).getData();
|
||||||
users.add(submitter);
|
users.add(submitter);
|
||||||
return R.ok(users);
|
return R.ok(users);
|
||||||
@@ -2955,9 +2920,9 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
String orgId = dlpUser.getOrgId();
|
String orgId = dlpUser.getOrgId();
|
||||||
|
|
||||||
Integer entrustmentIdentificationMaterialQuantity = 0;
|
Integer entrustmentIdentificationMaterialQuantity = 0;
|
||||||
Integer acceptanceIdentificationMaterialQuantity = 0;
|
Integer acceptanceIdentificationMaterialQuantity;
|
||||||
Integer sewageJobIdentificationMaterialQuantity = 0;
|
Integer sewageJobIdentificationMaterialQuantity;
|
||||||
Integer hairJobIdentificationMaterialQuantity = 0;
|
Integer hairJobIdentificationMaterialQuantity;
|
||||||
|
|
||||||
//查询这个账户(机构)下的所有委托中的所有已受理检材的数量
|
//查询这个账户(机构)下的所有委托中的所有已受理检材的数量
|
||||||
List<Entrustment> entrustmentList = this.list(new LambdaQueryWrapper<Entrustment>().eq(Entrustment::getClientOrgId, orgId));
|
List<Entrustment> entrustmentList = this.list(new LambdaQueryWrapper<Entrustment>().eq(Entrustment::getClientOrgId, orgId));
|
||||||
@@ -3020,7 +2985,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
// 如果没有提供案件编码, 生成一个
|
// 如果没有提供案件编码, 生成一个
|
||||||
|
|
||||||
if ((caseEvent.getHappenTime() != null) && (StrUtil.isNotBlank(caseEvent.getCaseOwnOrgId()))) {
|
if ((caseEvent.getHappenTime() != null) && (StrUtil.isNotBlank(caseEvent.getCaseOwnOrgId()))) {
|
||||||
SysOrg caseOwnOrg = null;
|
SysOrg caseOwnOrg;
|
||||||
R r = remoteOrgService.getById(caseEvent.getCaseOwnOrgId());
|
R r = remoteOrgService.getById(caseEvent.getCaseOwnOrgId());
|
||||||
if (r.getCode() == CommonConstants.SUCCESS) {
|
if (r.getCode() == CommonConstants.SUCCESS) {
|
||||||
caseOwnOrg = (SysOrg) r.getData();
|
caseOwnOrg = (SysOrg) r.getData();
|
||||||
@@ -3040,7 +3005,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
entrustmentDTO.setPreviousStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()); // 老的状态也为待提交
|
entrustmentDTO.setPreviousStatus(EntrustmentStatusConstants.ENTRUSTMENT_STATUS_CREATED.getStatus()); // 老的状态也为待提交
|
||||||
List<UpdateInfo> pis = entrustmentDTO.getProcessInfo();
|
List<UpdateInfo> pis = entrustmentDTO.getProcessInfo();
|
||||||
if (pis == null) {
|
if (pis == null) {
|
||||||
pis = new ArrayList<UpdateInfo>();
|
pis = new ArrayList<>();
|
||||||
}
|
}
|
||||||
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
UpdateInfo pi = new UpdateInfo(dlpUser.getId(),
|
||||||
dlpUser.getName(),
|
dlpUser.getName(),
|
||||||
@@ -3258,7 +3223,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
/**
|
/**
|
||||||
* 获得委托的小红点标记
|
* 获得委托的小红点标记
|
||||||
*
|
*
|
||||||
* @return
|
* @return 获得委托的小红点标记
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MarkersVO> getMarkersForEntrustment() {
|
public List<MarkersVO> getMarkersForEntrustment() {
|
||||||
@@ -3303,7 +3268,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, entrustmentList2.size(), "待受理 (大数据平台)"));
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, entrustmentList2.size(), "待受理 (大数据平台)"));
|
||||||
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, entrustmentList3.size(), String.format("已受理 (%s)", EntrustMarkConstants.PUBLIC_SECURITY_BUREAU)));
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, entrustmentList3.size(), String.format("已受理 (%s)", EntrustMarkConstants.PUBLIC_SECURITY_BUREAU)));
|
||||||
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, entrustmentList4.size(), "已受理 (大数据平台)"));
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, entrustmentList4.size(), "已受理 (大数据平台)"));
|
||||||
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, this.list(Wrappers.<Entrustment>lambdaQuery().inSql(Entrustment::getId, "SELECT entrust_id FROM b_entrust_material_checkout_result")).size(), "检测结果"));
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.CASE_ACCEPT, entrustmentList3.size(), "检测结果"));
|
||||||
markersVOS.add(new MarkersVO(EntrustMarkConstants.REVIEW_OR_APPROVAL,
|
markersVOS.add(new MarkersVO(EntrustMarkConstants.REVIEW_OR_APPROVAL,
|
||||||
this.list(new LambdaQueryWrapper<Entrustment>()
|
this.list(new LambdaQueryWrapper<Entrustment>()
|
||||||
.in(Entrustment::getStatus, integers1)
|
.in(Entrustment::getStatus, integers1)
|
||||||
@@ -3347,7 +3312,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterialList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
List<EntrustmentIdentificationMaterial> entrustmentIdentificationMaterialList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
||||||
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustment.getId())
|
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustment.getId())
|
||||||
.orderByAsc(EntrustmentIdentificationMaterial::getAcceptNo));
|
.orderByAsc(EntrustmentIdentificationMaterial::getAcceptNo));
|
||||||
if (entrustmentIdentificationMaterialList.size() > 0) {
|
if (!entrustmentIdentificationMaterialList.isEmpty()) {
|
||||||
if (entrustmentIdentificationMaterialList.size() > 18) {
|
if (entrustmentIdentificationMaterialList.size() > 18) {
|
||||||
int remainder = entrustmentIdentificationMaterialList.size() % 18;
|
int remainder = entrustmentIdentificationMaterialList.size() % 18;
|
||||||
if (remainder != 0) {
|
if (remainder != 0) {
|
||||||
@@ -3381,10 +3346,9 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
* 打印样本档案
|
* 打印样本档案
|
||||||
*
|
*
|
||||||
* @param entrustmentId
|
* @param entrustmentId
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void printSampleFile(String entrustmentId) throws Exception {
|
public void printSampleFile(String entrustmentId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3410,7 +3374,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return this.updateBatchById(list);
|
return super.updateBatchById(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3422,7 +3386,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IPage getEntrustmentAndMaterial(Page page, Integer status, String keywords) {
|
public IPage<EntrustmentVO> getEntrustmentAndMaterial(Page page, Integer status, String keywords) {
|
||||||
IPage<EntrustmentVO> voPage = this.getEntrustmentVOPage(page, Wrappers.<Entrustment>query()
|
IPage<EntrustmentVO> voPage = this.getEntrustmentVOPage(page, Wrappers.<Entrustment>query()
|
||||||
.and(StrUtil.isNotBlank(keywords), wrapper -> wrapper
|
.and(StrUtil.isNotBlank(keywords), wrapper -> wrapper
|
||||||
.like("e.entrustment_no", keywords)
|
.like("e.entrustment_no", keywords)
|
||||||
@@ -3456,9 +3420,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
public boolean isMaterialPhoto(String entrustmentId) {
|
public boolean isMaterialPhoto(String entrustmentId) {
|
||||||
String path = "document/accept" + "/" + entrustmentId + "/materialPhoto";
|
String path = "document/accept" + "/" + entrustmentId + "/materialPhoto";
|
||||||
List<String> fileName = ossFile.fileList(path);
|
List<String> fileName = ossFile.fileList(path);
|
||||||
if (fileName.size() > 0) {
|
return !fileName.isEmpty();
|
||||||
return true;
|
|
||||||
} else return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3569,7 +3531,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
.orderByDesc(Entrustment::getCreateTime)); // 按创建时间降序排列
|
.orderByDesc(Entrustment::getCreateTime)); // 按创建时间降序排列
|
||||||
|
|
||||||
// 如果查询结果不为空且至少有一个条目
|
// 如果查询结果不为空且至少有一个条目
|
||||||
if (list != null && list.size() > 0) {
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
Entrustment entrustment = list.get(0); // 获取最新的一条记录
|
Entrustment entrustment = list.get(0); // 获取最新的一条记录
|
||||||
|
|
||||||
List<Deliverer> deliverers = new ArrayList<>(); // 创建一个列表来保存配送员信息
|
List<Deliverer> deliverers = new ArrayList<>(); // 创建一个列表来保存配送员信息
|
||||||
|
|||||||
@@ -31,10 +31,8 @@ public class CaseEventVO extends CaseEvent {
|
|||||||
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
|
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
|
||||||
private Integer entrustmentType;
|
private Integer entrustmentType;
|
||||||
|
|
||||||
/**
|
@ApiModelProperty(value="原鉴定结果(鉴定情况)," +
|
||||||
* 20250121 新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分
|
"常规毒品:首次鉴定、初筛(不要报告、只要结果)、补充鉴定、重新鉴定;" +
|
||||||
* 存字符串,不用code表达
|
"生物样本:首次鉴定、初筛(不要报告、只要结果)、涉缅人员、自愿戒治人员、补充鉴定、重新鉴定")
|
||||||
*/
|
private String oldIdentificationResult;
|
||||||
@ApiModelProperty("新增的一个委托类型,选择生物样本类型后需要区分是 0 委托、1 初筛、 2 两社人员、 3 其他人员, 常规毒品 0 委托 1 初筛,其他的不需要区分")
|
|
||||||
private String type;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,11 @@ public class EntrustAlterApplyVO {
|
|||||||
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
|
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
|
||||||
private Integer entrustmentType;
|
private Integer entrustmentType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="原鉴定结果(鉴定情况)," +
|
||||||
|
"常规毒品:首次鉴定、初筛(不要报告、只要结果)、补充鉴定、重新鉴定;" +
|
||||||
|
"生物样本:首次鉴定、初筛(不要报告、只要结果)、涉缅人员、自愿戒治人员、补充鉴定、重新鉴定")
|
||||||
|
private String oldIdentificationResult;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package digital.laboratory.platform.entrustment.vo;
|
package digital.laboratory.platform.entrustment.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -20,6 +23,9 @@ public class EntrustMaterialCheckoutResultVO {
|
|||||||
@ApiModelProperty("委托检材id列表, 支持批量")
|
@ApiModelProperty("委托检材id列表, 支持批量")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "检材受理编号")
|
||||||
|
private String acceptNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 委托检材id
|
* 委托检材id
|
||||||
*/
|
*/
|
||||||
@@ -36,13 +42,14 @@ public class EntrustMaterialCheckoutResultVO {
|
|||||||
* 定性结果
|
* 定性结果
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("定性结果")
|
@ApiModelProperty("定性结果")
|
||||||
private List<DrugLite> qualitativeResult;
|
private String qualitativeResult;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定量结果
|
* 定量结果
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("定量结果")
|
@ApiModelProperty("定量结果")
|
||||||
private List<String> quantitativeResult;
|
private String quantitativeResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 其他鉴定结果
|
* 其他鉴定结果
|
||||||
|
|||||||
@@ -86,23 +86,27 @@
|
|||||||
org.name AS case_org_name,
|
org.name AS case_org_name,
|
||||||
org.alias AS case_org_short_name,
|
org.alias AS case_org_short_name,
|
||||||
e.accept_no,
|
e.accept_no,
|
||||||
(SELECT user.name
|
e.entrustment_type,
|
||||||
FROM dlp_base.sys_user user
|
e.old_identification_result,
|
||||||
WHERE user.user_id=cj.create_by
|
(
|
||||||
) AS case_create_user_name
|
SELECT user.name
|
||||||
, (
|
FROM dlp_base.sys_user user
|
||||||
SELECT user.name
|
WHERE user.user_id=cj.create_by
|
||||||
FROM dlp_base.sys_user user
|
) AS case_create_user_name
|
||||||
WHERE user.user_id=cj.update_by
|
, (
|
||||||
) AS case_update_user_name
|
SELECT user.name
|
||||||
, (
|
FROM dlp_base.sys_user user
|
||||||
SELECT area.name
|
WHERE user.user_id=cj.update_by
|
||||||
FROM dlp_base.b_area area
|
) AS case_update_user_name
|
||||||
WHERE area.id=cj.case_area
|
, (
|
||||||
) AS case_area_name
|
SELECT area.name
|
||||||
|
FROM dlp_base.b_area area
|
||||||
|
WHERE area.id=cj.case_area
|
||||||
|
) AS case_area_name
|
||||||
|
|
||||||
FROM b_case_event cj
|
FROM b_case_event cj
|
||||||
LEFT JOIN dlp_base.sys_org org ON org.org_id=cj.case_own_org_id
|
LEFT JOIN dlp_base.sys_org org
|
||||||
|
ON org.org_id=cj.case_own_org_id
|
||||||
LEFT JOIN b_entrustment e ON cj.id=e.case_id
|
LEFT JOIN b_entrustment e ON cj.id=e.case_id
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -35,7 +35,8 @@
|
|||||||
eaa.*,
|
eaa.*,
|
||||||
ce.case_name,
|
ce.case_name,
|
||||||
ce.id as case_id,
|
ce.id as case_id,
|
||||||
e.entrustment_type
|
e.entrustment_type,
|
||||||
|
e.old_identification_result
|
||||||
FROM
|
FROM
|
||||||
b_entrust_alter_apply eaa
|
b_entrust_alter_apply eaa
|
||||||
LEFT JOIN b_entrustment e ON eaa.entrust_id = e.id
|
LEFT JOIN b_entrustment e ON eaa.entrust_id = e.id
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
<resultMap id="BaseResultMap" type="digital.laboratory.platform.entrustment.entity.EntrustMaterialCheckoutResult">
|
<resultMap id="BaseResultMap" type="digital.laboratory.platform.entrustment.entity.EntrustMaterialCheckoutResult">
|
||||||
<id property="id" column="entrust_material_id" jdbcType="VARCHAR"/>
|
<id property="id" column="entrust_material_id" jdbcType="VARCHAR"/>
|
||||||
<result property="entrustId" column="entrust_id" jdbcType="VARCHAR"/>
|
<result property="entrustId" column="entrust_id" jdbcType="VARCHAR"/>
|
||||||
<result property="qualitativeResult" column="qualitative_result" jdbcType="VARCHAR" typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
<result property="qualitativeResult" column="qualitative_result"/>
|
||||||
<result property="quantitativeResult" column="quantitative_result" jdbcType="VARCHAR"/>
|
<result property="quantitativeResult" column="quantitative_result" jdbcType="VARCHAR"/>
|
||||||
<result property="otherResult" column="other_result" jdbcType="VARCHAR"/>
|
<result property="otherResult" column="other_result" jdbcType="VARCHAR"/>
|
||||||
|
<result property="checkoutRemark" column="checkout_remark" jdbcType="VARCHAR"/>
|
||||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
|
|
||||||
<resultMap id="EntrustMaterialCheckoutResultVO" type="digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO" extends="BaseResultMap">
|
<resultMap id="EntrustMaterialCheckoutResultVO" type="digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO" extends="BaseResultMap">
|
||||||
<result property="name" column ="name"/>
|
<result property="name" column ="name"/>
|
||||||
|
<result property="acceptNo" column ="accept_no"/>
|
||||||
<result property="orderNo" column ="order_no"/>
|
<result property="orderNo" column ="order_no"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@@ -35,9 +37,14 @@
|
|||||||
|
|
||||||
<sql id="getEntrustMaterialCheckoutResultVO">
|
<sql id="getEntrustMaterialCheckoutResultVO">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="Base_Column_List"/>,
|
emr.entrust_material_id,
|
||||||
|
emr.entrust_id,
|
||||||
|
emr.qualitative_result,
|
||||||
|
emr.quantitative_result,
|
||||||
|
emr.other_result,
|
||||||
em.name,
|
em.name,
|
||||||
em.entrustment_id,
|
em.entrustment_id,
|
||||||
|
em.accept_no,
|
||||||
em.order_no
|
em.order_no
|
||||||
FROM b_entrust_material_checkout_result emr
|
FROM b_entrust_material_checkout_result emr
|
||||||
LEFT JOIN b_entrustment_identification_material em
|
LEFT JOIN b_entrustment_identification_material em
|
||||||
|
|||||||
@@ -121,6 +121,7 @@
|
|||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="returnOrNot" column="return_or_not"/>
|
<result property="returnOrNot" column="return_or_not"/>
|
||||||
|
<result property="returnOrNot" column="material_image_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="entrustmentVO" type="digital.laboratory.platform.entrustment.vo.EntrustmentVO" extends="entrustmentMap">
|
<resultMap id="entrustmentVO" type="digital.laboratory.platform.entrustment.vo.EntrustmentVO" extends="entrustmentMap">
|
||||||
@@ -274,7 +275,8 @@
|
|||||||
e.entrust_requirement,
|
e.entrust_requirement,
|
||||||
e.post_address,
|
e.post_address,
|
||||||
e.return_or_not,
|
e.return_or_not,
|
||||||
e.is_trans
|
e.is_trans,
|
||||||
|
e.material_image_flag
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="getEntrustmentVOSQL">
|
<sql id="getEntrustmentVOSQL">
|
||||||
@@ -363,7 +365,7 @@
|
|||||||
where i.id = e.identification_id
|
where i.id = e.identification_id
|
||||||
) as identification_no,
|
) as identification_no,
|
||||||
(
|
(
|
||||||
SELECT COUNT(*) FROM b_entrust_material_checkout_result emr WHERE emr.entrust_id = e.id
|
SELECT COUNT(*) FROM b_entrust_material_checkout_result emr WHERE emr.entrust_id = e.id AND qualitative_result != '' AND qualitative_result IS NOT NULL
|
||||||
) AS checkout_result_count
|
) AS checkout_result_count
|
||||||
|
|
||||||
FROM b_entrustment e
|
FROM b_entrustment e
|
||||||
|
|||||||
Reference in New Issue
Block a user