更新
1.委托申请时,添加可以修改委托鉴定要求
This commit is contained in:
+3
@@ -24,6 +24,9 @@ public class ApprovedUpdateEntrustDTO {
|
|||||||
@ApiModelProperty(value = "案件简要")
|
@ApiModelProperty(value = "案件简要")
|
||||||
private String caseBrief;
|
private String caseBrief;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "鉴定要求")
|
||||||
|
private String entrustRequirement;
|
||||||
|
|
||||||
@ApiModelProperty(value = "委托检材列表")
|
@ApiModelProperty(value = "委托检材列表")
|
||||||
private List<MaterialDTO> materialList;
|
private List<MaterialDTO> materialList;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package digital.laboratory.platform.entrustment.dto;
|
package digital.laboratory.platform.entrustment.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import digital.laboratory.platform.entrustment.entity.Entrustment;
|
import digital.laboratory.platform.entrustment.entity.Entrustment;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -11,6 +12,7 @@ public class EntrustmentDTO extends Entrustment {
|
|||||||
private String caseBrief;
|
private String caseBrief;
|
||||||
private String caseName;
|
private String caseName;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
private LocalDate happenTime;
|
private LocalDate happenTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,20 +5,20 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||||
//import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||||
import digital.laboratory.platform.sewage.entity.UpdateInfo;
|
import digital.laboratory.platform.sewage.entity.UpdateInfo;
|
||||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 委托
|
* 委托
|
||||||
@@ -80,7 +80,8 @@ public class Entrustment extends BaseEntity {
|
|||||||
* 委托日期, 鉴定委托书打印日期
|
* 委托日期, 鉴定委托书打印日期
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value="委托日期, 鉴定委托书打印日期")
|
@ApiModelProperty(value="委托日期, 鉴定委托书打印日期")
|
||||||
private LocalDateTime entrustmentTime;
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private LocalDate entrustmentTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 委托提交者, 后期可能会转给其他人user_id
|
* 委托提交者, 后期可能会转给其他人user_id
|
||||||
|
|||||||
+12
-6
@@ -275,7 +275,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
}
|
}
|
||||||
entrustmentIdentificationMaterialService.updateBatchById(entrustmentIdentificationMaterialList);
|
entrustmentIdentificationMaterialService.updateBatchById(entrustmentIdentificationMaterialList);
|
||||||
// 3. 更新委托鉴定要求
|
// 3. 更新委托鉴定要求
|
||||||
updateEntrustmentRequirement(entrustmentId, entrustment);
|
updateEntrustmentRequirement(entrustmentId, entrustment, dto.getEntrustRequirement());
|
||||||
// 如果确认完成,则删除鉴定事项确认书和委托书,并更新申请状态为已完成
|
// 如果确认完成,则删除鉴定事项确认书和委托书,并更新申请状态为已完成
|
||||||
if (dto.getFinished()) {
|
if (dto.getFinished()) {
|
||||||
// 4.删除鉴定事项确认书和委托书
|
// 4.删除鉴定事项确认书和委托书
|
||||||
@@ -305,14 +305,20 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新鉴定要求
|
* 更新鉴定要求
|
||||||
|
*
|
||||||
* @param entrustmentId
|
* @param entrustmentId
|
||||||
* @param entrustment
|
* @param entrustment
|
||||||
|
* @param entrustRequirement
|
||||||
*/
|
*/
|
||||||
public void updateEntrustmentRequirement(String entrustmentId, Entrustment entrustment) {
|
public void updateEntrustmentRequirement(String entrustmentId, Entrustment entrustment, String entrustRequirement) {
|
||||||
List<EntrustmentIdentificationMaterial> renewList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
if (StrUtil.isNotBlank(entrustRequirement)) {
|
||||||
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId)
|
entrustment.setEntrustRequirement(entrustRequirement);
|
||||||
.orderByAsc(EntrustmentIdentificationMaterial::getOrderNo));
|
} else {
|
||||||
entrustment.setEntrustRequirement(entrustmentService.buildEntrustReq(renewList));
|
List<EntrustmentIdentificationMaterial> renewList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
||||||
|
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustmentId)
|
||||||
|
.orderByAsc(EntrustmentIdentificationMaterial::getOrderNo));
|
||||||
|
entrustment.setEntrustRequirement(entrustmentService.buildEntrustReq(renewList));
|
||||||
|
}
|
||||||
entrustmentService.updateById(entrustment);
|
entrustmentService.updateById(entrustment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -2130,7 +2130,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(LocalDate.now());
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
||||||
updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
@@ -2641,7 +2641,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(LocalDate.now());
|
||||||
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
UpdateWrapper<Entrustment> updateWrapper = new UpdateWrapper<Entrustment>();
|
||||||
updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等
|
updateWrapper.eq("id", ev.getId()); // 查询条件是 id 相等
|
||||||
|
|
||||||
@@ -3477,7 +3477,7 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
@Override
|
@Override
|
||||||
public boolean alertTimeFiledInfoByEntrustDate(Entrustment entrustment) {
|
public boolean alertTimeFiledInfoByEntrustDate(Entrustment entrustment) {
|
||||||
Entrustment entrust = super.getById(entrustment.getId());
|
Entrustment entrust = super.getById(entrustment.getId());
|
||||||
LocalDateTime entrustTime = entrust.getEntrustmentTime();
|
LocalDate entrustTime = entrust.getEntrustmentTime();
|
||||||
if (entrustTime == null) {
|
if (entrustTime == null) {
|
||||||
throw new ValidateCodeException("该委托信息中的委托时间为空!");
|
throw new ValidateCodeException("该委托信息中的委托时间为空!");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user