提交数据库

main
杨海航 2 years ago
parent 55803fcf44
commit 4811468e75
  1. 29
      .idea/workspace.xml
  2. 1817
      db/reagent_managment.sql
  3. 64
      src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java
  4. 30
      src/main/java/digital/laboratory/platform/reagent/dto/StandardMaterialApprovalFormDTO.java
  5. 7
      src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java
  6. 6
      src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApprovalFormMapper.java
  7. 23
      src/main/java/digital/laboratory/platform/reagent/service/StandardMaterialApprovalFormService.java
  8. 2
      src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java
  9. 128
      src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java
  10. 10
      src/main/java/digital/laboratory/platform/reagent/vo/StandardMaterialApprovalFormVO.java
  11. 13
      src/main/resources/mapper/StandardMaterialApprovalFormMapper.xml

@ -4,7 +4,16 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="84c9e5ca-eb2c-413b-a858-1d19b01d5e5b" name="变更" comment="4.13" />
<list default="true" id="84c9e5ca-eb2c-413b-a858-1d19b01d5e5b" name="变更" comment="4.13">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/controller/StandardMaterialApprovalFormController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/entity/StandardMaterialApprovalForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApprovalFormMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/mapper/StandardMaterialApprovalFormMapper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/service/StandardMaterialApprovalFormService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/service/StandardMaterialApprovalFormService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/service/impl/PurchasingPlanServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/digital/laboratory/platform/reagent/service/impl/StandardMaterialApprovalFormServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/StandardMaterialApprovalFormMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/StandardMaterialApprovalFormMapper.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -194,6 +203,8 @@
<workItem from="1681352714028" duration="22666000" />
<workItem from="1681390440499" duration="1028000" />
<workItem from="1681398058779" duration="788000" />
<workItem from="1681398858196" duration="405000" />
<workItem from="1681434106017" duration="3945000" />
</task>
<task id="LOCAL-00001" summary="3.14">
<created>1678807139837</created>
@ -251,7 +262,21 @@
<option name="project" value="LOCAL" />
<updated>1681398686796</updated>
</task>
<option name="localTasksCounter" value="9" />
<task id="LOCAL-00009" summary="4.13">
<created>1681398885073</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1681398885073</updated>
</task>
<task id="LOCAL-00010" summary="4.13">
<created>1681399141352</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1681399141352</updated>
</task>
<option name="localTasksCounter" value="11" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">

File diff suppressed because it is too large Load Diff

