Browse Source

Merge branch 'sprint/S3' into release/S3

master
郑贵龙 1 year ago
parent
commit
523b5db0c4
12 changed files with 32 additions and 43 deletions
  1. +1
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/entity/ChatFileEntity.java
  2. +1
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/mapper/ChatFileMapper.xml
  3. +2
    -5
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/repository/ChatFileRepository.java
  4. +2
    -2
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/service/ChatFileService.java
  5. +4
    -4
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/service/impl/ChatFileServiceImpl.java
  6. +2
    -2
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/provider/ChatFileEAIService.java
  7. +3
    -3
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/provider/impl/ChatFileEAIServiceImpl.java
  8. +3
    -3
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/service/ChatFileCreateEAIService.java
  9. +3
    -7
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/service/ChatFileGetEAIService.java
  10. +3
    -3
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/service/ChatFileUpdateEAIService.java
  11. +1
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/service/ChatFileUtil.java
  12. +7
    -11
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/production/ProductionCreateEAIService.java

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/infra/entity/ChatFileEntity.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/entity/ChatFileEntity.java View File

@ -1,4 +1,4 @@
package com.digiwin.athena.app.chatFile.infra.entity;
package com.digiwin.athena.app.kcfr.infra.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/infra/mapper/ChatFileMapper.xml → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/mapper/ChatFileMapper.xml View File

@ -5,7 +5,7 @@
<mapper namespace="com.digiwin.athena.app.chatFile.infra.repository.ChatFileRepository">
<update id="updateBatch" parameterType="com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity">
<update id="updateBatch" parameterType="com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity">
UPDATE cim_chat_file
<set>
`question` = #{question},

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/infra/repository/ChatFileRepository.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/repository/ChatFileRepository.java View File

@ -1,10 +1,7 @@
package com.digiwin.athena.app.chatFile.infra.repository;
package com.digiwin.athena.app.kcfr.infra.repository;
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity;
import com.digiwin.athena.opt.persistence.repository.BaseRepository;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @auther: zhenggl

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/infra/service/ChatFileService.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/service/ChatFileService.java View File

