parent
abc1f657f9
commit
300f456e97
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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; |
||||
|
||||
|
||||
} |
@ -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; |
||||
|
||||
|
||||
} |
@ -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> { |
||||
|
||||
} |
@ -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> { |
||||
|
||||
} |
@ -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; |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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; |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue