20250110 更新
This commit is contained in:
@@ -7,8 +7,6 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration // ???
|
||||
@@ -18,10 +16,10 @@ import org.springframework.context.annotation.Configuration;
|
||||
@EnableDLPResourceServer
|
||||
@SpringBootApplication(scanBasePackages="digital.laboratory.platform")
|
||||
@EnableCaching
|
||||
public class IdentificationMaterialRepositoryApplication {
|
||||
public class DlpRepositoryApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(IdentificationMaterialRepositoryApplication.class, args);
|
||||
SpringApplication.run(DlpRepositoryApplication.class, args);
|
||||
|
||||
|
||||
// System.out.println("\n\n\n");
|
||||
@@ -0,0 +1,30 @@
|
||||
package digital.laboratory.platform.imr.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.imr.entity.DrugCaseInfo;
|
||||
import digital.laboratory.platform.imr.service.DrugCaseInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/drugCase")
|
||||
@Api(value = "DrugCaseInfoController", tags = "毒品案件信息相关接口")
|
||||
public class DrugCaseInfoController {
|
||||
|
||||
@Resource
|
||||
private DrugCaseInfoService drugCaseInfoService;
|
||||
|
||||
@ApiOperation("根据送缴的申请id去查询关联案件id")
|
||||
@GetMapping("/getCaseInfoByApplyId")
|
||||
public R getCaseInfoByApplyId(String applyId) {
|
||||
return R.ok(drugCaseInfoService.list(Wrappers.<DrugCaseInfo>lambdaQuery().eq(DrugCaseInfo::getApplyId, applyId)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -58,23 +58,15 @@ public class DrugDepotsController {
|
||||
private DrugMaterialInfoService drugMaterialInfoService;
|
||||
|
||||
|
||||
@ApiOperation(value = "新增毒品案件信息")
|
||||
@PostMapping("/drugCase/save")
|
||||
public R drugCaseSave(@RequestBody @Valid DrugDepotsDTO dto) {
|
||||
DrugCaseInfo save = null;
|
||||
try {
|
||||
save = drugCaseInfoService.drugCaseSave(dto);
|
||||
} catch (ValidateCodeException e) {
|
||||
e.printStackTrace();
|
||||
return R.failed(e.getMessage());
|
||||
}
|
||||
return R.ok(save);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增毒品案件信息和毒品检材信息")
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody @Valid DrugDepotsDTO dto) {
|
||||
List<DrugMaterialInfoVO> save = drugCaseInfoService.save(dto);
|
||||
Boolean save = null;
|
||||
try {
|
||||
save = drugCaseInfoService.save(dto);
|
||||
} catch (ValidateCodeException e) {
|
||||
return R.failed(e.getMessage());
|
||||
}
|
||||
return R.ok(save);
|
||||
}
|
||||
|
||||
@@ -105,7 +97,7 @@ public class DrugDepotsController {
|
||||
boolean success = false;
|
||||
try {
|
||||
success = drugMaterialInfoService.delete(ids);
|
||||
} catch (ValidationException e) {
|
||||
} catch (ValidateCodeException e) {
|
||||
e.printStackTrace();
|
||||
return R.failed(e.getMessage());
|
||||
}
|
||||
@@ -128,7 +120,7 @@ public class DrugDepotsController {
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (CollUtil.isEmpty(sample)) {
|
||||
throw new RuntimeException("入库样本编号不能为空");
|
||||
return R.failed("入库样本编号不能为空");
|
||||
}
|
||||
|
||||
List<OutSampleVO> vo = drugMaterialInfoService.drugMaterialPutInRepository(sample, dlpUser);
|
||||
|
||||
@@ -2,18 +2,20 @@ package digital.laboratory.platform.imr.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import digital.laboratory.platform.common.core.exception.ValidateCodeException;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.security.util.SecurityUtils;
|
||||
import digital.laboratory.platform.imr.dto.DrugHandingOverReviewDTO;
|
||||
import digital.laboratory.platform.imr.query.DrugHandingOverApplyQuery;
|
||||
import digital.laboratory.platform.imr.service.DrugHandingOverApplyService;
|
||||
import digital.laboratory.platform.imr.vo.DrugHandingOverApplyVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.ValidationException;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@@ -41,10 +43,41 @@ public class DrugHandingOverApplyController {
|
||||
return R.ok(voiPage);
|
||||
}
|
||||
|
||||
@ApiOperation("提交毒品送缴申请-委托单位操作")
|
||||
@PutMapping("/submit")
|
||||
public R submit(String applyId) {
|
||||
boolean success = false;
|
||||
try {
|
||||
success = drugHandingOverApplyService.submit(applyId);
|
||||
} catch (ValidateCodeException e) {
|
||||
return R.failed(e.getMessage());
|
||||
}
|
||||
return R.ok(success);
|
||||
}
|
||||
|
||||
@ApiOperation("删除毒品送缴申请-委托单位操作")
|
||||
@PostMapping("/delete")
|
||||
public R delete(@RequestBody List<String> ids) {
|
||||
boolean success = drugHandingOverApplyService.delete(ids);
|
||||
return R.ok(success);
|
||||
}
|
||||
|
||||
@ApiOperation("毒品送缴申请审核-受理单位操作")
|
||||
@PutMapping("/review")
|
||||
public R review(@RequestBody DrugHandingOverReviewDTO dto) {
|
||||
DLPUser user = SecurityUtils.getUser();
|
||||
if (!user.isStaff()) {
|
||||
return R.failed(String.format("用户 %s 没有权限进行该操作!", user.getName()));
|
||||
}
|
||||
if (dto.getIsPass() != 1 || dto.getIsPass() != -1) {
|
||||
return R.failed("操作错误!请选择是否同意!");
|
||||
}
|
||||
DrugHandingOverApplyVO vo = null;
|
||||
try {
|
||||
vo = drugHandingOverApplyService.review(dto, user);
|
||||
} catch (ValidateCodeException e) {
|
||||
return R.failed(e.getMessage());
|
||||
}
|
||||
return R.ok(vo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package digital.laboratory.platform.imr.convert;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import digital.laboratory.platform.imr.dto.DrugDepotsDTO;
|
||||
import digital.laboratory.platform.imr.dto.DrugMaterialInfoDTO;
|
||||
import digital.laboratory.platform.imr.entity.DrugCaseInfo;
|
||||
import digital.laboratory.platform.imr.vo.DrugCaseInfoVO;
|
||||
|
||||
@@ -19,7 +20,17 @@ public class DrugCaseInfoConvert {
|
||||
return null;
|
||||
}
|
||||
DrugCaseInfo drugCaseInfo = new DrugCaseInfo();
|
||||
drugCaseInfo.setId(dto.getId());
|
||||
// drugCaseInfo.setId(dto.getId());
|
||||
// drugCaseInfo.setCaseName(dto.getCaseName());
|
||||
// drugCaseInfo.setCaseNo(dto.getCaseNo());
|
||||
return drugCaseInfo;
|
||||
}
|
||||
|
||||
public static DrugCaseInfo dtoTOEntity(DrugMaterialInfoDTO dto) {
|
||||
if (dto == null) {
|
||||
return null;
|
||||
}
|
||||
DrugCaseInfo drugCaseInfo = new DrugCaseInfo();
|
||||
drugCaseInfo.setCaseName(dto.getCaseName());
|
||||
drugCaseInfo.setCaseNo(dto.getCaseNo());
|
||||
return drugCaseInfo;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class DrugHandingOverApplyConvert {
|
||||
drugHandingOverApplyVO.setApplyDate(entity.getApplyDate());
|
||||
drugHandingOverApplyVO.setStatus(entity.getStatus());
|
||||
drugHandingOverApplyVO.setStatusName(DrugHandingOverApplyStatus.fromStatus(entity.getStatus()).getDesc());
|
||||
drugHandingOverApplyVO.setRecipient(entity.getRecipient());
|
||||
drugHandingOverApplyVO.setReviewer(entity.getReviewer());
|
||||
drugHandingOverApplyVO.setReason(entity.getReason());
|
||||
return drugHandingOverApplyVO;
|
||||
}
|
||||
|
||||
@@ -19,10 +19,9 @@ public class DrugMaterialInfoConvert {
|
||||
}
|
||||
DrugMaterialInfo drugMaterialInfo = new DrugMaterialInfo();
|
||||
drugMaterialInfo.setId(dto.getId());
|
||||
drugMaterialInfo.setCaseId(dto.getCaseId());
|
||||
drugMaterialInfo.setDrugName(dto.getDrugName());
|
||||
drugMaterialInfo.setOriginMassVolume(dto.getMassVolume());
|
||||
drugMaterialInfo.setOriginUnit(dto.getUnit());
|
||||
drugMaterialInfo.setOriginMassVolume(dto.getOriginMassVolume());
|
||||
drugMaterialInfo.setOriginUnit(dto.getOriginUnit());
|
||||
drugMaterialInfo.setPackageComplete(dto.getPackageComplete());
|
||||
return drugMaterialInfo;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
package digital.laboratory.platform.imr.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.imr.component.DateUtils;
|
||||
import digital.laboratory.platform.imr.entity.DrugMaterialInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -20,39 +14,9 @@ import java.util.List;
|
||||
@ApiModel(value = "DrugDepotsDTO", description = "保存毒品库信息中的案件和检材信息DTO类")
|
||||
public class DrugDepotsDTO {
|
||||
|
||||
@ApiModelProperty("案件id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 案事件名称
|
||||
*/
|
||||
@ApiModelProperty("案事件名称")
|
||||
@NotBlank(message = "案事件名称不能为空!")
|
||||
private String caseName;
|
||||
|
||||
/**
|
||||
* 案件编号
|
||||
*/
|
||||
@ApiModelProperty("案件编号")
|
||||
private String caseNo;
|
||||
|
||||
/**
|
||||
* 送缴单位
|
||||
*/
|
||||
@ApiModelProperty("送缴单位")
|
||||
@NotBlank(message = "送缴单位不能为空!")
|
||||
private String handingOverOrg;
|
||||
|
||||
@ApiModelProperty("前端需要展示的机构组件,保存了送缴单位的父级机构id和自己机构id")
|
||||
private String frontOrgIds;
|
||||
|
||||
/**
|
||||
* 送缴日期
|
||||
*/
|
||||
@ApiModelProperty("送缴日期")
|
||||
@NotNull(message = "送缴日期不能为空!")
|
||||
@JsonFormat(pattern = DateUtils.yyyy_MM_dd, timezone = "")
|
||||
private LocalDate handingOverDate;
|
||||
@ApiModelProperty("送缴申请id")
|
||||
@NotBlank(message = "请选择送缴申请id!")
|
||||
private String applyId;
|
||||
|
||||
@ApiModelProperty("关联的检材列表")
|
||||
private List<DrugMaterialInfoDTO> drugMaterialInfoDTOList;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package digital.laboratory.platform.imr.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "DrugHandingOverReviewDTO", description = "受理单位 是否同意接收送缴申请的请求DTO")
|
||||
public class DrugHandingOverReviewDTO {
|
||||
|
||||
@ApiModelProperty("主键标识")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("是否通过, 1 通过 | -1 不通过")
|
||||
private Integer isPass;
|
||||
|
||||
@ApiModelProperty("同意/拒绝 原因")
|
||||
private String reason;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
package digital.laboratory.platform.imr.dto;
|
||||
|
||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 毒品库中的毒品检材信息 保存DTO类
|
||||
* @TableName b_drug_material_info
|
||||
@@ -16,10 +20,23 @@ public class DrugMaterialInfoDTO {
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 关联的案件id
|
||||
* 毒品类型
|
||||
*/
|
||||
@ApiModelProperty("关联的案件id")
|
||||
private String caseId;
|
||||
@ApiModelProperty("毒品类型")
|
||||
private List<DrugLite> type;
|
||||
|
||||
/**
|
||||
* 案事件名称
|
||||
*/
|
||||
@ApiModelProperty("案事件名称")
|
||||
@NotBlank(message = "案事件名称不能为空!")
|
||||
private String caseName;
|
||||
|
||||
/**
|
||||
* 案件编号
|
||||
*/
|
||||
@ApiModelProperty("案件编号")
|
||||
private String caseNo;
|
||||
|
||||
/**
|
||||
* 毒品检材名称
|
||||
@@ -30,14 +47,14 @@ public class DrugMaterialInfoDTO {
|
||||
/**
|
||||
* 质量/体积
|
||||
*/
|
||||
@ApiModelProperty("质量/体积")
|
||||
private String massVolume;
|
||||
@ApiModelProperty("原质量/体积(委托单位填写)")
|
||||
private String originMassVolume;
|
||||
|
||||
/**
|
||||
* 质量/体积 单位
|
||||
*/
|
||||
@ApiModelProperty("质量/体积 单位")
|
||||
private String unit;
|
||||
@ApiModelProperty("原质量/体积 单位 (委托单位填写)")
|
||||
private String originUnit;
|
||||
|
||||
|
||||
/**
|
||||
@@ -46,4 +63,4 @@ public class DrugMaterialInfoDTO {
|
||||
@ApiModelProperty("包装是否完整, 1 完整 | 0 不完整")
|
||||
private Boolean packageComplete;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,12 @@ public class DrugHandingOverApply extends BaseEntity {
|
||||
/**
|
||||
* 处理该申请,决定是否接收的用户id
|
||||
*/
|
||||
private String recipient;
|
||||
private String reviewer;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewDate;
|
||||
|
||||
/**
|
||||
* 同意/拒绝 原因
|
||||
|
||||
@@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 毒品库中的毒品检材信息
|
||||
@@ -40,7 +43,8 @@ public class DrugMaterialInfo extends BaseEntity {
|
||||
/**
|
||||
* 毒品类型
|
||||
*/
|
||||
private String type;
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<DrugLite> type;
|
||||
|
||||
/**
|
||||
* 原质量/体积(委托单位填写)
|
||||
|
||||
@@ -5,10 +5,10 @@ import lombok.Getter;
|
||||
@Getter
|
||||
public enum DrugHandingOverApplyStatus {
|
||||
|
||||
WAIT_HANDING_OVER(0, "待送缴"),
|
||||
WAIT_ACCEPT(3, "待接收"),
|
||||
AGREE_ACCEPT(5, "同意接收"),
|
||||
REJECT_ACCEPT(-5, "拒绝接收")
|
||||
WAIT_HANDING_OVER(0, "待提交"),
|
||||
WAIT_ACCEPT(3, "待审核"),
|
||||
AGREE_ACCEPT(5, "审核通过"),
|
||||
REJECT_ACCEPT(-5, "审核不通过")
|
||||
;
|
||||
|
||||
private final Integer status;
|
||||
|
||||
@@ -15,7 +15,7 @@ public class DrugDepotsQuery extends BaseQuery{
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty(value = "案件id查询")
|
||||
private String caseId;
|
||||
private String applyId;
|
||||
|
||||
@ApiModelProperty(value = "状态 0 录入信息 | 3 待入库 | 5 已入库")
|
||||
private Integer status;
|
||||
|
||||
@@ -3,13 +3,9 @@ package digital.laboratory.platform.imr.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.imr.dto.DrugDepotsDTO;
|
||||
import digital.laboratory.platform.imr.dto.DrugMaterialInfoDTO;
|
||||
import digital.laboratory.platform.imr.entity.DrugCaseInfo;
|
||||
import digital.laboratory.platform.imr.query.DrugDepotsQuery;
|
||||
import digital.laboratory.platform.imr.vo.DrugCaseInfoVO;
|
||||
import digital.laboratory.platform.imr.vo.DrugMaterialInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ChenJiangBao
|
||||
@@ -24,7 +20,7 @@ public interface DrugCaseInfoService extends IService<DrugCaseInfo> {
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<DrugMaterialInfoVO> save(DrugDepotsDTO dto);
|
||||
boolean save(DrugDepotsDTO dto);
|
||||
|
||||
/**
|
||||
* 分页接口
|
||||
@@ -32,6 +28,4 @@ public interface DrugCaseInfoService extends IService<DrugCaseInfo> {
|
||||
* @return
|
||||
*/
|
||||
IPage<DrugCaseInfoVO> getDrugCaseInfoVOPage(DrugDepotsQuery query);
|
||||
|
||||
DrugCaseInfo drugCaseSave(DrugDepotsDTO dto);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package digital.laboratory.platform.imr.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.imr.dto.DrugHandingOverReviewDTO;
|
||||
import digital.laboratory.platform.imr.entity.DrugHandingOverApply;
|
||||
import digital.laboratory.platform.imr.query.DrugHandingOverApplyQuery;
|
||||
import digital.laboratory.platform.imr.vo.DrugHandingOverApplyVO;
|
||||
@@ -30,5 +32,27 @@ public interface DrugHandingOverApplyService extends IService<DrugHandingOverApp
|
||||
*/
|
||||
IPage<DrugHandingOverApplyVO> voPage(DrugHandingOverApplyQuery query);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
boolean delete(List<String> ids);
|
||||
|
||||
/**
|
||||
* 审核送缴申请
|
||||
*
|
||||
* @param dto
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
DrugHandingOverApplyVO review(DrugHandingOverReviewDTO dto, DLPUser user);
|
||||
|
||||
/**
|
||||
* 提交送缴申请
|
||||
* @param applyId
|
||||
* @return
|
||||
*/
|
||||
boolean submit(String applyId);
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import digital.laboratory.platform.imr.convert.DrugMaterialInfoConvert;
|
||||
import digital.laboratory.platform.imr.dto.DrugDepotsDTO;
|
||||
import digital.laboratory.platform.imr.dto.DrugMaterialInfoDTO;
|
||||
import digital.laboratory.platform.imr.entity.DrugCaseInfo;
|
||||
import digital.laboratory.platform.imr.entity.DrugMaterialInfo;
|
||||
import digital.laboratory.platform.imr.mapper.DrugCaseInfoMapper;
|
||||
import digital.laboratory.platform.imr.mapper.DrugMaterialInfoMapper;
|
||||
import digital.laboratory.platform.imr.query.DrugDepotsQuery;
|
||||
@@ -20,8 +19,6 @@ import digital.laboratory.platform.imr.service.CommonFeignService;
|
||||
import digital.laboratory.platform.imr.service.DrugCaseInfoService;
|
||||
import digital.laboratory.platform.imr.service.DrugMaterialInfoService;
|
||||
import digital.laboratory.platform.imr.vo.DrugCaseInfoVO;
|
||||
import digital.laboratory.platform.imr.vo.DrugMaterialInfoVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -29,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.sql.SQLIntegrityConstraintViolationException;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author ChenJiangBao
|
||||
@@ -57,35 +53,28 @@ public class DrugCaseInfoServiceImpl extends ServiceImpl<DrugCaseInfoMapper, Dru
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<DrugMaterialInfoVO> save(DrugDepotsDTO dto) {
|
||||
DrugCaseInfo drugCaseInfo = DrugCaseInfoConvert.dtoTOEntity(dto);
|
||||
public boolean save(DrugDepotsDTO dto) {
|
||||
List<DrugMaterialInfoDTO> drugMaterialInfoDTOList = dto.getDrugMaterialInfoDTOList();
|
||||
boolean flag = true;
|
||||
if (StrUtil.isBlank(drugCaseInfo.getId())) {
|
||||
if (super.save(drugCaseInfo)) {
|
||||
// 保存毒品检材
|
||||
List<DrugMaterialInfo> drugMaterialInfos = DrugMaterialInfoConvert.dtoToEntityList(dto.getDrugMaterialInfoDTOList());
|
||||
flag = drugMaterialInfoService.saveDrugMaterialBatch(drugMaterialInfos, drugCaseInfo);
|
||||
}
|
||||
} else {
|
||||
if (this.updateById(drugCaseInfo)) {
|
||||
// 转换成毒品检材实体
|
||||
List<DrugMaterialInfo> drugMaterialInfos = DrugMaterialInfoConvert.dtoToEntityList(dto.getDrugMaterialInfoDTOList());
|
||||
// 根据id 是否存在判断调用更新还是新增
|
||||
List<DrugMaterialInfo> saveList = drugMaterialInfos.stream().filter(o -> StrUtil.isBlank(o.getId())).collect(Collectors.toList());
|
||||
List<DrugMaterialInfo> updateList = drugMaterialInfos.stream().filter(o -> StrUtil.isNotBlank(o.getId())).collect(Collectors.toList());
|
||||
// 直接更新
|
||||
if (CollUtil.isNotEmpty(updateList)) {
|
||||
flag = drugMaterialInfoService.updateBatchById(updateList);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(saveList)) {
|
||||
flag = drugMaterialInfoService.saveDrugMaterialBatch(saveList, drugCaseInfo);
|
||||
}
|
||||
for (DrugMaterialInfoDTO drugMaterialInfoDTO : drugMaterialInfoDTOList) {
|
||||
String caseNo = drugMaterialInfoDTO.getCaseNo();
|
||||
String caseName = drugMaterialInfoDTO.getCaseName();
|
||||
DrugCaseInfo one = super.getOne(Wrappers.<DrugCaseInfo>lambdaQuery().eq(DrugCaseInfo::getCaseNo, caseNo).or().eq(DrugCaseInfo::getCaseName, caseName));
|
||||
if (one != null && (!one.getCaseName().equals(caseName) || !one.getCaseNo().equals(caseNo))) {
|
||||
throw new ValidateCodeException(
|
||||
String.format("新录入的案件名称 [%s] 案件编号 [%s] 和系统中已存在的案件名称 [%s] 案件编号 [%s] 发生冲突!",
|
||||
caseName, caseNo, one.getCaseName(), one.getCaseNo())
|
||||
);
|
||||
} else if (one == null) {
|
||||
// 都为空则新录入案件信息
|
||||
one = DrugCaseInfoConvert.dtoTOEntity(drugMaterialInfoDTO);
|
||||
one.setApplyId(dto.getApplyId());
|
||||
super.save(one);
|
||||
}
|
||||
flag = drugMaterialInfoService.saveDrugMaterialBatch(CollUtil.newArrayList(DrugMaterialInfoConvert.dtoToEntity(drugMaterialInfoDTO)), one);
|
||||
}
|
||||
if (flag) {
|
||||
return drugMaterialInfoMapper.getDrugMaterialVO(Wrappers.<DrugMaterialInfo>lambdaQuery().eq(DrugMaterialInfo::getCaseId, dto.getId()));
|
||||
}
|
||||
return null;
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,27 +90,10 @@ public class DrugCaseInfoServiceImpl extends ServiceImpl<DrugCaseInfoMapper, Dru
|
||||
.like(DrugCaseInfo::getCaseName, keywords))
|
||||
.orderByDesc(DrugCaseInfo::getUpdateTime));
|
||||
List<DrugCaseInfoVO> drugCaseInfoVOS = page.getRecords();
|
||||
drugCaseInfoVOS.parallelStream().forEach(item -> item.setHandingOverOrgName(commonFeignService.remoteGetSysOrg(item.getHandingOverOrg()).getName()));
|
||||
// drugCaseInfoVOS.parallelStream().forEach(item -> item.setHandingOverOrgName(commonFeignService.remoteGetSysOrg(item.getHandingOverOrg()).getName()));
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrugCaseInfo drugCaseSave(DrugDepotsDTO dto) {
|
||||
DrugCaseInfo drugCaseInfo = DrugCaseInfoConvert.dtoTOEntity(dto);
|
||||
try {
|
||||
super.save(drugCaseInfo);
|
||||
} catch (DataIntegrityViolationException e) {
|
||||
// 检查是否是唯一约束违规异常并抛出自定义异常
|
||||
Throwable cause = e.getCause();
|
||||
if (cause instanceof SQLIntegrityConstraintViolationException
|
||||
&& cause.getMessage().contains("Duplicate entry")) {
|
||||
throw new ValidateCodeException("案件编号已经存在: " + dto.getCaseNo());
|
||||
}
|
||||
throw e; // 其他异常继续向上抛出
|
||||
}
|
||||
return drugCaseInfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +1,39 @@
|
||||
package digital.laboratory.platform.imr.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
//import com.lcsoft.dlp.common.aop.annotation.DlpResultProc;
|
||||
import digital.laboratory.platform.common.aop.annotation.DlpResultProc;
|
||||
import digital.laboratory.platform.common.core.exception.ValidateCodeException;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.security.util.SecurityUtils;
|
||||
import digital.laboratory.platform.imr.convert.DrugHandingOverApplyConvert;
|
||||
import digital.laboratory.platform.imr.dto.DrugHandingOverReviewDTO;
|
||||
import digital.laboratory.platform.imr.entity.DrugCaseInfo;
|
||||
import digital.laboratory.platform.imr.entity.DrugHandingOverApply;
|
||||
import digital.laboratory.platform.imr.entity.DrugMaterialInfo;
|
||||
import digital.laboratory.platform.imr.enums.DrugHandingOverApplyStatus;
|
||||
import digital.laboratory.platform.imr.enums.DrugMaterialStatus;
|
||||
import digital.laboratory.platform.imr.query.DrugHandingOverApplyQuery;
|
||||
import digital.laboratory.platform.imr.service.DrugCaseInfoService;
|
||||
import digital.laboratory.platform.imr.service.DrugHandingOverApplyService;
|
||||
import digital.laboratory.platform.imr.mapper.DrugHandingOverApplyMapper;
|
||||
import digital.laboratory.platform.imr.service.DrugMaterialInfoService;
|
||||
import digital.laboratory.platform.imr.vo.DrugHandingOverApplyVO;
|
||||
import digital.laboratory.platform.sys.entity.Drug;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.security.core.parameters.P;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author ChenJiangBao
|
||||
@@ -31,12 +44,18 @@ import java.util.List;
|
||||
public class DrugHandingOverApplyServiceImpl extends ServiceImpl<DrugHandingOverApplyMapper, DrugHandingOverApply>
|
||||
implements DrugHandingOverApplyService{
|
||||
|
||||
@Resource
|
||||
private DrugCaseInfoService drugCaseInfoService;
|
||||
|
||||
@Resource
|
||||
private DrugMaterialInfoService drugMaterialInfoService;
|
||||
|
||||
/**
|
||||
* 创建毒品送缴申请-委托单位操作
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
// @DlpResultProc
|
||||
@DlpResultProc
|
||||
public DrugHandingOverApplyVO create() {
|
||||
DLPUser user = SecurityUtils.getUser();
|
||||
DrugHandingOverApply entity = new DrugHandingOverApply();
|
||||
@@ -73,6 +92,7 @@ public class DrugHandingOverApplyServiceImpl extends ServiceImpl<DrugHandingOver
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean delete(List<String> ids) {
|
||||
List<DrugHandingOverApply> drugHandingOverApplies = super.listByIds(ids);
|
||||
for (DrugHandingOverApply drugHandingOverApply : drugHandingOverApplies) {
|
||||
@@ -80,7 +100,83 @@ public class DrugHandingOverApplyServiceImpl extends ServiceImpl<DrugHandingOver
|
||||
throw new ValidateCodeException(String.format("id为 %s 的申请已经送缴,不能删除!"));
|
||||
}
|
||||
}
|
||||
return super.removeByIds(ids);
|
||||
|
||||
if (super.removeByIds(ids)) {
|
||||
List<DrugCaseInfo> drugCaseInfoList = drugCaseInfoService.list(Wrappers.<DrugCaseInfo>lambdaQuery().in(DrugCaseInfo::getApplyId, ids));
|
||||
if (CollUtil.isNotEmpty(drugCaseInfoList)) {
|
||||
List<String> caseIdList = drugCaseInfoList.stream().map(DrugCaseInfo::getId).collect(Collectors.toList());
|
||||
drugCaseInfoService.removeByIds(caseIdList);
|
||||
List<DrugMaterialInfo> drugMaterialInfos = drugMaterialInfoService.list(Wrappers.<DrugMaterialInfo>lambdaQuery().in(DrugMaterialInfo::getCaseId, caseIdList));
|
||||
if (CollUtil.isNotEmpty(drugMaterialInfos)) {
|
||||
drugMaterialInfoService.remove(Wrappers.<DrugMaterialInfo>lambdaQuery().in(DrugMaterialInfo::getCaseId, caseIdList));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核送缴申请
|
||||
*
|
||||
* @param dto
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public DrugHandingOverApplyVO review(DrugHandingOverReviewDTO dto, DLPUser user) {
|
||||
DrugHandingOverApply byId = super.getById(dto.getId());
|
||||
if (byId == null) {
|
||||
throw new ValidateCodeException("数据不存在!");
|
||||
}
|
||||
if (!byId.getStatus().equals(DrugHandingOverApplyStatus.WAIT_ACCEPT.getStatus())) {
|
||||
throw new ValidateCodeException("该申请不在 [待审核] 状态!");
|
||||
}
|
||||
|
||||
boolean update = super.update(Wrappers.<DrugHandingOverApply>lambdaUpdate()
|
||||
.eq(DrugHandingOverApply::getId, dto.getId())
|
||||
.set(DrugHandingOverApply::getReason, dto.getReason())
|
||||
.set(DrugHandingOverApply::getReviewer, user.getId())
|
||||
.set(DrugHandingOverApply::getReviewDate, LocalDateTime.now())
|
||||
.set(DrugHandingOverApply::getStatus,
|
||||
dto.getIsPass() == 1 ? DrugHandingOverApplyStatus.AGREE_ACCEPT.getStatus() : DrugHandingOverApplyStatus.REJECT_ACCEPT.getStatus()
|
||||
)
|
||||
);
|
||||
if (update) {
|
||||
if (dto.getIsPass() == 1) {
|
||||
// 更新毒品检材状态
|
||||
drugMaterialInfoService.update(
|
||||
Wrappers.<DrugMaterialInfo>lambdaUpdate()
|
||||
.inSql(DrugMaterialInfo::getCaseId, String.format("SELECT case_id FROM b_drug_case_info WHERE apply_id = '%s'", dto.getId()))
|
||||
.set(DrugMaterialInfo::getStatus, DrugMaterialStatus.WAIT_INBOUND.getStatus())
|
||||
);
|
||||
}
|
||||
return DrugHandingOverApplyConvert.entityToVO(super.getById(dto.getId()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交送缴申请
|
||||
* @param applyId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean submit(String applyId) {
|
||||
DrugHandingOverApply preInfo = super.getById(applyId);
|
||||
if (preInfo == null) {
|
||||
throw new ValidateCodeException("数据不存在!");
|
||||
}
|
||||
if (!preInfo.getStatus().equals(DrugHandingOverApplyStatus.WAIT_HANDING_OVER.getStatus())) {
|
||||
throw new ValidateCodeException("该申请不在 [待提交] 状态!");
|
||||
}
|
||||
return super.update(Wrappers.<DrugHandingOverApply>lambdaUpdate()
|
||||
.eq(DrugHandingOverApply::getId, applyId)
|
||||
.set(DrugHandingOverApply::getHandingOverDate, LocalDateTime.now())
|
||||
.set(DrugHandingOverApply::getStatus, DrugHandingOverApplyStatus.WAIT_ACCEPT.getStatus())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,6 +191,8 @@ public class DrugHandingOverApplyServiceImpl extends ServiceImpl<DrugHandingOver
|
||||
Integer userQueryType = query.getUserQueryType();
|
||||
LambdaQueryWrapper<DrugHandingOverApply> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(!user.isStaff(), DrugHandingOverApply::getHandingOverOrg, user.getOrgId());
|
||||
// 受理单位不需要看待提交的申请
|
||||
lambdaQueryWrapper.ne(user.isStaff(), DrugHandingOverApply::getStatus, DrugHandingOverApplyStatus.WAIT_HANDING_OVER.getStatus());
|
||||
if (timeRangeType != null) {
|
||||
if (timeRangeType == 1) {
|
||||
lambdaQueryWrapper.ge(query.getStartDate() != null, DrugHandingOverApply::getApplyDate, query.getStartDate())
|
||||
@@ -109,7 +207,7 @@ public class DrugHandingOverApplyServiceImpl extends ServiceImpl<DrugHandingOver
|
||||
if (userQueryType == 1) {
|
||||
lambdaQueryWrapper.eq(StrUtil.isNotBlank(query.getUserId()), DrugHandingOverApply::getHandingOverUser, query.getUserId());
|
||||
} else if (userQueryType == 2) {
|
||||
lambdaQueryWrapper.eq(StrUtil.isNotBlank(query.getUserId()), DrugHandingOverApply::getRecipient, query.getUserId());
|
||||
lambdaQueryWrapper.eq(StrUtil.isNotBlank(query.getUserId()), DrugHandingOverApply::getReviewer, query.getUserId());
|
||||
}
|
||||
}
|
||||
return lambdaQueryWrapper;
|
||||
|
||||
@@ -107,6 +107,7 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap
|
||||
DrugMaterialInfo drugMaterialInfo = drugMaterialInfos.get(i);
|
||||
drugMaterialInfo.setDrugNo(drugMaterialNOList.get(i));
|
||||
drugMaterialInfo.setCaseId(drugCaseInfo.getId());
|
||||
drugMaterialInfo.setStatus(DrugMaterialStatus.ENTER_DRUG_INFO.getStatus());
|
||||
}
|
||||
return super.saveBatch(drugMaterialInfos);
|
||||
}
|
||||
@@ -119,10 +120,10 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap
|
||||
@Override
|
||||
public DrugMaterialInfoVO copy(DrugMaterialInfoDTO dto) {
|
||||
DrugMaterialInfo drugMaterialInfo = DrugMaterialInfoConvert.dtoToEntity(dto);
|
||||
if (super.count(Wrappers.<DrugMaterialInfo>lambdaQuery().eq(DrugMaterialInfo::getCaseId, dto.getCaseId())) == 0) {
|
||||
// 如果当前案件是第一次保存检材,则都保存当前检材和复制的检材
|
||||
super.save(drugMaterialInfo);
|
||||
}
|
||||
// if (super.count(Wrappers.<DrugMaterialInfo>lambdaQuery().eq(DrugMaterialInfo::getCaseId, dto.getCaseId())) == 0) {
|
||||
// // 如果当前案件是第一次保存检材,则都保存当前检材和复制的检材
|
||||
// super.save(drugMaterialInfo);
|
||||
// }
|
||||
// drugMaterialInfo = DrugMaterialInfoConvert.dtoToEntity(dto);
|
||||
drugMaterialInfo.setId(null);
|
||||
super.save(drugMaterialInfo);
|
||||
|
||||
@@ -34,25 +34,6 @@ public class DrugCaseInfoVO{
|
||||
@ApiModelProperty("案件编号")
|
||||
private String caseNo;
|
||||
|
||||
/**
|
||||
* 送缴单位
|
||||
*/
|
||||
@ApiModelProperty("送缴单位")
|
||||
private String handingOverOrg;
|
||||
|
||||
/**
|
||||
* 送缴单位
|
||||
*/
|
||||
@ApiModelProperty("送缴单位")
|
||||
private String handingOverOrgName;
|
||||
|
||||
/**
|
||||
* 送缴日期
|
||||
*/
|
||||
@ApiModelProperty("送缴日期")
|
||||
@JsonFormat(pattern = DateUtils.yyyy_MM_dd)
|
||||
private LocalDate handingOverDate;
|
||||
|
||||
@ApiModelProperty("送缴检材数量")
|
||||
private Integer handingOverCount;
|
||||
|
||||
@@ -62,4 +43,4 @@ public class DrugCaseInfoVO{
|
||||
@ApiModelProperty("前端需要展示的机构组件,保存了送缴单位的父级机构id和自己机构id")
|
||||
private String frontOrgIds;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package digital.laboratory.platform.imr.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
//import com.lcsoft.dlp.common.aop.annotation.DlpFeign;
|
||||
import digital.laboratory.platform.common.aop.annotation.DlpFeign;
|
||||
import digital.laboratory.platform.imr.component.DateUtils;
|
||||
import digital.laboratory.platform.sys.feign.RemoteOrgService;
|
||||
import digital.laboratory.platform.sys.feign.RemoteUserService;
|
||||
@@ -31,7 +31,7 @@ public class DrugHandingOverApplyVO {
|
||||
private String handingOverUser;
|
||||
|
||||
@ApiModelProperty("送缴用户 名称")
|
||||
// @DlpFeign(feignClient = RemoteUserService.class, methodName = "innerGetById", params = {"handingOverUser"}, resultField = "name")
|
||||
@DlpFeign(feignClient = RemoteUserService.class, methodName = "innerGetById", params = {"handingOverUser"}, resultField = "name")
|
||||
private String handingOverUserName;
|
||||
|
||||
/**
|
||||
@@ -41,7 +41,7 @@ public class DrugHandingOverApplyVO {
|
||||
private String handingOverOrg;
|
||||
|
||||
@ApiModelProperty("送缴单位名称")
|
||||
// @DlpFeign(feignClient = RemoteOrgService.class, methodName = "getById", params = {"handingOverOrg"}, resultField = "name")
|
||||
@DlpFeign(feignClient = RemoteOrgService.class, methodName = "getById", params = {"handingOverOrg"}, resultField = "name")
|
||||
private String handingOverOrgName;
|
||||
|
||||
/**
|
||||
@@ -71,15 +71,16 @@ public class DrugHandingOverApplyVO {
|
||||
* 处理该申请,决定是否接收的用户id
|
||||
*/
|
||||
@ApiModelProperty("处理该申请,决定是否接收的用户id")
|
||||
private String recipient;
|
||||
private String reviewer;
|
||||
|
||||
@ApiModelProperty("处理该申请,决定是否接收的用户 姓名")
|
||||
// @DlpFeign(feignClient = RemoteUserService.class, methodName = "innerGetById", params = {"recipient"}, resultField = "name")
|
||||
private String recipientName;
|
||||
@DlpFeign(feignClient = RemoteUserService.class, methodName = "innerGetById", params = {"recipient"}, resultField = "name")
|
||||
private String reviewerName;
|
||||
|
||||
/**
|
||||
* 同意/拒绝 原因
|
||||
*/
|
||||
@ApiModelProperty("同意/拒绝 原因")
|
||||
private String reason;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
package digital.laboratory.platform.imr.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.aop.annotation.DlpFeign;
|
||||
import digital.laboratory.platform.imr.component.DateUtils;
|
||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||
import digital.laboratory.platform.sys.feign.RemoteOrgService;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 毒品库中的毒品检材信息 VO 返回前台显示类
|
||||
@@ -23,7 +27,7 @@ public class DrugMaterialInfoVO {
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 关联的案件id
|
||||
* 关联的案件id
|
||||
*/
|
||||
@ApiModelProperty("关联的案件id")
|
||||
private String caseId;
|
||||
@@ -55,17 +59,32 @@ public class DrugMaterialInfoVO {
|
||||
@ApiModelProperty("毒品检材名称")
|
||||
private String drugName;
|
||||
|
||||
/**
|
||||
* 质量/体积
|
||||
*/
|
||||
@ApiModelProperty("质量/体积")
|
||||
private String massVolume;
|
||||
@ApiModelProperty("毒品类型")
|
||||
private List<DrugLite> type;
|
||||
|
||||
/**
|
||||
* 质量/体积 单位
|
||||
* 原质量/体积(委托单位填写)
|
||||
*/
|
||||
@ApiModelProperty("质量/体积 单位")
|
||||
private String unit;
|
||||
@ApiModelProperty("原质量/体积(委托单位填写)")
|
||||
private String originMassVolume;
|
||||
|
||||
/**
|
||||
* 原质量/体积 单位 (委托单位填写)
|
||||
*/
|
||||
@ApiModelProperty("原质量/体积 单位 (委托单位填写)")
|
||||
private String originUnit;
|
||||
|
||||
/**
|
||||
* 复称质量/体积(接收单位填写)
|
||||
*/
|
||||
@ApiModelProperty("复称质量/体积(接收单位填写)")
|
||||
private String recheckMassVolume;
|
||||
|
||||
/**
|
||||
* 复称质量/体积 单位 (接收单位填写)
|
||||
*/
|
||||
@ApiModelProperty("复称质量/体积 单位 (接收单位填写)")
|
||||
private String recheckUnit;
|
||||
|
||||
/**
|
||||
* 包装是否完整, 1 完整 | 0 不完整
|
||||
@@ -106,14 +125,15 @@ public class DrugMaterialInfoVO {
|
||||
/**
|
||||
* 送缴单位
|
||||
*/
|
||||
@ApiModelProperty("送缴单位")
|
||||
@ApiModelProperty("送缴单位名称")
|
||||
@DlpFeign(feignClient = RemoteOrgService.class, methodName = "getById", params = {"handingOverOrg"}, resultField = "name")
|
||||
private String handingOverOrgName;
|
||||
|
||||
/**
|
||||
* 送缴日期
|
||||
*/
|
||||
@ApiModelProperty("送缴日期")
|
||||
@JsonFormat(pattern = DateUtils.yyyy_MM_dd)
|
||||
private LocalDate handingOverDate;
|
||||
@ApiModelProperty("送缴时间")
|
||||
@JsonFormat(pattern = DateUtils.yyyy_MM_dd_HH_mm_ss, timezone = DateUtils.TIME_ZONE)
|
||||
private LocalDateTime handingOverDate;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
<result property="handingOverDate" column="handing_over_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="reason" column="reason" jdbcType="VARCHAR"/>
|
||||
<result property="reviewer" column="reviewer" jdbcType="VARCHAR"/>
|
||||
<result property="applyDate" column="apply_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="reviewDate" column="review_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||
@@ -20,6 +23,7 @@
|
||||
<sql id="Base_Column_List">
|
||||
id,handing_over_user,handing_over_org,
|
||||
handing_over_date,status,reason,
|
||||
reviewer,apply_date,review_date,
|
||||
create_time,update_time,create_by,
|
||||
update_by
|
||||
</sql>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<result property="caseId" column="case_id" jdbcType="VARCHAR"/>
|
||||
<result property="drugNo" column="drug_no" jdbcType="VARCHAR"/>
|
||||
<result property="drugName" column="drug_name" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="VARCHAR" typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||
<result property="originMassVolume" column="origin_mass_volume" jdbcType="VARCHAR"/>
|
||||
<result property="originUnit" column="origin_unit" jdbcType="VARCHAR"/>
|
||||
<result property="recheckMassVolume" column="recheck_mass_volume" jdbcType="VARCHAR"/>
|
||||
@@ -43,7 +43,7 @@
|
||||
ss.storage_cell_id
|
||||
FROM b_drug_material_info dm
|
||||
LEFT JOIN b_drug_case_info dc ON dm.case_id = dc.id
|
||||
LEFT JOIN b_drug_handin_over_apply dhoa ON dc.apply_id = dhoa.id
|
||||
LEFT JOIN b_drug_handing_over_apply dhoa ON dc.apply_id = dhoa.id
|
||||
LEFT JOIN b_sample_storage ss ON dm.id = ss.sample_id
|
||||
</sql>
|
||||
|
||||
@@ -58,19 +58,19 @@
|
||||
)
|
||||
</if>
|
||||
<if test="query.orgId != null and query.orgId != ''">
|
||||
AND dc.handing_over_org = #{query.orgId}
|
||||
AND dhoa.handing_over_org = #{query.orgId}
|
||||
</if>
|
||||
<if test="query.caseId != null and query.caseId != ''">
|
||||
AND dm.case_id = #{query.caseId}
|
||||
<if test="query.applyId != null and query.applyId != ''">
|
||||
AND dc.apply_id = #{query.applyId}
|
||||
</if>
|
||||
<if test="query.status != null">
|
||||
AND dm.status = #{query.status}
|
||||
</if>
|
||||
<if test="query.startDate != null">
|
||||
AND dc.handing_over_date >= #{query.startDate}
|
||||
AND dhoa.handing_over_date >= #{query.startDate}
|
||||
</if>
|
||||
<if test="query.endDate != null">
|
||||
AND dc.handing_over_date <= #{query.endDate}
|
||||
AND dhoa.handing_over_date <= #{query.endDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY dm.update_time DESC
|
||||
|
||||
Reference in New Issue
Block a user