@ -7,8 +7,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.common.log.annotation.SysLog;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.StandardMaterialApprovalFormDTO;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService;
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -48,13 +50,13 @@ public class StandardMaterialApprovalFormController {
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{standardMaterialApprovalFormId}" )
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
public R<StandardMaterialApprovalForm> getById(@PathVariable("standardMaterialApprovalFormId" ) String standardMaterialApprovalFormId, HttpServletRequest theHttpServletRequest) {
@GetMapping( )
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
public R<StandardMaterialApprovalFormVO> getById(String standardMaterialApprovalFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId);
StandardMaterialApprovalFormVO standardMaterialApprovalForm = standardMaterialApprovalFormService.getVO(standardMaterialApprovalFormId);
return R.ok(standardMaterialApprovalForm);
//return R.ok(standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId));
}
@ -68,12 +70,11 @@ public class StandardMaterialApprovalFormController {
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
public R<IPage<StandardMaterialApprovalForm>> getStandardMaterialApprovalFormPage(Page<StandardMaterialApprovalForm> page, StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
public R<IPage<StandardMaterialApprovalFormVO>> getStandardMaterialApprovalFormPage(Page<StandardMaterialApprovalForm> page, StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
IPage<StandardMaterialApprovalForm> standardMaterialApprovalFormSList = standardMaterialApprovalFormService.page(page, Wrappers.<StandardMaterialApprovalForm>query()
.eq("create_by", dlpUser.getId())
IPage<StandardMaterialApprovalFormVO> standardMaterialApprovalFormSList = standardMaterialApprovalFormService.getVOPage(page, Wrappers.<StandardMaterialApprovalForm>query()
.orderByDesc("create_time")
);
return R.ok(standardMaterialApprovalFormSList);
@ -83,69 +84,50 @@ public class StandardMaterialApprovalFormController {
/**
* 新增(标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalForm (标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalFormDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
* @return R
*/
@ApiOperation(value = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("新增(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PostMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
public R<StandardMaterialApprovalForm> postAddObject(@RequestBody StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
public R<StandardMaterialApprovalForm> postAddObject(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
standardMaterialApprovalForm.setStandardMaterialApprovalFormId(IdWorker.get32UUID().toUpperCase());
if (standardMaterialApprovalFormService.save(standardMaterialApprovalForm)) {
return R.ok(standardMaterialApprovalForm, "对象创建成功");
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.addById(standardMaterialApprovalFormDTO, dlpUser);
if (standardMaterialApprovalForm!=null) {
return R.ok(standardMaterialApprovalForm, "保存成功");
}
else {
return R.failed(standardMaterialApprovalForm, "对象创建失败");
return R.failed(standardMaterialApprovalForm, "保存失败");
}
}
/**
* 修改(标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalForm (标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalFormDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
* @return R
*/
@ApiOperation(value = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("修改(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@PutMapping
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" )
public R<StandardMaterialApprovalForm> putUpdateById(@RequestBody StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
public R<StandardMaterialApprovalForm> putUpdateById(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
if (standardMaterialApprovalFormService.updateById(standardMaterialApprovalForm)) {
return R.ok(standardMaterialApprovalForm, "保存对象成功");
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.editById(standardMaterialApprovalFormDTO);
if (standardMaterialApprovalForm!=null) {
return R.ok(standardMaterialApprovalForm, "修改成功");
}
else {
return R.failed(standardMaterialApprovalForm, "保存对象失败");
return R.failed(standardMaterialApprovalForm, "修改失败");
}
}
/**
* 通过id删除(标准物质停用/报废销毁/恢复/降级使用审批表)
* @param standardMaterialApprovalFormId id
* @return R
*/
@ApiOperation(value = "通过id删除(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "通过id删除(标准物质停用/报废销毁/恢复/降级使用审批表)")
@SysLog("通过id删除(标准物质停用/报废销毁/恢复/降级使用审批表)" )
@DeleteMapping("/{standardMaterialApprovalFormId}" )
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_del')" )
public R<StandardMaterialApprovalForm> deleteById(@PathVariable String standardMaterialApprovalFormId, HttpServletRequest theHttpServletRequest) {
Principal principal = theHttpServletRequest.getUserPrincipal();
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
StandardMaterialApprovalForm oldStandardMaterialApprovalForm = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId);
if (standardMaterialApprovalFormService.removeById(standardMaterialApprovalFormId)) {
return R.ok(oldStandardMaterialApprovalForm, "对象删除成功");
}
else {
return R.failed(oldStandardMaterialApprovalForm, "对象删除失败");
}
}
}

@ -0,0 +1,30 @@
package digital.laboratory.platform.reagent.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StandardMaterialApprovalFormDTO {
private String agentName;
private String applicantId;
private String applicantName;
private String batchNumber;
private String fixedResult;
private String manufacturerId;
private String referenceMaterialNumber;
private String referenceMaterialName;
private LocalDateTime purchaseTime;
private Integer quantity;
private String reasonForApplication;
private String referenceMaterialId;
private String remarks;
private String specification;
private String standardMaterialApprovalFormId;
}

@ -107,8 +107,11 @@ public class StandardMaterialApprovalForm extends BaseEntity {
*/
@ApiModelProperty(value="(申请人)")
private String applicantId;
/**
* (申请人)
*/
@ApiModelProperty(value="(申请人名称)")
private String applicantName;
/**
* (申请时间)

@ -1,7 +1,10 @@
package digital.laboratory.platform.reagent.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -14,4 +17,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface StandardMaterialApprovalFormMapper extends BaseMapper<StandardMaterialApprovalForm> {
IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw);
}

@ -1,7 +1,13 @@
package digital.laboratory.platform.reagent.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.StandardMaterialApprovalFormDTO;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
/**
* (标准物质停用/报废销毁/恢复/降级使用审批表)服务类
@ -11,4 +17,21 @@ import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
*/
public interface StandardMaterialApprovalFormService extends IService<StandardMaterialApprovalForm> {
StandardMaterialApprovalForm addById (StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser);
StandardMaterialApprovalForm editById (StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO);
StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser);
IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw);
StandardMaterialApprovalFormVO getVO(String standardMaterialApprovalFormId);
StandardMaterialApprovalForm auditPrimary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
//二级审核
StandardMaterialApprovalForm auditSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
//审批
StandardMaterialApprovalForm approveById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
}

@ -114,7 +114,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
// purchasingPlanDTO.getReagentConsumableId() != null)) {
// throw new RuntimeException(String.format("您输入的值有误,请重新输入"));
// }
//合并相同的采购内容
if (list.size() != 0) {
for (int i = 0; i < list.size(); i++) {

@ -1,11 +1,23 @@
package digital.laboratory.platform.reagent.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.StandardMaterialApprovalFormDTO;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import digital.laboratory.platform.reagent.entity.SupplierInformation;
import digital.laboratory.platform.reagent.mapper.StandardMaterialApprovalFormMapper;
import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService;
import digital.laboratory.platform.reagent.service.SupplierInformationService;
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
/**
* (标准物质停用/报废销毁/恢复/降级使用审批表)服务实现类
*
@ -15,4 +27,120 @@ import org.springframework.stereotype.Service;
@Service
public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<StandardMaterialApprovalFormMapper, StandardMaterialApprovalForm> implements StandardMaterialApprovalFormService {
@Autowired
private StandardMaterialApprovalFormService standardMaterialApprovalFormService;
@Autowired
private SupplierInformationService supplierInformationService;
@Override
public StandardMaterialApprovalForm addById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser){
StandardMaterialApprovalForm standardMaterialApprovalForm = new StandardMaterialApprovalForm();
BeanUtils.copyProperties(standardMaterialApprovalFormDTO,standardMaterialApprovalForm);
if (standardMaterialApprovalFormService.save(standardMaterialApprovalForm)){
return standardMaterialApprovalForm;
}else throw new RuntimeException(String.format("保存失败"));
}
@Override
public StandardMaterialApprovalForm editById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO){
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormDTO.getStandardMaterialApprovalFormId());
BeanUtils.copyProperties(standardMaterialApprovalFormDTO,standardMaterialApprovalForm);
if (standardMaterialApprovalFormService.updateById(standardMaterialApprovalForm)){
return standardMaterialApprovalForm;
}else throw new RuntimeException(String.format("保存失败"));
}
@Override
public StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser){
if (standardMaterialApprovalFormDTO.getStandardMaterialApprovalFormId().equals("")){
StandardMaterialApprovalForm standardMaterialApprovalForm = addById(standardMaterialApprovalFormDTO, dlpUser);
return standardMaterialApprovalForm;
}else {
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormDTO.getStandardMaterialApprovalFormId());
BeanUtils.copyProperties(standardMaterialApprovalFormDTO,byId);
if (standardMaterialApprovalFormService.updateById(byId)){
return byId;
}else throw new RuntimeException(String.format("提交失败"));
}
}
@Override
public IPage<StandardMaterialApprovalFormVO> getVOPage(IPage<StandardMaterialApprovalForm> page, QueryWrapper<StandardMaterialApprovalForm> qw){
IPage<StandardMaterialApprovalFormVO> voPage = baseMapper.getVOPage(page, qw);
return voPage;
}
@Override
public StandardMaterialApprovalFormVO getVO(String standardMaterialApprovalFormId){
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId);
StandardMaterialApprovalFormVO standardMaterialApprovalFormVO = new StandardMaterialApprovalFormVO();
BeanUtils.copyProperties(byId,standardMaterialApprovalFormVO);
SupplierInformation byId1 = supplierInformationService.getById(standardMaterialApprovalFormVO.getManufacturerId());
standardMaterialApprovalFormVO.setManufacturerName(byId1.getSupplierName());
return standardMaterialApprovalFormVO;
}
@Override//一级审核
public StandardMaterialApprovalForm auditPrimary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser){
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
byId.setAuditOpinionOfPrimary(auditAndApproveDTO.getAuditOpinion());
byId.setAuditResultOfPrimary(auditAndApproveDTO.getAuditResult());
byId.setPrimaryAuditorId(dlpUser.getId());
byId.setAuditTimeOfPrimary(LocalDateTime.now());
if (standardMaterialApprovalFormService.updateById(byId)){
return byId;
}else throw new RuntimeException(String.format("审核失败"));
}
@Override//二级审核
public StandardMaterialApprovalForm auditSecondary(AuditAndApproveDTO auditAndApproveDTO,DLPUser dlpUser){
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
byId.setAuditOpinionOfSecondary(auditAndApproveDTO.getAuditOpinion());
byId.setAuditResultOfSecondary(auditAndApproveDTO.getAuditResult());
byId.setSecondaryAuditorId(dlpUser.getId());
byId.setAuditTimeOfSecondary(LocalDateTime.now());
if (standardMaterialApprovalFormService.updateById(byId)){
return byId;
}else throw new RuntimeException(String.format("审核失败"));
}
@Override//审批
public StandardMaterialApprovalForm approveById(AuditAndApproveDTO auditAndApproveDTO,DLPUser dlpUser){
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
byId.setOpinionOfApproval(auditAndApproveDTO.getAuditOpinion());
byId.setResultOfApproval(auditAndApproveDTO.getAuditResult());
byId.setApproverId(dlpUser.getId());
byId.setApprovalOfTime(LocalDateTime.now());
if (standardMaterialApprovalFormService.updateById(byId)){
return byId;
}else throw new RuntimeException(String.format("审批失败"));
}
}

@ -0,0 +1,10 @@
package digital.laboratory.platform.reagent.vo;
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
import lombok.Data;
@Data
public class StandardMaterialApprovalFormVO extends StandardMaterialApprovalForm {
private String manufacturerName;
}

@ -39,4 +39,17 @@
<result property="technicalDirectorId" column="technical_director_id"/>
</resultMap>
<resultMap id="standardMaterialApprovalFormVO" type="digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO" extends="standardMaterialApprovalFormMap">
<result property="manufacturerName" column="manufacturer_name"></result>
</resultMap>
<select id="getVOPage" resultMap="standardMaterialApprovalFormVO" resultType="digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO">
SELECT smaf.*,
(select si.supplier_name
from supplier_information si
where si.supplier_information_id = smaf.manufacturer_id) as manufacturer_name
FROM standard_material_approval_form smaf
</select>
</mapper>

Loading…
Cancel
Save