1.修改分页接口查询参数在xml文件中的引用
2.处理申请未审核,审核人为空导致数据报错问题
master
杨海航 4 months ago
parent 51cc237b89
commit f98db13300
  1. 12
      src/main/java/digital/laboratory/platform/entrustment/controller/EntrustAlterApplyController.java
  2. 4
      src/main/java/digital/laboratory/platform/entrustment/mapper/EntrustAlterApplyMapper.java
  3. 4
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustAlterApplyServiceImpl.java
  4. 4
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java
  5. 4
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentServiceImpl.java
  6. 6
      src/main/java/digital/laboratory/platform/entrustment/vo/EntrustAlterApplyVO.java
  7. 14
      src/main/resources/mapper/EntrustAlterApplyMapper.xml

@ -33,15 +33,15 @@ public class EntrustAlterApplyController {
@ApiOperation(value = "查询所有申请修改委托消息分页接口", notes = "查询所有申请修改委托消息分页接口") @ApiOperation(value = "查询所有申请修改委托消息分页接口", notes = "查询所有申请修改委托消息分页接口")
@PostMapping("/page") @PostMapping("/page")
@PreAuthorize("@pms.hasPermission('EntrustAlterApplyQuery')") // 委托申请修改消息查询权限 // @PreAuthorize("@pms.hasPermission('EntrustAlterApplyQuery')") // 委托申请修改消息查询权限
public R page(@RequestBody EntrustAlterApplyQuery query) { public R<IPage<EntrustAlterApplyVO>> page(@RequestBody EntrustAlterApplyQuery query) {
IPage<EntrustAlterApplyVO> page = entrustAlterApplyService.voPage(query); IPage<EntrustAlterApplyVO> page = entrustAlterApplyService.voPage(query);
return R.ok(page); return R.ok(page);
} }
@ApiOperation(value = "保存或提交委托申请修改消息", notes = "保存委托申请修改消息") @ApiOperation(value = "保存或提交委托申请修改消息", notes = "保存委托申请修改消息")
@PostMapping("/save") @PostMapping("/save")
@PreAuthorize("@pms.hasPermission('EntrustAlterApplySubmit')") // 委托申请修改消息保存提交权限 // @PreAuthorize("@pms.hasPermission('EntrustAlterApplySubmit')") // 委托申请修改消息保存提交权限
public R save(@RequestBody @Valid EntrustAlterApplyDTO dto) { public R save(@RequestBody @Valid EntrustAlterApplyDTO dto) {
EntrustAlterApplyVO vo = null; EntrustAlterApplyVO vo = null;
try { try {
@ -55,7 +55,7 @@ public class EntrustAlterApplyController {
@ApiOperation(value = "修改委托申请修改消息", notes = "修改委托申请修改消息") @ApiOperation(value = "修改委托申请修改消息", notes = "修改委托申请修改消息")
@PutMapping("/update") @PutMapping("/update")
@PreAuthorize("@pms.hasPermission('EntrustAlterApplyEdit')") // 委托申请修改消息修改权限 // @PreAuthorize("@pms.hasPermission('EntrustAlterApplyEdit')") // 委托申请修改消息修改权限
public R update(@RequestBody @Valid EntrustAlterApplyDTO dto) { public R update(@RequestBody @Valid EntrustAlterApplyDTO dto) {
Boolean success = entrustAlterApplyService.update(dto); Boolean success = entrustAlterApplyService.update(dto);
return R.ok(success).setMsg(success ? "修改成功" : "修改失败"); return R.ok(success).setMsg(success ? "修改成功" : "修改失败");
@ -63,7 +63,7 @@ public class EntrustAlterApplyController {
@ApiOperation(value = "审核提交委托申请修改消息", notes = "审核提交委托申请修改消息") @ApiOperation(value = "审核提交委托申请修改消息", notes = "审核提交委托申请修改消息")
@PutMapping("/approve") @PutMapping("/approve")
@PreAuthorize("@pms.hasPermission('EntrustAlterApplyApprove')") // 委托申请修改消息审核权限 // @PreAuthorize("@pms.hasPermission('EntrustAlterApplyApprove')") // 委托申请修改消息审核权限
public R approve(@RequestBody @Valid EntrustAlterApplyApproveDTO approveDTO) { public R approve(@RequestBody @Valid EntrustAlterApplyApproveDTO approveDTO) {
Boolean success = entrustAlterApplyService.approve(approveDTO); Boolean success = entrustAlterApplyService.approve(approveDTO);
return R.ok(success).setMsg(success ? "审核成功" : "审核失败"); return R.ok(success).setMsg(success ? "审核成功" : "审核失败");
@ -71,7 +71,7 @@ public class EntrustAlterApplyController {
@ApiOperation(value = "删除委托申请修改消息", notes = "删除委托申请修改消息, 只能删除为提交状态的消息") @ApiOperation(value = "删除委托申请修改消息", notes = "删除委托申请修改消息, 只能删除为提交状态的消息")
@PostMapping("/delete") @PostMapping("/delete")
@PreAuthorize("@pms.hasPermission('EntrustAlterApplyDelete')") // 委托申请修改消息删除权限 // @PreAuthorize("@pms.hasPermission('EntrustAlterApplyDelete')") // 委托申请修改消息删除权限
public R delete(@RequestBody List<String> ids) { public R delete(@RequestBody List<String> ids) {
Boolean success = entrustAlterApplyService.delete(ids); Boolean success = entrustAlterApplyService.delete(ids);
return R.ok(success).setMsg(success ? "审核成功" : "审核失败"); return R.ok(success).setMsg(success ? "审核成功" : "审核失败");

@ -12,6 +12,7 @@ import digital.laboratory.platform.entrustment.entity.Entrustment;
import digital.laboratory.platform.entrustment.query.EntrustAlterApplyQuery; import digital.laboratory.platform.entrustment.query.EntrustAlterApplyQuery;
import digital.laboratory.platform.entrustment.vo.EntrustAlterApplyVO; import digital.laboratory.platform.entrustment.vo.EntrustAlterApplyVO;
import digital.laboratory.platform.entrustment.vo.EntrustmentVO; import digital.laboratory.platform.entrustment.vo.EntrustmentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -22,6 +23,7 @@ import java.util.List;
* @createDate 2024-10-31 17:35:01 * @createDate 2024-10-31 17:35:01
* @Entity digital.laboratory.platform.entrustment.entity.EntrustAlterApply * @Entity digital.laboratory.platform.entrustment.entity.EntrustAlterApply
*/ */
@Mapper
public interface EntrustAlterApplyMapper extends BaseMapper<EntrustAlterApply> { public interface EntrustAlterApplyMapper extends BaseMapper<EntrustAlterApply> {
/** /**
@ -30,7 +32,7 @@ public interface EntrustAlterApplyMapper extends BaseMapper<EntrustAlterApply> {
* @param query * @param query
* @return * @return
*/ */
IPage<EntrustAlterApplyVO> getEntrustAlterApplyVOPage(IPage<EntrustAlterApplyVO> page, EntrustAlterApplyQuery query); IPage<EntrustAlterApplyVO> getEntrustAlterApplyVOPage(IPage<EntrustAlterApplyVO> page,@Param("query") EntrustAlterApplyQuery query);
EntrustAlterApplyVO getEntrustAlterApplyVOOne(@Param(Constants.WRAPPER) Wrapper<EntrustAlterApply> qw); EntrustAlterApplyVO getEntrustAlterApplyVOOne(@Param(Constants.WRAPPER) Wrapper<EntrustAlterApply> qw);

@ -90,7 +90,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
.set(EntrustAlterApply::getApplyDate, LocalDate.now())); .set(EntrustAlterApply::getApplyDate, LocalDate.now()));
} }
EntrustAlterApplyVO entrustAlterApplyVOOne = baseMapper.getEntrustAlterApplyVOOne(Wrappers.<EntrustAlterApply>lambdaQuery().eq(EntrustAlterApply::getId, entrustAlterApply.getId())); EntrustAlterApplyVO entrustAlterApplyVOOne = baseMapper.getEntrustAlterApplyVOOne(Wrappers.<EntrustAlterApply>query().eq("eaa.id", entrustAlterApply.getId()));
fillVOInfo(entrustAlterApplyVOOne); fillVOInfo(entrustAlterApplyVOOne);
return entrustAlterApplyVOOne; return entrustAlterApplyVOOne;
} }
@ -154,7 +154,9 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
private void fillVOInfo(EntrustAlterApplyVO e) { private void fillVOInfo(EntrustAlterApplyVO e) {
e.setStatusName(EntrustAlterApplyStatus.fromStatus(e.getStatus()).getDesc()); e.setStatusName(EntrustAlterApplyStatus.fromStatus(e.getStatus()).getDesc());
e.setApplicantName(commonFeignService.remoteGetUserById(e.getApplicant()).getName()); e.setApplicantName(commonFeignService.remoteGetUserById(e.getApplicant()).getName());
if (StrUtil.isNotBlank(e.getReviewer())) {
e.setReviewerName(commonFeignService.remoteGetUserById(e.getReviewer()).getName()); e.setReviewerName(commonFeignService.remoteGetUserById(e.getReviewer()).getName());
}
e.setApplyOrgName(commonFeignService.remoteGetSysOrg(e.getApplyOrgId()).getName()); e.setApplyOrgName(commonFeignService.remoteGetSysOrg(e.getApplyOrgId()).getName());
} }
} }

@ -1420,7 +1420,9 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
} }
} }
} }
List<EntrustmentIdentificationMaterial> list = this.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery().eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustment.getId())); List<EntrustmentIdentificationMaterial> list = this.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
.eq(EntrustmentIdentificationMaterial::getEntrustmentId, entrustment.getId())
.orderByAsc(EntrustmentIdentificationMaterial::getOrderNo));
entrustment.setEntrustRequirement(entrustmentService.buildEntrustReq(list)); entrustment.setEntrustRequirement(entrustmentService.buildEntrustReq(list));
entrustmentService.updateById(entrustment); entrustmentService.updateById(entrustment);
return identificationMaterialList; return identificationMaterialList;

@ -762,7 +762,9 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
DrugLiteConvert.convertDirtyLiteByJSON(item.getCandidateDrugs()) DrugLiteConvert.convertDirtyLiteByJSON(item.getCandidateDrugs())
.stream() .stream()
.map(DrugLite::getName) .map(DrugLite::getName)
.collect(Collectors.joining(""))) .collect(Collectors.joining("")),
LinkedHashMap::new, // 返回有序map
Collectors.toList())
); );
StringBuffer retSb = new StringBuffer(); StringBuffer retSb = new StringBuffer();
//先给group排一个序 //先给group排一个序

@ -60,6 +60,12 @@ public class EntrustAlterApplyVO {
@ApiModelProperty(value = "申请单位") @ApiModelProperty(value = "申请单位")
private String applyOrgId; private String applyOrgId;
/**
* 申请原因
*/
@ApiModelProperty(value = "申请原因")
private String applyReason;
/** /**
* 申请单位名称 * 申请单位名称
*/ */

@ -39,25 +39,25 @@
<include refid="getVOSQL"/> <include refid="getVOSQL"/>
<where> <where>
<if test="query.keywords != null and query.keywords != ''"> <if test="query.keywords != null and query.keywords != ''">
AND case_name LIKE CONCAT('%', #{query.keywords}, '%') AND ce.case_name LIKE CONCAT('%', #{query.keywords}, '%')
</if> </if>
<if test="query.applicant != null and query.applicant != ''"> <if test="query.applicant != null and query.applicant != ''">
AND applicant_id = #{query.applicant} AND eaa.applicant_id = #{query.applicant}
</if> </if>
<if test="query.startDate != null"> <if test="query.startDate != null">
AND apply_date &gt;= #{query.startDate} AND eaa.apply_date &gt;= #{query.startDate}
</if> </if>
<if test="query.endDate != null"> <if test="query.endDate != null">
AND apply_date &lt;= #{query.endDate} AND eaa.apply_date &lt;= #{query.endDate}
</if> </if>
<if test="query.status != null"> <if test="query.status != null">
AND status &lt;= #{query.status} AND eaa.status = #{query.status}
</if> </if>
<if test="query.isStaff != null and !query.isStaff and query.clientOrgId != null and query.clientOrgId != ''"> <if test="query.isStaff != null and !query.isStaff and query.clientOrgId != null and query.clientOrgId != ''">
AND apply_org_id = #{query.clientOrgId} AND eaa.apply_org_id = #{query.clientOrgId}
</if> </if>
</where> </where>
ORDER BY apply_date DESC ORDER BY eaa.apply_date DESC
</select> </select>
<select id="getEntrustAlterApplyVOOne" <select id="getEntrustAlterApplyVOOne"

Loading…
Cancel
Save