Browse Source

2025-04-29

master
qiezi 9 months ago
parent
commit
88f8bed748
  1. 25
      src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java
  2. 4
      src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java

25
src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java

@ -605,6 +605,31 @@ public class QuotationInformationServiceImpl extends ServiceImpl<QuotationInform
UpdateWrapper<QuotationInformationEntity> updateInformationWrapper = new UpdateWrapper<>();
updateInformationWrapper.eq("site", data.getSite());
updateInformationWrapper.eq("quotation_batch_no", data.getQuotationBatchNo());
// 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数
List<String> quoteList = baseMapper.queryQuoteByQuotationBatchNo(data.getSite(),data.getQuotationBatchNo());
// 查询改询价批次号的询价条数
int count = baseMapper.queryQuotationByQuotationBatchNo(data.getSite(),data.getQuotationBatchNo());
// 不相等即条目不匹配有询价单号未产生报价
if (count != quoteList.size()){
throw new RuntimeException("该询价单的已下达报价明细不全,不能下达");
}
List<QuotationInformationEntity> list = lambdaQuery()
.eq(QuotationInformationEntity::getSite, data.getSite())
.eq(QuotationInformationEntity::getQuotationBatchNo, data.getQuotationBatchNo())
.list();
QuotationInformationEntity entity = list.get(0);
if (Objects.isNull(entity)) {
throw new RuntimeException("询价单不存在");
}
// if (Objects.isNull(entity.getQuotationAmount()) || entity.getQuotationAmount().compareTo(BigDecimal.ZERO) <= 0) {
if (Objects.isNull(entity.getQuotationAmount()) ) {
// throw new RuntimeException("询价金额不能为空或者小于等于0!");
throw new RuntimeException("询价金额不能为空");
}
// 关闭调用OA接口时
if (!dataUrlOa) {
data.setQuotationStatus("审批中");

4
src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java

@ -1158,6 +1158,8 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
public void issueChange(PlmTechnicalSpecificationSheetData data) {
SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
data.setUserName(sysUserEntity.getUsername());
// 修改
updateBMBasicInformation(data);
// 关闭调用OA接口时
if (!dataUrlOa) {
data.setStatus("spz");
@ -1285,6 +1287,8 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
public void submitChange(PlmTechnicalSpecificationSheetData data) {
SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
data.setUserName(sysUserEntity.getUsername());
// 修改
updateBMBasicInformation(data);
// 获取提交基础数据
Map<String, String> baseData = changeManagementService.getSubmitBaseData(data.getSite(), data.getUserName(), data.getCodeNo());
// 4 接口:流程提交接口(同意) / 流程退回接口(驳回)

Loading…
Cancel
Save