3.21
This commit is contained in:
-3
@@ -7,7 +7,6 @@ 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.entity.AfterSaleSituation;
|
||||
import digital.laboratory.platform.reagent.service.AfterSaleSituationService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -17,8 +16,6 @@ import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
|
||||
-4
@@ -7,8 +7,6 @@ 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.entity.EvaluationResult;
|
||||
import digital.laboratory.platform.reagent.service.EvaluationResultService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -17,8 +15,6 @@ import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
|
||||
+4
-49
@@ -73,7 +73,7 @@ public class PurchaseListController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" )
|
||||
public R<IPage<PurchaseList>> getPurchaseListPage(Page<PurchaseList> page, PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -92,8 +92,8 @@ public class PurchaseListController {
|
||||
* @param purchaseListDTOList (采购清单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(采购清单)", notes = "新增(采购清单)")
|
||||
@SysLog("新增(采购清单)" )
|
||||
@ApiOperation(value = "新增采购清单", notes = "新增采购清单")
|
||||
@SysLog("新增采购清单" )
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_purchase_list_add')" )
|
||||
public R<PurchaseList> postAddObject(@RequestBody List<PurchaseListDTO> purchaseListDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
@@ -110,51 +110,6 @@ public class PurchaseListController {
|
||||
else {
|
||||
return R.failed(purchaseList, "创建失败");
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
/**
|
||||
* 修改(采购清单)
|
||||
* @param purchaseList (采购清单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(采购清单)", notes = "修改(采购清单)")
|
||||
@SysLog("修改(采购清单)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_edit')" )
|
||||
public R<PurchaseList> putUpdateById(@RequestBody PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (purchaseListService.updateById(purchaseList)) {
|
||||
return R.ok(purchaseList, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(purchaseList, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(采购清单)
|
||||
* @param purchaseListId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(采购清单)", notes = "通过id删除(采购清单)")
|
||||
@SysLog("通过id删除(采购清单)" )
|
||||
@DeleteMapping("/{purchaseListId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_del')" )
|
||||
public R<PurchaseList> deleteById(@PathVariable String purchaseListId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaseList oldPurchaseList = purchaseListService.getById(purchaseListId);
|
||||
|
||||
if (purchaseListService.removeById(purchaseListId)) {
|
||||
return R.ok(oldPurchaseList, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldPurchaseList, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+31
-45
@@ -7,6 +7,7 @@ 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.SupplierInformationDTO;
|
||||
import digital.laboratory.platform.reagent.entity.SupplierInformation;
|
||||
import digital.laboratory.platform.reagent.service.SupplierInformationService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -49,14 +50,17 @@ public class SupplierInformationController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{supplierInformationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
public R<SupplierInformation> getById(@PathVariable("supplierInformationId" ) String supplierInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(supplierInformationId);
|
||||
|
||||
return R.ok(supplierInformation);
|
||||
//return R.ok(supplierInformationService.getById(supplierInformationId));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,7 +71,7 @@ public class SupplierInformationController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
public R<IPage<SupplierInformation>> getSupplierInformationPage(Page<SupplierInformation> page, SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -83,69 +87,51 @@ public class SupplierInformationController {
|
||||
|
||||
/**
|
||||
* 新增(服务商/供应商信息)
|
||||
* @param supplierInformation (服务商/供应商信息)
|
||||
* @param supplierInformationDTO (服务商/供应商信息)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(服务商/供应商信息)", notes = "新增(服务商/供应商信息)")
|
||||
@SysLog("新增(服务商/供应商信息)" )
|
||||
@ApiOperation(value = "新增服务商/供应商信息", notes = "新增服务商/供应商信息")
|
||||
@SysLog("新增服务商/供应商信息" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
|
||||
public R<SupplierInformation> postAddObject(@RequestBody SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) {
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
|
||||
public R<SupplierInformation> postAddObject(@RequestBody SupplierInformationDTO supplierInformationDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
supplierInformation.setSupplierInformationId(IdWorker.get32UUID().toUpperCase());
|
||||
if (supplierInformationService.save(supplierInformation)) {
|
||||
return R.ok(supplierInformation, "对象创建成功");
|
||||
SupplierInformation supplierInformation = new SupplierInformation();
|
||||
|
||||
if (supplierInformationService.addInfoById(supplierInformationDTO,supplierInformation)) {
|
||||
return R.ok(supplierInformation, "保存成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(supplierInformation, "对象创建失败");
|
||||
return R.failed("保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(服务商/供应商信息)
|
||||
* @param supplierInformation (服务商/供应商信息)
|
||||
* @param supplierInformationDTO (服务商/供应商信息)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(服务商/供应商信息)", notes = "修改(服务商/供应商信息)")
|
||||
@SysLog("修改(服务商/供应商信息)" )
|
||||
@ApiOperation(value = "修改服务商/供应商信息", notes = "修改服务商/供应商信息")
|
||||
@SysLog("修改服务商/供应商信息" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" )
|
||||
public R<SupplierInformation> putUpdateById(@RequestBody SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) {
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" )
|
||||
public R<SupplierInformation> putUpdateById(@RequestBody SupplierInformationDTO supplierInformationDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (supplierInformationService.updateById(supplierInformation)) {
|
||||
return R.ok(supplierInformation, "保存对象成功");
|
||||
SupplierInformation supplierInformation = supplierInformationService.editInfoById(supplierInformationDTO);
|
||||
|
||||
if (supplierInformation!=null) {
|
||||
return R.ok(supplierInformation, "修改成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(supplierInformation, "保存对象失败");
|
||||
return R.failed("修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(服务商/供应商信息)
|
||||
* @param supplierInformationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(服务商/供应商信息)", notes = "通过id删除(服务商/供应商信息)")
|
||||
@SysLog("通过id删除(服务商/供应商信息)" )
|
||||
@DeleteMapping("/{supplierInformationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_del')" )
|
||||
public R<SupplierInformation> deleteById(@PathVariable String supplierInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SupplierInformation oldSupplierInformation = supplierInformationService.getById(supplierInformationId);
|
||||
|
||||
if (supplierInformationService.removeById(supplierInformationId)) {
|
||||
return R.ok(oldSupplierInformation, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldSupplierInformation, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PurchaseListDTO {
|
||||
private String name;
|
||||
private String purchaseListId;
|
||||
private Integer purchaseQuantity;
|
||||
private String reagentConsumableId;
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 服务商/供应商响应、资质和售后情况
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:06
|
||||
* @describe 服务商/供应商响应、资质和售后情况 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "after_sale_situation", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "服务商/供应商响应、资质和售后情况")
|
||||
public class AfterSaleSituation extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价表ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(服务商/供应商评价表ID)")
|
||||
private String evaluationFormId;
|
||||
|
||||
/**
|
||||
* (供应商营业执照)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商营业执照)")
|
||||
private String supplierBusinessLicense;
|
||||
|
||||
/**
|
||||
* (供应商通过质量保证体系)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商通过质量保证体系)")
|
||||
private String supplierPassesQualityAssuranceSystem;
|
||||
|
||||
/**
|
||||
* (供应商产品认证)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商产品认证)")
|
||||
private String supplierProductCertification;
|
||||
|
||||
/**
|
||||
* afterSaleSituationId
|
||||
*/
|
||||
@TableId(value = "after_sale_situation_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="afterSaleSituationId")
|
||||
private String afterSaleSituationId;
|
||||
|
||||
|
||||
}
|
||||
@@ -7,7 +7,10 @@ import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -25,16 +28,52 @@ import lombok.EqualsAndHashCode;
|
||||
public class EvaluationForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (采购负责人评价意见)
|
||||
* (一级评价意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购负责人评价意见)")
|
||||
private String commentsFromThePurchasingManager;
|
||||
@ApiModelProperty(value="(一级评价意见)")
|
||||
private String commentsFromPrimary;
|
||||
|
||||
/**
|
||||
* (技术负责人评价意见)
|
||||
* (一级评价时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人评价意见)")
|
||||
private String commentsFromTheTechnicalDirector;
|
||||
@ApiModelProperty(value="(一级评价时间)")
|
||||
private LocalDate commentsDateFromPrimary;
|
||||
|
||||
/**
|
||||
* (二级评价意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(二级评价意见)")
|
||||
private String commentsFromSecondary;
|
||||
|
||||
/**
|
||||
* (二级评价时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(二级评价时间)")
|
||||
private LocalDate commentsDateFromSecondary;
|
||||
|
||||
/**
|
||||
* (二级评价结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(二级评价结果)")
|
||||
private String commentsResultFromSecondary;
|
||||
|
||||
/**
|
||||
* (三级评价意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(三级评价意见)")
|
||||
private String commentsFromThreeLevel;
|
||||
|
||||
/**
|
||||
* (三级评价时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(三级评价时间)")
|
||||
private LocalDate commentsDateFromThreeLevel;
|
||||
|
||||
/**
|
||||
* (三级评价结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(三级评价结果)")
|
||||
private String commentsResultFromThreeLevel;
|
||||
|
||||
/**
|
||||
* (联系电话)
|
||||
@@ -49,38 +88,28 @@ public class EvaluationForm extends BaseEntity {
|
||||
private String contactPerson;
|
||||
|
||||
/**
|
||||
* (采购负责人ID)
|
||||
* (一级评价人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购负责人ID)")
|
||||
private String purchasingManagerId;
|
||||
@ApiModelProperty(value="(一级评价人ID)")
|
||||
private String primaryUserId;
|
||||
|
||||
/**
|
||||
* (质量负责人评价意见)
|
||||
* (二级评价人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人评价意见)")
|
||||
private String qualitySupervisorEvaluationComments;
|
||||
@ApiModelProperty(value="(二级评价人ID)")
|
||||
private String secondaryUserId;
|
||||
|
||||
/**
|
||||
* (质量负责人ID)
|
||||
* (三级评价人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人ID)")
|
||||
private String qualitySupervisorId;
|
||||
|
||||
@ApiModelProperty(value="(三级评价人ID)")
|
||||
private String threeLevelUserId;
|
||||
/**
|
||||
* (服务商/供应商ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(服务商/供应商ID)")
|
||||
private String serviceProviderAndSupplierId;
|
||||
|
||||
/**
|
||||
* (技术负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人ID)")
|
||||
private String technicalDirectorId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* evaluationFormId
|
||||
@@ -89,11 +118,71 @@ public class EvaluationForm extends BaseEntity {
|
||||
@ApiModelProperty(value="evaluationFormId")
|
||||
private String evaluationFormId;
|
||||
|
||||
/**
|
||||
* (供应商营业执照)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商营业执照)")
|
||||
private String supplierBusinessLicense;
|
||||
|
||||
/**
|
||||
* (供应商通过质量保证体系)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商通过质量保证体系)")
|
||||
private String supplierPassesQualityAssuranceSystem;
|
||||
|
||||
/**
|
||||
* (供应商产品认证)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商产品认证)")
|
||||
private String supplierProductCertification;
|
||||
|
||||
/**
|
||||
* (对供应品检验校准效率)
|
||||
*/
|
||||
@ApiModelProperty(value="(对供应品检验校准效率)")
|
||||
private String checkAndCalibrateEfficiencyOfSupplies;
|
||||
|
||||
/**
|
||||
* (对供应商总体服务是否满意)
|
||||
*/
|
||||
@ApiModelProperty(value="(对供应商总体服务是否满意)")
|
||||
private String overallSupplierServiceSatisfaction;
|
||||
|
||||
/**
|
||||
* (供应商态度)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商态度)")
|
||||
private String supplierAttitude;
|
||||
|
||||
/**
|
||||
* (供应商设备与设施)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商设备与设施)")
|
||||
private String supplierEquipmentAndFacilities;
|
||||
|
||||
/**
|
||||
* (供应商技术与管理能力)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商技术与管理能力)")
|
||||
private String supplierTechnologyAndManagementCapability;
|
||||
|
||||
/**
|
||||
* (供应商交货是否及时)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商交货是否及时)")
|
||||
private String whetherTheSupplierDeliversOnTime;
|
||||
|
||||
/**
|
||||
* supplierInformationId
|
||||
*/
|
||||
@ApiModelProperty(value="supplierInformationId")
|
||||
private String supplierInformationId;
|
||||
|
||||
/**
|
||||
* supplierInformationId
|
||||
*/
|
||||
@ApiModelProperty(value="supplierInformationId")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价结果)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:06
|
||||
* @describe (服务商/供应商评价结果) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "evaluation_result", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(服务商/供应商评价结果)")
|
||||
public class EvaluationResult extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (对供应品检验校准效率)
|
||||
*/
|
||||
@ApiModelProperty(value="(对供应品检验校准效率)")
|
||||
private String checkAndCalibrateEfficiencyOfSupplies;
|
||||
|
||||
/**
|
||||
* (对供应商总体服务是否满意)
|
||||
*/
|
||||
@ApiModelProperty(value="(对供应商总体服务是否满意)")
|
||||
private String overallSupplierServiceSatisfaction;
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价表id)
|
||||
*/
|
||||
@ApiModelProperty(value="(服务商/供应商评价表id)")
|
||||
private String evaluationFormId;
|
||||
|
||||
/**
|
||||
* (供应商态度)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商态度)")
|
||||
private String supplierAttitude;
|
||||
|
||||
/**
|
||||
* (供应商设备与设施)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商设备与设施)")
|
||||
private String supplierEquipmentAndFacilities;
|
||||
|
||||
/**
|
||||
* (供应商技术与管理能力)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商技术与管理能力)")
|
||||
private String supplierTechnologyAndManagementCapability;
|
||||
|
||||
/**
|
||||
* (供应商交货是否及时)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商交货是否及时)")
|
||||
private String whetherTheSupplierDeliversOnTime;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* evaluationResultId
|
||||
*/
|
||||
@TableId(value = "evaluation_result_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="evaluationResultId")
|
||||
private String evaluationResultId;
|
||||
|
||||
|
||||
}
|
||||
+2
-2
@@ -44,8 +44,8 @@ public class ProvideServicesOrSupplies extends BaseEntity {
|
||||
* provideServicesOrSuppliesid
|
||||
*/
|
||||
@TableId(value = "provide_services_or_suppliesID", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="provideServicesOrSuppliesid")
|
||||
private String provideServicesOrSuppliesid;
|
||||
@ApiModelProperty(value="provideServicesOrSuppliesId")
|
||||
private String provideServicesOrSuppliesId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
|
||||
* @describe (采购清单明细) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "purchaselist_details", autoResultMap = true)
|
||||
@TableName(value = "purchase_list_details", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(采购清单明细)")
|
||||
public class PurchaseListDetails extends BaseEntity {
|
||||
|
||||
@@ -66,10 +66,6 @@ public class SupplierInformation extends BaseEntity {
|
||||
@ApiModelProperty(value="(供应范围)")
|
||||
private String scopeOfSupply;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (供应商编码)
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.AfterSaleSituation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 服务商/供应商响应、资质和售后情况 Mapper 接口
|
||||
|
||||
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.EvaluationForm;
|
||||
import digital.laboratory.platform.reagent.vo.EvaluationFormVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -14,4 +15,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface EvaluationFormMapper extends BaseMapper<EvaluationForm> {
|
||||
|
||||
EvaluationFormVO getEvaluationForm(String evaluationFormId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.EvaluationResult;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价结果) Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (服务商/供应商评价结果) Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface EvaluationResultMapper extends BaseMapper<EvaluationResult> {
|
||||
|
||||
}
|
||||
+5
@@ -2,9 +2,12 @@ package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies;
|
||||
import digital.laboratory.platform.reagent.vo.ProvideServicesOrSuppliesVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提供服务或供应品 Mapper 接口
|
||||
*
|
||||
@@ -14,4 +17,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface ProvideServicesOrSuppliesMapper extends BaseMapper<ProvideServicesOrSupplies> {
|
||||
|
||||
List<ProvideServicesOrSuppliesVO> getProvideServicesOrSuppliesVOList (String provideServicesOrSuppliesId);
|
||||
|
||||
}
|
||||
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.AfterSaleSituation;
|
||||
|
||||
/**
|
||||
* 服务商/供应商响应、资质和售后情况服务类
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
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.EvaluationFormDTO;
|
||||
import digital.laboratory.platform.reagent.entity.EvaluationForm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价表)服务类
|
||||
*
|
||||
@@ -11,4 +16,13 @@ import digital.laboratory.platform.reagent.entity.EvaluationForm;
|
||||
*/
|
||||
public interface EvaluationFormService extends IService<EvaluationForm> {
|
||||
|
||||
EvaluationForm getEvaluationForm(String evaluationFormId);
|
||||
|
||||
|
||||
//增加/修改评价表
|
||||
EvaluationForm addFormById(EvaluationFormDTO evaluationFormDTO,DLPUser dlpUser);
|
||||
|
||||
EvaluationForm auditFormOfSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
|
||||
EvaluationForm auditFormOfThreeLevel(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
}
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.EvaluationResult;
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价结果)服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (服务商/供应商评价结果) 服务类
|
||||
*/
|
||||
public interface EvaluationResultService extends IService<EvaluationResult> {
|
||||
|
||||
}
|
||||
+5
@@ -2,6 +2,9 @@ package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies;
|
||||
import digital.laboratory.platform.reagent.vo.ProvideServicesOrSuppliesVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提供服务或供应品服务类
|
||||
@@ -11,4 +14,6 @@ import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies;
|
||||
*/
|
||||
public interface ProvideServicesOrSuppliesService extends IService<ProvideServicesOrSupplies> {
|
||||
|
||||
List<ProvideServicesOrSuppliesVO> getProvideServicesOrSuppliesVOList (String provideServicesOrSuppliesId);
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -1,6 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.dto.SupplierInformationDTO;
|
||||
import digital.laboratory.platform.reagent.entity.SupplierInformation;
|
||||
|
||||
/**
|
||||
@@ -11,4 +12,7 @@ import digital.laboratory.platform.reagent.entity.SupplierInformation;
|
||||
*/
|
||||
public interface SupplierInformationService extends IService<SupplierInformation> {
|
||||
|
||||
Boolean addInfoById(SupplierInformationDTO supplierInformationDTO,SupplierInformation supplierInformation);
|
||||
|
||||
SupplierInformation editInfoById(SupplierInformationDTO supplierInformationDTO);
|
||||
}
|
||||
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.AfterSaleSituation;
|
||||
import digital.laboratory.platform.reagent.mapper.AfterSaleSituationMapper;
|
||||
import digital.laboratory.platform.reagent.service.AfterSaleSituationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
+184
-1
@@ -1,18 +1,201 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
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.EvaluationFormDTO;
|
||||
import digital.laboratory.platform.reagent.entity.EvaluationForm;
|
||||
import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies;
|
||||
import digital.laboratory.platform.reagent.entity.PurchaseListDetails;
|
||||
import digital.laboratory.platform.reagent.entity.SupplierInformation;
|
||||
import digital.laboratory.platform.reagent.mapper.EvaluationFormMapper;
|
||||
import digital.laboratory.platform.reagent.service.EvaluationFormService;
|
||||
import digital.laboratory.platform.reagent.service.ProvideServicesOrSuppliesService;
|
||||
import digital.laboratory.platform.reagent.service.PurchaseListDetailsService;
|
||||
import digital.laboratory.platform.reagent.service.SupplierInformationService;
|
||||
import digital.laboratory.platform.reagent.vo.EvaluationFormVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价表)服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (服务商/供应商评价表) 服务实现类
|
||||
* @describe (服务商 / 供应商评价表) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper, EvaluationForm> implements EvaluationFormService {
|
||||
|
||||
@Autowired
|
||||
private EvaluationFormService evaluationFormService;
|
||||
@Autowired
|
||||
private ProvideServicesOrSuppliesService provideServicesOrSuppliesService;
|
||||
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
|
||||
@Autowired
|
||||
private PurchaseListDetailsService purchaseListDetailsService;
|
||||
|
||||
@Override//通过ID查询评价表
|
||||
public EvaluationForm getEvaluationForm(String evaluationFormId) {
|
||||
|
||||
EvaluationFormVO evaluationForm = baseMapper.getEvaluationForm(evaluationFormId);
|
||||
|
||||
evaluationForm.setProvideServicesOrSuppliesVOList(provideServicesOrSuppliesService.getProvideServicesOrSuppliesVOList(evaluationFormId));
|
||||
|
||||
return evaluationForm;
|
||||
}
|
||||
|
||||
@Override//增加/修改评价表
|
||||
public EvaluationForm addFormById(EvaluationFormDTO evaluationFormDTO,DLPUser dlpUser) {
|
||||
|
||||
if (evaluationFormService.getById(evaluationFormDTO.getEvaluationFormId()) != null) {
|
||||
|
||||
LambdaQueryWrapper<ProvideServicesOrSupplies> provideServicesOrSuppliesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
provideServicesOrSuppliesLambdaQueryWrapper.eq(ProvideServicesOrSupplies::getEvaluationFormId, evaluationFormDTO.getEvaluationFormId());
|
||||
//先删除提供的供应品集合
|
||||
provideServicesOrSuppliesService.removeBatchByIds(provideServicesOrSuppliesService.list(provideServicesOrSuppliesLambdaQueryWrapper));
|
||||
|
||||
EvaluationForm byId = evaluationFormService.getById(evaluationFormDTO.getEvaluationFormId());
|
||||
|
||||
BeanUtils.copyProperties(evaluationFormDTO, byId);
|
||||
|
||||
byId.setPrimaryUserId(dlpUser.getId());
|
||||
|
||||
byId.setCommentsDateFromPrimary(LocalDate.now());
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
List<ProvideServicesOrSupplies> list = new ArrayList<>();
|
||||
//再通过供应商ID,在采购清单列表里面,查找对应供应商提供的所有试剂耗材ID
|
||||
SupplierInformation byId1 = supplierInformationService.getById(evaluationFormDTO.getSupplierInformationId());
|
||||
|
||||
LambdaQueryWrapper<PurchaseListDetails> purchaseListDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseListDetailsLambdaQueryWrapper.eq(PurchaseListDetails::getSupplierId, byId1.getSupplierInformationId());
|
||||
|
||||
List<PurchaseListDetails> purchaseListDetailsList = purchaseListDetailsService.list(purchaseListDetailsLambdaQueryWrapper);
|
||||
|
||||
for (PurchaseListDetails purchaseListDetails : purchaseListDetailsList) {
|
||||
|
||||
ProvideServicesOrSupplies provideServicesOrSupplies = new ProvideServicesOrSupplies();
|
||||
|
||||
provideServicesOrSupplies.setReagentConsumableId(purchaseListDetails.getReagentConsumableId());
|
||||
|
||||
provideServicesOrSupplies.setEvaluationFormId(byId.getEvaluationFormId());
|
||||
|
||||
provideServicesOrSupplies.setProvideServicesOrSuppliesId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
list.add(provideServicesOrSupplies);
|
||||
}
|
||||
if (evaluationFormService.save(byId) & provideServicesOrSuppliesService.saveBatch(list)) {
|
||||
return byId;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
EvaluationForm evaluationForm = new EvaluationForm();
|
||||
|
||||
BeanUtils.copyProperties(evaluationFormDTO,evaluationForm);
|
||||
|
||||
evaluationForm.setStatus(1);
|
||||
|
||||
evaluationForm.setEvaluationFormId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
evaluationForm.setPrimaryUserId(dlpUser.getId());
|
||||
|
||||
evaluationForm.setCommentsDateFromPrimary(LocalDate.now());
|
||||
|
||||
List<ProvideServicesOrSupplies> list = new ArrayList<>();
|
||||
//再通过供应商ID,在采购清单列表里面,查找对应供应商提供的所有试剂耗材ID
|
||||
SupplierInformation byId1 = supplierInformationService.getById(evaluationFormDTO.getSupplierInformationId());
|
||||
|
||||
LambdaQueryWrapper<PurchaseListDetails> purchaseListDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseListDetailsLambdaQueryWrapper.eq(PurchaseListDetails::getSupplierId, byId1.getSupplierInformationId());
|
||||
|
||||
List<PurchaseListDetails> purchaseListDetailsList = purchaseListDetailsService.list(purchaseListDetailsLambdaQueryWrapper);
|
||||
|
||||
for (PurchaseListDetails purchaseListDetails : purchaseListDetailsList) {
|
||||
|
||||
ProvideServicesOrSupplies provideServicesOrSupplies = new ProvideServicesOrSupplies();
|
||||
|
||||
provideServicesOrSupplies.setReagentConsumableId(purchaseListDetails.getReagentConsumableId());
|
||||
|
||||
provideServicesOrSupplies.setEvaluationFormId(evaluationForm.getEvaluationFormId());
|
||||
|
||||
provideServicesOrSupplies.setProvideServicesOrSuppliesId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
list.add(provideServicesOrSupplies);
|
||||
}
|
||||
|
||||
if (evaluationFormService.save(evaluationForm)&provideServicesOrSuppliesService.saveBatch(list)){
|
||||
return evaluationForm;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override//二级审核
|
||||
public EvaluationForm auditFormOfSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser){
|
||||
|
||||
EvaluationForm byId = evaluationFormService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setSecondaryUserId(dlpUser.getId());
|
||||
|
||||
byId.setCommentsDateFromSecondary(LocalDate.now());
|
||||
|
||||
byId.setCommentsFromSecondary(auditAndApproveDTO.getAuditOpinion());
|
||||
|
||||
byId.setCommentsResultFromSecondary(auditAndApproveDTO.getAuditResult());
|
||||
|
||||
if (evaluationFormService.updateById(byId)){
|
||||
return byId;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override//三级审核
|
||||
|
||||
public EvaluationForm auditFormOfThreeLevel(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser){
|
||||
|
||||
EvaluationForm byId = evaluationFormService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setSecondaryUserId(dlpUser.getId());
|
||||
|
||||
byId.setCommentsDateFromThreeLevel(LocalDate.now());
|
||||
|
||||
byId.setCommentsFromThreeLevel(auditAndApproveDTO.getAuditOpinion());
|
||||
|
||||
byId.setCommentsResultFromThreeLevel(auditAndApproveDTO.getAuditResult());
|
||||
|
||||
if (evaluationFormService.updateById(byId)){
|
||||
return byId;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-4
@@ -1,9 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.EvaluationResult;
|
||||
import digital.laboratory.platform.reagent.mapper.EvaluationResultMapper;
|
||||
import digital.laboratory.platform.reagent.service.EvaluationResultService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@@ -13,6 +11,6 @@ import org.springframework.stereotype.Service;
|
||||
* @describe (服务商/供应商评价结果) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class EvaluationResultServiceImpl extends ServiceImpl<EvaluationResultMapper, EvaluationResult> implements EvaluationResultService {
|
||||
public class EvaluationResultServiceImpl extends ServiceImpl<EvaluationResultMapper, EvaluationResult> implements IService<EvaluationResult> {
|
||||
|
||||
}
|
||||
|
||||
+10
@@ -4,8 +4,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies;
|
||||
import digital.laboratory.platform.reagent.mapper.ProvideServicesOrSuppliesMapper;
|
||||
import digital.laboratory.platform.reagent.service.ProvideServicesOrSuppliesService;
|
||||
import digital.laboratory.platform.reagent.vo.ProvideServicesOrSuppliesVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提供服务或供应品服务实现类
|
||||
*
|
||||
@@ -14,5 +18,11 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class ProvideServicesOrSuppliesServiceImpl extends ServiceImpl<ProvideServicesOrSuppliesMapper, ProvideServicesOrSupplies> implements ProvideServicesOrSuppliesService {
|
||||
@Override
|
||||
public List<ProvideServicesOrSuppliesVO> getProvideServicesOrSuppliesVOList(String provideServicesOrSuppliesId) {
|
||||
|
||||
List<ProvideServicesOrSuppliesVO> provideServicesOrSuppliesVOList = baseMapper.getProvideServicesOrSuppliesVOList(provideServicesOrSuppliesId);
|
||||
|
||||
return provideServicesOrSuppliesVOList;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -53,6 +55,8 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
|
||||
purchaseList.setPurchaseListId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
purchaseList.setName(LocalDate.now()+"采购清单");
|
||||
|
||||
List<PurchaseListDetails> purchaseListDetailsList= new ArrayList<>();
|
||||
|
||||
for (PurchaseListDTO purchaseListDTO : purchaseListDTOList) {
|
||||
@@ -72,7 +76,5 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+46
-1
@@ -1,18 +1,63 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.dto.SupplierInformationDTO;
|
||||
import digital.laboratory.platform.reagent.entity.SupplierInformation;
|
||||
import digital.laboratory.platform.reagent.mapper.SupplierInformationMapper;
|
||||
import digital.laboratory.platform.reagent.service.SupplierInformationService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (服务商/供应商信息)服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (服务商/供应商信息) 服务实现类
|
||||
* @describe (服务商 / 供应商信息) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformationMapper, SupplierInformation> implements SupplierInformationService {
|
||||
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
|
||||
@Override//新增供应商信息
|
||||
public Boolean addInfoById(SupplierInformationDTO supplierInformationDTO, SupplierInformation supplierInformation) {
|
||||
|
||||
LambdaQueryWrapper<SupplierInformation> supplierInformationQueryWrapper = new LambdaQueryWrapper();
|
||||
|
||||
List<SupplierInformation> list = supplierInformationService.list(supplierInformationQueryWrapper);
|
||||
|
||||
for (SupplierInformation information : list) {
|
||||
if (information.getSupplierName().equals(supplierInformationDTO.getSupplierName())) {
|
||||
throw new RuntimeException(String.format("该供应商信息已存在"));
|
||||
}
|
||||
}
|
||||
|
||||
BeanUtils.copyProperties(supplierInformationDTO, supplierInformation);
|
||||
|
||||
supplierInformation.setSupplierInformationId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
return supplierInformationService.save(supplierInformation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierInformation editInfoById(SupplierInformationDTO supplierInformationDTO) {
|
||||
|
||||
SupplierInformation byId = supplierInformationService.getById(supplierInformationDTO.getSupplierInformationId());
|
||||
|
||||
BeanUtils.copyProperties(supplierInformationDTO, byId);
|
||||
|
||||
if (supplierInformationService.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,22 +4,61 @@
|
||||
|
||||
<mapper namespace="digital.laboratory.platform.reagent.mapper.EvaluationFormMapper">
|
||||
|
||||
<resultMap id="evaluationFormMap" type="digital.laboratory.platform.reagent.entity.EvaluationForm">
|
||||
<id property="evaluationFormId" column="evaluation_form_id"/>
|
||||
<result property="commentsFromThePurchasingManager" column="comments_from_the_purchasing_manager"/>
|
||||
<result property="commentsFromTheTechnicalDirector" column="comments_from_the_technical_director"/>
|
||||
<result property="contactNumber" column="contact_number"/>
|
||||
<result property="contactPerson" column="contact_person"/>
|
||||
<result property="purchasingManagerId" column="purchasing_manager_id"/>
|
||||
<result property="qualitySupervisorEvaluationComments" column="quality_supervisor_evaluation_comments"/>
|
||||
<result property="qualitySupervisorId" column="quality_supervisor_id"/>
|
||||
<result property="serviceProviderAndSupplierId" column="service_provider_and_supplier_id"/>
|
||||
<result property="technicalDirectorId" column="technical_director_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
|
||||
<result property="supplierInformationId" column="supplier_information_id"/>
|
||||
</resultMap>
|
||||
<resultMap id="evaluationFormMap" type="digital.laboratory.platform.reagent.entity.EvaluationForm">
|
||||
<id property="evaluationFormId" column="evaluation_form_id"/>
|
||||
<result property="commentsFromPrimary" column="comments_from_primary"/>
|
||||
<result property="commentsFromThreeLevel" column="comments_from_three_level"/>
|
||||
<result property="contactNumber" column="contact_number"/>
|
||||
<result property="contactPerson" column="contact_person"/>
|
||||
<result property="primaryUserId" column="primary_user_id"/>
|
||||
<result property="commentsFromSecondary" column="comments_from_secondary"/>
|
||||
<result property="secondaryUserId" column="secondary_user_id"/>
|
||||
<result property="serviceProviderAndSupplierId" column="service_provider_and_supplier_id"/>
|
||||
<result property="threeLevelUserId" column="three_level_user_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="commentsDateFromPrimary" column="comments_date_from_primary"/>
|
||||
<result property="commentsResultFromSecondary" column="comments_result_from_secondary"/>
|
||||
<result property="commentsDateFromSecondary" column="comments_date_from_secondary"/>
|
||||
<result property="commentsResultFromThreeLevel" column="comments_result_from_three_level"/>
|
||||
<result property="commentsDateFromThreeLevel" column="comments_date_from_three_level"/>
|
||||
<result property="supplierBusinessLicense" column="supplier_business_license"/>
|
||||
<result property="supplierPassesQualityAssuranceSystem" column="supplier_passes_quality_assurance_system"/>
|
||||
<result property="supplierProductCertification" column="supplier_product_certification"/>
|
||||
<result property="checkAndCalibrateEfficiencyOfSupplies" column="check_and_calibrate_efficiency_of_supplies"/>
|
||||
<result property="overallSupplierServiceSatisfaction" column="overall_supplier_service_satisfaction"/>
|
||||
<result property="supplierAttitude" column="supplier_attitude"/>
|
||||
<result property="supplierEquipmentAndFacilities" column="supplier_equipment_and_facilities"/>
|
||||
<result property="supplierTechnologyAndManagementCapability"
|
||||
column="supplier_technology_and_management_capability"/>
|
||||
<result property="whetherTheSupplierDeliversOnTime" column="whether_the_supplier_delivers_on_time"/>
|
||||
<result property="supplierInformationId" column="supplier_information_id"/>
|
||||
<result property="status" column="status"/>
|
||||
</resultMap>
|
||||
<resultMap id="evaluationFormVO" type="digital.laboratory.platform.reagent.vo.EvaluationFormVO"
|
||||
extends="evaluationFormMap">
|
||||
<result property="primaryUserName" column="primary_user_name"></result>
|
||||
<result property="secondaryUserName" column="secondary_user_name"></result>
|
||||
<result property="threeLevelUserName" column="three_level_user_name"></result>
|
||||
</resultMap>
|
||||
<select id="getEvaluationForm" resultMap="evaluationFormVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.EvaluationFormVO">
|
||||
SELECT ef.*,
|
||||
(select user.name
|
||||
from dlp_base.sys_user user
|
||||
where user.user_id = ef.primary_user_id)
|
||||
, AS primary_user_name
|
||||
(select user.name
|
||||
from dlp_base.sys_user user
|
||||
where user.user_id = ef.secondary_user_id)
|
||||
, AS primary_user_name
|
||||
(select user.name
|
||||
from dlp_base.sys_user user
|
||||
where user.user_id = ef.three_level_user_id)
|
||||
, AS primary_user_name
|
||||
FROM evaluation_form ef
|
||||
WHERE ef.evaluation_form_id = #{evaluationFormId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<mapper namespace="digital.laboratory.platform.reagent.mapper.ProvideServicesOrSuppliesMapper">
|
||||
|
||||
<resultMap id="provideServicesOrSuppliesMap" type="digital.laboratory.platform.reagent.entity.ProvideServicesOrSupplies">
|
||||
<id property="provideServicesOrSuppliesid" column="provide_services_or_suppliesID"/>
|
||||
<id property="provideServicesOrSuppliesId" column="provide_services_or_supplies_id"/>
|
||||
<result property="reagentConsumableId" column="reagent_consumable_id"/>
|
||||
<result property="evaluationFormId" column="evaluation_form_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
@@ -14,4 +14,17 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="provideServicesOrSuppliesVO" type="digital.laboratory.platform.reagent.vo.ProvideServicesOrSuppliesVO" extends="provideServicesOrSuppliesMap">
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"></result>
|
||||
</resultMap>
|
||||
|
||||
<select id="getProvideServicesOrSuppliesVOList" resultMap="provideServicesOrSuppliesVO" resultType="digital.laboratory.platform.reagent.vo.ProvideServicesOrSuppliesVO">
|
||||
SELECT ps.*,
|
||||
(select rc.name
|
||||
from reagent_consumables rc
|
||||
where rc.reagent_consumable_id = ps.reagent_consumable_id) AS reagent_consumable_name
|
||||
FROM provide_services_or_supplies ps
|
||||
WHERE ps.provide_services_or_suppliesID = #{provideServicesOrSuppliesId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<select id="getPurchaseListDetailsVOList" resultMap="purchaseListDetailsVO" resultType="digital.laboratory.platform.reagent.vo.PurchaseListDetailsVO">
|
||||
SELECT pd.*,
|
||||
(select rc.name from reagent_consumables rc where rc.reagent_consumable_id = pd.reagent_consumable_id)
|
||||
(select rc.name from reagent_consumables rc where rc.reagent_consumable_id = pd.reagent_consumable_id),AS reagent_consumable_name
|
||||
FROM purchase_list_details pd
|
||||
WHERE pd.purchase_list_id = #{purchaseListId}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user