update
This commit is contained in:
@@ -55,7 +55,7 @@ public class Entrustment extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 委托类型: 0=正常司法鉴定委托, 1=案前委托
|
* 委托类型: 0=正常司法鉴定委托, 1=案前委托
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="委托类型: 0=正常司法鉴定委托, 1=案前委托")
|
@ApiModelProperty(value="委托类型: 0=常规毒品, 1=生物样本")
|
||||||
private Integer entrustmentType;
|
private Integer entrustmentType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -746,4 +746,6 @@ public class Entrustment extends BaseEntity {
|
|||||||
private Integer returnOrNot;
|
private Integer returnOrNot;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ public class EntrustmentIdentificationMaterial extends BaseEntity {
|
|||||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||||
private List<DrugLite> candidateDrugs;
|
private List<DrugLite> candidateDrugs;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "候选毒品列表转为字符串")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String drugsValue;
|
||||||
/**
|
/**
|
||||||
* 检材概要
|
* 检材概要
|
||||||
*/
|
*/
|
||||||
@@ -480,6 +483,10 @@ public class EntrustmentIdentificationMaterial extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Integer analysisOption;
|
private Integer analysisOption;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "将分析项目转为字符串类型")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String analysisOptionValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据来源,用于区别数据来自自身系统还是外部系统
|
* 数据来源,用于区别数据来自自身系统还是外部系统
|
||||||
*/
|
*/
|
||||||
@@ -498,6 +505,21 @@ public class EntrustmentIdentificationMaterial extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "委托检材顺序号,由系统根据录入顺序生成")
|
@ApiModelProperty(value = "委托检材顺序号,由系统根据录入顺序生成")
|
||||||
private Integer orderNo;
|
private Integer orderNo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提取时间")
|
||||||
|
private LocalDateTime extractionTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "打印提取时间")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String printExtractionTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提取地点")
|
||||||
|
private String extractionSite;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "留存样个数")
|
||||||
|
private Integer rtSampleQuantity;
|
||||||
|
@ApiModelProperty(value = "包装是否完整")
|
||||||
|
private boolean completePackage;
|
||||||
|
|
||||||
public String getOrderNo1() {
|
public String getOrderNo1() {
|
||||||
return this.orderNo + "号检材";
|
return this.orderNo + "号检材";
|
||||||
}
|
}
|
||||||
@@ -525,6 +547,7 @@ public class EntrustmentIdentificationMaterial extends BaseEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取检材的序号
|
* 取检材的序号
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -112,4 +112,6 @@ public interface EntrustmentIdentificationMaterialService extends IService<Entru
|
|||||||
List<String> printManyLabel(List<PrintDTO> printDTOList);
|
List<String> printManyLabel(List<PrintDTO> printDTOList);
|
||||||
|
|
||||||
String printMaterialArchives(String entrustmentId) throws Exception;
|
String printMaterialArchives(String entrustmentId) throws Exception;
|
||||||
|
|
||||||
|
void conformityDrugs(List<EntrustmentIdentificationMaterial> list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1599,5 +1599,46 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void conformityDrugs(List<EntrustmentIdentificationMaterial> list) {
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
for (EntrustmentIdentificationMaterial material : list) {
|
||||||
|
Integer analysisOption = material.getAnalysisOption();
|
||||||
|
switch (analysisOption) {
|
||||||
|
case 1:
|
||||||
|
material.setAnalysisOptionValue("定性分析");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
material.setAnalysisOptionValue("定量分析");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
material.setAnalysisOptionValue("定性定量分析");
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
material.setAnalysisOptionValue("关联性判断");
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
material.setAnalysisOptionValue("其他");
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
material.setPrintExtractionTime(LocalDateTimeUtil.format(material.getExtractionTime(), "yyyy-MM-dd"));
|
||||||
|
List<DrugLite> candidateDrugs = material.getCandidateDrugs();
|
||||||
|
String drugsValue = "";
|
||||||
|
if (candidateDrugs == null || candidateDrugs.size() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < candidateDrugs.size(); i++) {
|
||||||
|
DrugLite drugLite = candidateDrugs.get(i);
|
||||||
|
if (i == 0) {
|
||||||
|
drugsValue = drugLite.getName();
|
||||||
|
} else {
|
||||||
|
drugsValue += "、" + drugLite.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
material.setDrugsValue(drugsValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,10 +212,10 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
if (StringUtils.isNotBlank(maxNo)) {
|
if (StringUtils.isNotBlank(maxNo)) {
|
||||||
maxNo = maxNo.substring(maxNo.lastIndexOf("-") + 1);
|
maxNo = maxNo.substring(maxNo.lastIndexOf("-") + 1);
|
||||||
int newCount = Integer.valueOf(maxNo) + 1;
|
int newCount = Integer.valueOf(maxNo) + 1;
|
||||||
String second_part = fillByZero(newCount);
|
// String second_part = fillByZero(newCount);
|
||||||
newWtNO = first_part + splitSymbol + second_part;
|
newWtNO = first_part + splitSymbol + newCount;
|
||||||
} else {
|
} else {
|
||||||
newWtNO = first_part + splitSymbol + "0001";
|
newWtNO = first_part + splitSymbol + "1";
|
||||||
}
|
}
|
||||||
return newWtNO;
|
return newWtNO;
|
||||||
}
|
}
|
||||||
@@ -271,17 +271,18 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
int current_year = date.getYear();
|
int current_year = date.getYear();
|
||||||
String first_part = prefix + current_year;
|
String first_part = prefix + current_year;
|
||||||
String maxAcceptNo = this.getBaseMapper().getMaxEntrustAcceptNo(first_part);
|
String maxAcceptNo = this.getBaseMapper().getMaxEntrustAcceptNo(first_part);
|
||||||
|
|
||||||
String newAcceptNo = "";
|
String newAcceptNo = "";
|
||||||
if (StringUtils.isNotBlank(maxAcceptNo)) {
|
if (StringUtils.isNotBlank(maxAcceptNo)) {
|
||||||
//判断跨年的情况,如果跨年肯定现在年份和之前年份不一样,如果是新的一年编号应该从新编号
|
//判断跨年的情况,如果跨年肯定现在年份和之前年份不一样,如果是新的一年编号应该从新编号
|
||||||
String seqNo = maxAcceptNo.substring(maxAcceptNo.lastIndexOf("-") + 1);
|
String seqNo = maxAcceptNo.substring(maxAcceptNo.lastIndexOf("-") + 1);
|
||||||
int newCount = Integer.valueOf(seqNo) + 1;
|
int newCount = Integer.valueOf(seqNo) + 1;
|
||||||
String second_part = "";
|
// String second_part = "";
|
||||||
second_part = fillByZero(newCount);
|
// second_part = fillByZero(newCount);
|
||||||
newAcceptNo = first_part + splitSymbol + second_part;
|
newAcceptNo = first_part + splitSymbol + newCount;
|
||||||
} else {
|
} else {
|
||||||
//说明库里一条没有,则从1开始的编号
|
//说明库里一条没有,则从1开始的编号
|
||||||
newAcceptNo = first_part + splitSymbol + "0001";
|
newAcceptNo = first_part + splitSymbol + "1";
|
||||||
}
|
}
|
||||||
return newAcceptNo;
|
return newAcceptNo;
|
||||||
}
|
}
|
||||||
@@ -334,6 +335,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
@Override
|
@Override
|
||||||
public EntrustmentVO getEntrustmentVOById(String id) {
|
public EntrustmentVO getEntrustmentVOById(String id) {
|
||||||
EntrustmentVO evo = baseMapper.getEntrustmentVOById(id);
|
EntrustmentVO evo = baseMapper.getEntrustmentVOById(id);
|
||||||
|
evo.setHappenTime(LocalDateTimeUtil.format(caseEventService.getById(evo.getCaseId()).getHappenTime(), "yyyy年MM月dd日"));
|
||||||
evo.setStatusDescription(EntrustmentStatusConstants.getStatusDescription(evo.getStatus()));
|
evo.setStatusDescription(EntrustmentStatusConstants.getStatusDescription(evo.getStatus()));
|
||||||
evo.setPreviousStatusDescription(EntrustmentStatusConstants.getStatusDescription(evo.getPreviousStatus()));
|
evo.setPreviousStatusDescription(EntrustmentStatusConstants.getStatusDescription(evo.getPreviousStatus()));
|
||||||
return evo;
|
return evo;
|
||||||
@@ -456,6 +458,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
listNameCollection.add("drugList");
|
listNameCollection.add("drugList");
|
||||||
listNameCollection.add("materialAList");
|
listNameCollection.add("materialAList");
|
||||||
listNameCollection.add("materialRList");
|
listNameCollection.add("materialRList");
|
||||||
|
//把筛查物列表转为一行字符串
|
||||||
|
entrustmentIdentificationMaterialService.conformityDrugs(materialList);
|
||||||
Map<String, Object> data = generateIdentifyItemsData(caseEvent, entrustment, materialList);
|
Map<String, Object> data = generateIdentifyItemsData(caseEvent, entrustment, materialList);
|
||||||
R ret = remoteGenerateWordService.generateWord(templateName, originalFilename, templatePath, fileType, QRContent, listNameCollection, false, data);
|
R ret = remoteGenerateWordService.generateWord(templateName, originalFilename, templatePath, fileType, QRContent, listNameCollection, false, data);
|
||||||
if (ret.getCode() == 0) {
|
if (ret.getCode() == 0) {
|
||||||
@@ -476,6 +480,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Map<String, Object> generateIdentifyItemsData(CaseEvent caseEvent, Entrustment entrustment, List<EntrustmentIdentificationMaterial> materialList) {
|
private Map<String, Object> generateIdentifyItemsData(CaseEvent caseEvent, Entrustment entrustment, List<EntrustmentIdentificationMaterial> materialList) {
|
||||||
|
R<SysUser> sysUserR = remoteUserService.innerGetById(entrustment.getAcceptUser());
|
||||||
|
String acceptName = sysUserR.getData().getName();
|
||||||
Map<String, Object> dm = new HashMap<>();
|
Map<String, Object> dm = new HashMap<>();
|
||||||
//构建案件部分需要的参数值
|
//构建案件部分需要的参数值
|
||||||
dm.put("caseName", caseEvent.getCaseName());
|
dm.put("caseName", caseEvent.getCaseName());
|
||||||
@@ -496,7 +502,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
dm.put("sendDate", LocalDateTimeUtil.format(entrustment.getDeliverTime(), "yyyy年MM月dd日"));//送检日期
|
dm.put("sendDate", LocalDateTimeUtil.format(entrustment.getDeliverTime(), "yyyy年MM月dd日"));//送检日期
|
||||||
dm.put("identityStatement", "本鉴定机构工作遵循公正独立、程序规范、方法科学、结论准确的原则,严格履行质量承诺。");//鉴定机构声明
|
dm.put("identityStatement", "本鉴定机构工作遵循公正独立、程序规范、方法科学、结论准确的原则,严格履行质量承诺。");//鉴定机构声明
|
||||||
dm.put("acceptDate", LocalDateTimeUtil.format(entrustment.getAcceptTime(), "yyyy年MM月dd日"));//受理日期
|
dm.put("acceptDate", LocalDateTimeUtil.format(entrustment.getAcceptTime(), "yyyy年MM月dd日"));//受理日期
|
||||||
|
dm.put("acceptName", acceptName);
|
||||||
dm.put("materialList", getMaterialBookVoList(materialList));//检材列表
|
dm.put("materialList", getMaterialBookVoList(materialList));//检材列表
|
||||||
//设置取样方法
|
//设置取样方法
|
||||||
dm.put("samplingMethod", getSamplingMethod(materialList));
|
dm.put("samplingMethod", getSamplingMethod(materialList));
|
||||||
@@ -530,6 +536,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
return dm;
|
return dm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//文书发放方式转中文
|
//文书发放方式转中文
|
||||||
private String changePublishWayToZhCn(String flag) {
|
private String changePublishWayToZhCn(String flag) {
|
||||||
String ret = "";
|
String ret = "";
|
||||||
@@ -712,7 +719,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
EntrustmentIdentificationMaterial materialObj = v.get(0);
|
EntrustmentIdentificationMaterial materialObj = v.get(0);
|
||||||
String typeName = "";
|
String typeName = "";
|
||||||
if (materialObj.getTypeName().equals("inVitro")) {
|
if (materialObj.getTypeName().equals("inVitro")) {
|
||||||
typeName = "缴获物";
|
typeName = "常规毒品";
|
||||||
} else if (materialObj.getTypeName().equals("inVivo")) {
|
} else if (materialObj.getTypeName().equals("inVivo")) {
|
||||||
typeName = "生物样本";
|
typeName = "生物样本";
|
||||||
} else {
|
} else {
|
||||||
@@ -2195,7 +2202,20 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
throw new RuntimeException("保存委托日期失败");
|
throw new RuntimeException("保存委托日期失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String oldIdentificationBrief = ev.getOldIdentificationBrief();
|
||||||
|
String oldIdentification = "";
|
||||||
|
switch (oldIdentificationBrief) {
|
||||||
|
case "首次鉴定":
|
||||||
|
oldIdentification = "☑首次鉴定;□补充鉴定;□重新鉴定";
|
||||||
|
break;
|
||||||
|
case "补充鉴定":
|
||||||
|
oldIdentification = "□首次鉴定;☑补充鉴定;□重新鉴定";
|
||||||
|
break;
|
||||||
|
case "重新鉴定":
|
||||||
|
oldIdentification = "□首次鉴定;□补充鉴定;☑重新鉴定";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
dm.put("oldIdentification", oldIdentification);
|
||||||
dm.put("entrustmentTime", LocalDateTimeUtil.format(ev.getEntrustmentTime(), "yyyy年MM月dd日"));
|
dm.put("entrustmentTime", LocalDateTimeUtil.format(ev.getEntrustmentTime(), "yyyy年MM月dd日"));
|
||||||
|
|
||||||
List<EntrustmentIdentificationMaterialVO> ems = entrustmentIdentificationMaterialService.getEntrustmentIdentificationMaterialVOList(Wrappers.<EntrustmentIdentificationMaterial>query()
|
List<EntrustmentIdentificationMaterialVO> ems = entrustmentIdentificationMaterialService.getEntrustmentIdentificationMaterialVOList(Wrappers.<EntrustmentIdentificationMaterial>query()
|
||||||
@@ -2217,6 +2237,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
.eq("entrustment_id", ev.getId())
|
.eq("entrustment_id", ev.getId())
|
||||||
.orderByAsc("create_time")
|
.orderByAsc("create_time")
|
||||||
);
|
);
|
||||||
|
entrustmentIdentificationMaterialService.conformityDrugs(materialList);
|
||||||
//设置检材描述
|
//设置检材描述
|
||||||
dm.put("materialDes", this.buildMaterialDes(materialList));
|
dm.put("materialDes", this.buildMaterialDes(materialList));
|
||||||
//设置鉴定要求
|
//设置鉴定要求
|
||||||
|
|||||||
@@ -37,5 +37,7 @@ public class EntrustmentVO extends Entrustment {
|
|||||||
|
|
||||||
String identificationNo;
|
String identificationNo;
|
||||||
|
|
||||||
|
String happenTime;//案发时间
|
||||||
|
|
||||||
private List<EntrustmentIdentificationMaterial> materialList;//检材列表
|
private List<EntrustmentIdentificationMaterial> materialList;//检材列表
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user