@ -1,6 +1,6 @@
package com.digiwin.athena.app.chatFile.infra.service;
package com.digiwin.athena.app.kcfr.infra.service;
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity;
import com.digiwin.athena.opt.persistence.service.IBaseService;
/**

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/infra/service/impl/ChatFileServiceImpl.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/infra/service/impl/ChatFileServiceImpl.java View File

@ -1,8 +1,8 @@
package com.digiwin.athena.app.chatFile.infra.service.impl;
package com.digiwin.athena.app.kcfr.infra.service.impl;
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.chatFile.infra.repository.ChatFileRepository;
import com.digiwin.athena.app.chatFile.infra.service.ChatFileService;
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.kcfr.infra.repository.ChatFileRepository;
import com.digiwin.athena.app.kcfr.infra.service.ChatFileService;
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService;
import org.springframework.stereotype.Service;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/provider/ChatFileEAIService.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/provider/ChatFileEAIService.java View File

@ -1,9 +1,9 @@
package com.digiwin.athena.app.chatFile.provider;
package com.digiwin.athena.app.kcfr.provider;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.app.service.DWService;
import com.digiwin.app.service.eai.EAIService;
import com.digiwin.athena.app.chatFile.service.chatFile.ChatFileUtil;
import com.digiwin.athena.app.kcfr.service.ChatFileUtil;
import java.util.Map;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/provider/impl/ChatFileEAIServiceImpl.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/provider/impl/ChatFileEAIServiceImpl.java View File

@ -1,8 +1,8 @@
package com.digiwin.athena.app.chatFile.provider.impl;
package com.digiwin.athena.app.kcfr.provider.impl;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.chatFile.provider.ChatFileEAIService;
import com.digiwin.athena.app.chatFile.service.chatFile.ChatFileUtil;
import com.digiwin.athena.app.kcfr.provider.ChatFileEAIService;
import com.digiwin.athena.app.kcfr.service.ChatFileUtil;
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext;
import javax.annotation.Resource;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileCreateEAIService.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/service/ChatFileCreateEAIService.java View File

@ -1,10 +1,10 @@
package com.digiwin.athena.app.chatFile.service.chatFile;
package com.digiwin.athena.app.kcfr.service;
import com.alibaba.fastjson.TypeReference;
import com.digiwin.app.container.exceptions.DWBusinessException;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.chatFile.infra.service.ChatFileService;
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.kcfr.infra.service.ChatFileService;
import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import lombok.extern.log4j.Log4j2;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileGetEAIService.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/service/ChatFileGetEAIService.java View File

@ -1,23 +1,19 @@
package com.digiwin.athena.app.chatFile.service.chatFile;
package com.digiwin.athena.app.kcfr.service;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.digiwin.app.container.exceptions.DWBusinessException;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.chatFile.infra.service.ChatFileService;
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.kcfr.infra.service.ChatFileService;
import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* @auther: zhenggl

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileUpdateEAIService.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/service/ChatFileUpdateEAIService.java View File

@ -1,9 +1,9 @@
package com.digiwin.athena.app.chatFile.service.chatFile;
package com.digiwin.athena.app.kcfr.service;
import com.alibaba.fastjson.TypeReference;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.chatFile.infra.repository.ChatFileRepository;
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity;
import com.digiwin.athena.app.kcfr.infra.repository.ChatFileRepository;
import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import lombok.extern.log4j.Log4j2;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileUtil.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/kcfr/service/ChatFileUtil.java View File

@ -1,4 +1,4 @@
package com.digiwin.athena.app.chatFile.service.chatFile;
package com.digiwin.athena.app.kcfr.service;
/**
* @auther: zhenggl

+ 7
- 11
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/production/ProductionCreateEAIService.java View File

@ -11,10 +11,7 @@ import com.digiwin.athena.app.ptc.infra.service.ProductionDetailsService;
import com.digiwin.athena.app.ptc.infra.service.ReceivablesDetailService;
import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import com.digiwin.athena.opt.common.generator.SnowflakeWorker;
import com.digiwin.athena.opt.common.util.RedisUtil;
import org.apache.commons.lang.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -34,8 +31,6 @@ public class ProductionCreateEAIService extends AbsEAIService {
@Resource
private ReceivablesDetailService receivablesDetailService;
@Autowired
private RedisUtil redisUtil;
@Override
@ -68,8 +63,9 @@ public class ProductionCreateEAIService extends AbsEAIService {
Random random = new Random();
//默认赋值
Integer batchNo = 1;
for (ProductionDetailsEntity productionDetailsEntity : productionDetailsEntities) {
int randomNumber = random.nextInt(2)+1;
int randomNumber = random.nextInt(3);
productionDetailsEntity.setFactoryNo(this.list.get(randomNumber).getFactoryNo());
productionDetailsEntity.setFactoryName(this.list.get(randomNumber).getFactoryName());
productionDetailsEntity.setProductionManagementPerson(this.list.get(randomNumber).getProductionManagementPerson());
@ -77,10 +73,11 @@ public class ProductionCreateEAIService extends AbsEAIService {
productionDetailsEntity.setProduceBoss("23467345221");
productionDetailsEntity.setProductionStatus(TabStatusEnums.PENDING.getValue().toString());
productionDetailsEntity.setNature(String.valueOf(randomNumber));
String batchNo = SnowflakeWorker.nextId().toString();
productionDetailsEntity.setBatchNo("MMDD-"+batchNo);
productionDetailsEntity.setBatchNo("MMDD-000"+batchNo);
productionDetailsEntity.setUnit("pcs");
batchNo = batchNo+1;
//预计产量赋值
if (CollectionUtils.isNotEmpty(list)) {
if (CollectionUtils.isNotEmpty(receivablesDetailEntities)) {
for (ReceivablesDetailEntity receivablesDetailEntity : receivablesDetailEntities) {
productionDetailsEntity.setExpectedQuantity(receivablesDetailEntity.getQuantity());
//取应收日期前后5天
@ -90,11 +87,10 @@ public class ProductionCreateEAIService extends AbsEAIService {
productionDetailsEntity.setSkuCode(receivablesDetailEntity.getSkuCode());
productionDetailsEntity.setSkuName(receivablesDetailEntity.getSkuName());
productionDetailsEntity.setSkuSpec(receivablesDetailEntity.getSkuSpec());
productionDetailsEntity.setUnit("待定");
}
}
}
productionDetailsService.saveBatch(productionDetailsEntities);
return buildOK();
}


Loading…
Cancel
Save