Browse Source

Merge remote-tracking branch 'origin/dev' into dev

newStockUp
pref_mail@163.com 1 year ago
parent
commit
4536e2e199
  1. 4
      blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/ProcessorProcessingStatusStatusConstant.java
  2. 5
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersaleSurveyRecordEntity.java
  3. 2
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesCompletionRecordEntity.java
  4. 5
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesPersonResponsibleEntity.java
  5. 3
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java
  6. 13
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IOrderClient.java
  7. 2
      blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/entity/WarehouseMappingDataEntity.java
  8. 3
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesCompletionRecordController.java
  9. 57
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  10. 21
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  11. 11
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java
  12. 127
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  13. 23
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OrderClient.java
  14. 10
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.java
  15. 94
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml
  16. 10
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IOrderService.java
  17. 23
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/OrderServiceImpl.java
  18. 7
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java
  19. 2
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java
  20. 4
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/AsyncDataServiceImpl.java
  21. 6
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

4
blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/ProcessorProcessingStatusStatusConstant.java

@ -3,7 +3,9 @@ package org.springblade.common.constant.aftersales;
public enum ProcessorProcessingStatusStatusConstant {
daichuli("待处理","1"),
yichuli("已处理","2"),
yichaoshi("已超时","3");
yichaoshi("已超时","3"),
tijiaofang("处理结果提交方","4")
;
ProcessorProcessingStatusStatusConstant(String name, String value) {
this.name = name;

5
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersaleSurveyRecordEntity.java

@ -123,6 +123,9 @@ public class AftersaleSurveyRecordEntity extends TenantEntity {
@ApiModelProperty(value = "图片路径")
private String pictureUrl;
/**
* 处理方ID
*/
private Long processorId;
}

2
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesCompletionRecordEntity.java

@ -78,7 +78,7 @@ public class AftersalesCompletionRecordEntity extends TenantEntity {
@ApiModelProperty(value = "说明")
private String explain;
/**
* 财务是否处理
* 财务是否处理 1是 2
*/
@ApiModelProperty(value = "财务是否处理")
private String accounting;

5
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesPersonResponsibleEntity.java

@ -96,6 +96,11 @@ public class AftersalesPersonResponsibleEntity extends TenantEntity {
*/
@ApiModelProperty(value = "责任方名称")
private String businessName;
/**
* 说明
*/
@ApiModelProperty(value = "说明")
private String description;
/**
* 责任方ID
*/

3
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java

@ -16,6 +16,7 @@
*/
package com.logpm.aftersales.vo;
import com.logpm.aftersales.entity.AftersaleSurveyRecordEntity;
import com.logpm.aftersales.entity.AftersalesAbnormalPackageEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import lombok.Data;
@ -71,6 +72,6 @@ public class AftersalesWorkOrderVO extends AftersalesWorkOrderEntity {
*/
private Long processorId;
private List<AftersaleSurveyRecordEntity> surveyRecordEntities;
}

13
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IOrderClient.java

@ -44,10 +44,10 @@ public interface IOrderClient {
List<String> findOrderListByParam(@RequestParam String param);
@GetMapping(API_PREFIX + "/getTotalCountBy")
Integer getTotalCountBy(@RequestParam String param, @RequestParam Integer oldWarehouseId);
Integer getTotalCountBy(@RequestParam String param, @RequestParam Integer oldWarehouseId, @RequestParam String tableName);
@GetMapping(API_PREFIX + "/findOrderCodeListByPage")
List<String> findOrderCodeListByPage(@RequestParam String param, @RequestParam Integer oldWarehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize);
List<String> findOrderCodeListByPage(@RequestParam String param, @RequestParam Integer oldWarehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize, @RequestParam String tableName);
@GetMapping(API_PREFIX + "/getGoodsTypeByOrderCode")
Integer getGoodsTypeByOrderCode(@RequestParam String orderCode,@RequestParam Integer oldWarehouseId);
@ -57,4 +57,13 @@ public interface IOrderClient {
@GetMapping(API_PREFIX + "/findOrderCodeListByZero")
List<String> findOrderCodeListByZero(@RequestParam String param, @RequestParam Integer oldWarehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize);
@GetMapping(API_PREFIX + "/getTotalCountByInventory")
Integer getTotalCountByInventory(@RequestParam String param, @RequestParam Integer oldWarehouseId);
@GetMapping(API_PREFIX + "/findOrderCodeListByPageWithInventoryId")
List<String> findOrderCodeListByPageWithInventoryId(@RequestParam String param, @RequestParam Integer oldWarehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize);
@GetMapping(API_PREFIX + "/updateStatusWithTableName")
void updateStatusWithTableName(@RequestParam int isUpdate, @RequestParam String orderCode, @RequestParam String tableName);
}

2
blade-service-api/logpm-patch-api/src/main/java/com/logpm/patch/entity/WarehouseMappingDataEntity.java

@ -23,4 +23,6 @@ public class WarehouseMappingDataEntity {
private Integer inventoryId;
private String tableName;
}

3
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesCompletionRecordController.java

@ -23,6 +23,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -53,6 +54,7 @@ import javax.servlet.http.HttpServletResponse;
*/
@RestController
@AllArgsConstructor
@Slf4j
@RequestMapping("/aftersalesCompletionRecord")
@Api(value = "异常工单完结处理结果赔款方", tags = "异常工单完结处理结果赔款方接口")
public class AftersalesCompletionRecordController extends BladeController {
@ -108,6 +110,7 @@ public class AftersalesCompletionRecordController extends BladeController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入aftersalesCompletionRecord")
public R update(@Valid @RequestBody AftersalesCompletionRecordEntity aftersalesCompletionRecord) {
log.info("赔货方信息修改》》》》{}",aftersalesCompletionRecord);
return R.status(aftersalesCompletionRecordService.updateById(aftersalesCompletionRecord));
}

57
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -97,11 +97,11 @@ public class AftersalesWorkOrderController extends BladeController {
}
/**
* 客服异常工单 查询异常完整数据集合
* 客服异常工单 查询异常工单完整数据集合
*/
@GetMapping("/listOwn")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询异常完整数据集合", notes = "传入aftersalesWorkOrder")
@ApiOperation(value = "查询异常工单完整数据集合", notes = "传入aftersalesWorkOrder")
public R<IPage<AftersalesWorkOrderVO>> getListOwn(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, Query query) {
IPage<AftersalesWorkOrderEntity> pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query));
@ -109,7 +109,25 @@ public class AftersalesWorkOrderController extends BladeController {
}
/**
* 客服异常工单 查询处理超时的数据
* 客服异常工单 提交异常工单处理结果
*/
@PostMapping("/addProcessingResults")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "营业部提交异常工单处理结果", notes = "传入aftersalesWorkOrder")
public R addProcessingResults(@RequestBody AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
log.info("营业部提交异常工单处理结果》》》{}",aftersalesWorkOrderDTO);
if(ObjectUtils.isNull( aftersalesWorkOrderDTO.getId())){
throw new ServiceException("异常工单ID不能为空");
}
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getAftersalesProcessingResultsDTO())){
throw new ServiceException("异常工单处理结果不能为空");
}
return R.status(aftersalesWorkOrderService.addProcessingResults(aftersalesWorkOrderDTO));
}
/**
* 客服异常工单 查询处理超时的数据 待处理
*/
@GetMapping("/isItTimeout")
@ApiOperationSupport(order = 2)
@ -151,6 +169,39 @@ public class AftersalesWorkOrderController extends BladeController {
return R.status(aftersalesWorkOrderService.savaSurveyRecord(aftersalesWorkOrderDTO));
}
/**
* 工单调查记录表 查询调查记录
*/
@GetMapping("/getSurveyRecord")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "查询调查记录", notes = "传入aftersaleSurveyRecord")
public R getSurveyRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
log.info("查询调查记录》》》{}", aftersalesWorkOrderDTO);
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getId())){
throw new ServiceException("异常工单ID不能为空");
}
AftersalesWorkOrderVO list = aftersalesWorkOrderService.getSurveyRecord(aftersalesWorkOrderDTO);
return R.data(list);
}
/**
* 工单调查记录表 查询全部跟踪记录
*/
@GetMapping("/getTrackRecord")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "查询全部跟踪记录", notes = "传入aftersaleSurveyRecord")
public R getTrackRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
log.info("查询全部跟踪记录》》》{}", aftersalesWorkOrderDTO);
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getId())){
throw new ServiceException("异常工单ID不能为空");
}
AftersalesWorkOrderVO list = aftersalesWorkOrderService.getTrackRecord(aftersalesWorkOrderDTO);
return R.data(list);
}
/**
* 客服异常工单 查询营业部责任人人员信息

21
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java

@ -186,4 +186,25 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
* @return
*/
boolean savaSurveyRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO);
/**
* 营业部提交异常工单处理结果
* @param aftersalesWorkOrderDTO
* @return
*/
boolean addProcessingResults(AftersalesWorkOrderDTO aftersalesWorkOrderDTO);
/**
* 查询调查经过
* @param aftersalesWorkOrderDTO
* @return
*/
AftersalesWorkOrderVO getSurveyRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO);
/**
* 查询全部跟踪记录
* @param aftersalesWorkOrderDTO
* @return
*/
AftersalesWorkOrderVO getTrackRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO);
}

11
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java

@ -21,7 +21,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.aftersales.dto.AftersalesProcessingResultsDTO;
import com.logpm.aftersales.entity.AftersalesProcessingMoneyEntity;
import com.logpm.aftersales.entity.AftersalesProcessingResultsEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.service.IAftersalesProcessingMoneyService;
import com.logpm.aftersales.service.IAftersalesProcessorService;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
import com.logpm.aftersales.vo.AftersalesProcessingMoneyVO;
import com.logpm.aftersales.vo.AftersalesProcessingResultsVO;
import com.logpm.aftersales.excel.AftersalesProcessingResultsExcel;
@ -29,9 +32,13 @@ import com.logpm.aftersales.mapper.AftersalesProcessingResultsMapper;
import com.logpm.aftersales.service.IAftersalesProcessingResultsService;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.system.cache.DictBizCache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -74,6 +81,10 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
*/
@Override
public boolean ownSaveOrUpdate(AftersalesProcessingResultsDTO aftersalesProcessingResults) {
if(ObjectUtil.isNull( aftersalesProcessingResults.getWorkOrderId())){
throw new ServiceException("异常工单ID不能为空");
}
if(ObjectUtil.isNull(aftersalesProcessingResults.getId())){
//添加
baseMapper.insert(aftersalesProcessingResults);

127
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -42,10 +42,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.aftersales.ProcessorProcessingStatusStatusConstant;
import org.springblade.common.constant.aftersales.ProcessorTypesOfStatusConstant;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.common.constant.aftersales.WorkOrderTypesOfStatusConstant;
import org.springblade.common.constant.aftersales.*;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.BladeUser;
@ -323,7 +320,11 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
* @return
*/
private AftersaleSurveyRecordDTO changName(AftersalesWorkOrderDTO aftersalesWorkOrder, BladeUser user) {
AftersaleSurveyRecordDTO surveyRecordDTO = aftersalesWorkOrder.getSurveyRecordDTO();
AftersaleSurveyRecordDTO surveyRecordDTO = new AftersaleSurveyRecordDTO();
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getSurveyRecordDTO())){
surveyRecordDTO = aftersalesWorkOrder.getSurveyRecordDTO();
}
surveyRecordDTO.setAddPeople(user.getUserName());
R<List<String>> deptNames = sysClient.getDeptNames(user.getDeptId());
if(ObjectUtils.isNotNull(deptNames)){
@ -830,7 +831,11 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if(!workOrderEntity.getWorkOrderStatus().equals(WorkOrderStatusConstant.zhongchaizhong.getValue())){
throw new ServiceException("包含不是仲裁的订单数据!无法强制完结!");
}
//添加处理结果
//查询异常工单完结接口
AftersalesWorkOrderEntity byId = baseMapper.selectById(l);
if(byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yichuli.getValue())){
throw new ServiceException("当前异常工单已处理!");
}
AftersalesProcessingResultsDTO aftersalesProcessingResultsDTO = aftersalesWorkOrder.getAftersalesProcessingResultsDTO();
aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResultsDTO);
//添加完结数据
@ -902,6 +907,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}else{
//不存在 添加处理方信息
AftersalesProcessorEntity processor = addProcessor(aftersalesWorkOrderDTO, myCurrentWarehouse, i);
processor.setConditions(ProcessorConditionsStatusConstant.xinzeng.getValue());
processorEntityList.add(processor);
}
//添加指定处理结果
@ -921,6 +927,102 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
return true;
}
/**
* 营业部提交异常工单处理结果
* @param aftersalesWorkOrderDTO
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public boolean addProcessingResults(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BladeUser user = AuthUtil.getUser();
//查询异常工单完结接口
AftersalesWorkOrderEntity byId = baseMapper.selectById(aftersalesWorkOrderDTO.getId());
if(byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yichuli.getValue())){
throw new ServiceException("当前异常工单已处理!");
}
//添加处理结果
AftersalesProcessingResultsDTO aftersalesProcessingResultsDTO = aftersalesWorkOrderDTO.getAftersalesProcessingResultsDTO();
aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResultsDTO);
//修改异常工单处理信息!
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(aftersalesWorkOrderDTO.getId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue());
baseMapper.updateById(workOrderEntity);
//修改处理方提交结果
LambdaUpdateWrapper<AftersalesProcessorEntity> q = new LambdaUpdateWrapper<>();
q.eq(AftersalesProcessorEntity::getBusinessName,myCurrentWarehouse.getName());
q.eq(AftersalesProcessorEntity::getBusinessId,myCurrentWarehouse.getId());
q.eq(AftersalesProcessorEntity::getTypesOf,ProcessorTypesOfStatusConstant.chulifang.getValue());
q.set(AftersalesProcessorEntity::getProcessingStatus,ProcessorProcessingStatusStatusConstant.tijiaofang.getValue());
aftersalesProcessorService.update(q);
//添加处理结果
// AftersaleSurveyRecordDTO aftersaleSurveyRecordDTO = new AftersaleSurveyRecordDTO();
AftersaleSurveyRecordDTO aftersaleSurveyRecordDTO = changName(aftersalesWorkOrderDTO, user);
aftersaleSurveyRecordDTO.setTypesOf("1");
// aftersaleSurveyRecordDTO.setContent();
aftersaleSurveyRecordDTO.setDifference("3");
aftersaleSurveyRecordDTO.setWorkOrderId(aftersalesWorkOrderDTO.getId());
aftersaleSurveyRecordDTO.setFollowWarehouseId(myCurrentWarehouse.getId());
aftersaleSurveyRecordDTO.setFollowWarehouseName(myCurrentWarehouse.getName());
aftersaleSurveyRecordService.saveOrUpdateOwn(aftersaleSurveyRecordDTO);
return true;
}
/**
* 查询调查数据
* @param aftersalesWorkOrderDTO
* @return
*/
@Override
public AftersalesWorkOrderVO getSurveyRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNull(myCurrentWarehouse)){
throw new ServiceException("请选择仓库信息!!");
}
//查询是否必须回复
AftersalesProcessorEntity one = aftersalesProcessorService.getOne(Wrappers.<AftersalesProcessorEntity>query().lambda().
eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId())
.eq(AftersalesProcessorEntity::getBusinessId, myCurrentWarehouse.getId())
.eq(AftersalesProcessorEntity::getBusinessName, myCurrentWarehouse.getName())
.eq(AftersalesProcessorEntity::getTypesOf, ProcessorTypesOfStatusConstant.chulifang.getValue())
);
//查询调查数据
List<AftersaleSurveyRecordEntity> list = aftersaleSurveyRecordService.list(Wrappers.<AftersaleSurveyRecordEntity>query().lambda()
.eq(AftersaleSurveyRecordEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId())
.eq(AftersaleSurveyRecordEntity::getDifference, "1")
);
AftersalesWorkOrderVO aftersalesWorkOrderVO = new AftersalesWorkOrderVO();
List<AftersalesProcessorVO> list1 = new ArrayList<>();
if(ObjectUtils.isNotNull(one)){
AftersalesProcessorVO processorVO = new AftersalesProcessorVO();
BeanUtil.copyProperties(one,processorVO);
list1.add(processorVO);
}
aftersalesWorkOrderVO.setProcessorVOList(list1);
aftersalesWorkOrderVO.setSurveyRecordEntities(list);
return aftersalesWorkOrderVO;
}
/**
* 查询全部跟踪记录
* @param aftersalesWorkOrderDTO
* @return
*/
@Override
public AftersalesWorkOrderVO getTrackRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
List<AftersaleSurveyRecordEntity> list = aftersaleSurveyRecordService.list(Wrappers.<AftersaleSurveyRecordEntity>query().lambda()
.eq(AftersaleSurveyRecordEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId())
);
AftersalesWorkOrderVO workOrderVO = new AftersalesWorkOrderVO();
workOrderVO.setSurveyRecordEntities(list);
return workOrderVO;
}
/**
* 添加处理处理方信息
* @param aftersalesWorkOrderDTO
@ -950,9 +1052,16 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
surveyRecordDTO.setContent(aftersalesWorkOrderDTO.getSurveyRecordDTO().getContent());//内容
surveyRecordDTO.setTypesOf("1");
surveyRecordDTO.setDifference("2");
surveyRecordDTO.setFollowWarehouseName(i.getBusinessName());
surveyRecordDTO.setFollowWarehouseId(i.getBusinessId());
return aftersaleSurveyRecordService.saveOrUpdateOwn(surveyRecordDTO);
surveyRecordDTO.setCreateUser(user.getUserId());
surveyRecordDTO.setCreateDept(Long.valueOf(user.getDeptId()));
surveyRecordDTO.setCreateTime(new Date());
surveyRecordDTO.setStatus(1);
surveyRecordDTO.setIsDeleted(0);
if(ObjectUtil.isNotNull(i)){
surveyRecordDTO.setFollowWarehouseName(i.getBusinessName());
surveyRecordDTO.setFollowWarehouseId(i.getBusinessId());
}
return aftersaleSurveyRecordService.saveOrUpdateOwn(surveyRecordDTO);
}
/**

23
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OrderClient.java

@ -48,13 +48,13 @@ public class OrderClient implements IOrderClient {
}
@Override
public Integer getTotalCountBy(String param, Integer oldWarehouseId) {
return orderService.getTotalCountBy(param,oldWarehouseId);
public Integer getTotalCountBy(String param, Integer oldWarehouseId,String tableName) {
return orderService.getTotalCountBy(param,oldWarehouseId,tableName);
}
@Override
public List<String> findOrderCodeListByPage(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) {
return orderService.findOrderCodeListByPage(param,oldWarehouseId,pageNum,pageSize);
public List<String> findOrderCodeListByPage(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize,String tableName) {
return orderService.findOrderCodeListByPage(param,oldWarehouseId,pageNum,pageSize,tableName);
}
@Override
@ -71,4 +71,19 @@ public class OrderClient implements IOrderClient {
public List<String> findOrderCodeListByZero(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) {
return orderService.findOrderCodeListByZero(param,oldWarehouseId,pageNum,pageSize);
}
@Override
public Integer getTotalCountByInventory(String param, Integer oldWarehouseId) {
return orderService.getTotalCountByInventory(param,oldWarehouseId);
}
@Override
public List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) {
return orderService.findOrderCodeListByPageWithInventoryId(param,oldWarehouseId,pageNum,pageSize);
}
@Override
public void updateStatusWithTableName(int isUpdate, String orderCode, String tableName) {
orderService.updateStatusWithTableName(isUpdate,orderCode,tableName);
}
}

10
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.java

@ -30,13 +30,19 @@ import java.util.List;
*/
public interface OrderMapper extends BaseMapper<OrderEntity> {
Integer getTotalCountBy(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId);
Integer getTotalCountBy(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId, @Param("tableName") String tableName);
List<String> findOrderCodeListByPage(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
List<String> findOrderCodeListByPage(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("tableName") String tableName);
Integer getGoodsTypeByOrderCode(@Param("orderCode") String orderCode,@Param("oldWarehouseId") Integer oldWarehouseId);
Integer getTotalCountByZero(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId);
List<String> findOrderCodeListByZero(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
Integer getTotalCountByInventory(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId);
List<String> findOrderCodeListByPageWithInventoryId(@Param("param") String param, @Param("oldWarehouseId") Integer oldWarehouseId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
void updateStatusWithTableName(@Param("isUpdate") int isUpdate, @Param("orderCode") String orderCode, @Param("tableName") String tableName);
}

94
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/OrderMapper.xml

@ -4,29 +4,80 @@
<select id="getTotalCountBy" resultType="Integer">
select count(t.orderSelfNum)
from ${tableName} `o`
left join (SELECT
`i`.`is_opai`,
ORDER.serviceNum service_num,
i.is_opai opai,
`i`.`latest_in_time`,
`i`.`total`,
i.STATUS AS statuses,
`i`.`orderSelfNum`,
i.create_time AS invoice_time,
`i`.`status`,
`i`.`in_num`,
`i`.`delive_num`,
`i`.`out_num`,
`i`.`sorting`,
`i`.`sign_num`,
`i`.`trans_num`,
`i`.`update_time`,
`i`.`administrators_id`,
`i`.`warehouse_id`,
`i`.`create_time`,
`i`.`finish_time`,
`i`.`type`,
`order`.`id`,
`order`.`number`,
`order`.`servicenum`,
`order`.`location_id`,
`order`.`on_shelf_type`,
`order`.`source`,
`order`.`emergency`,
`order`.`selfnumber`,
`i`.`delive_total`,
`order`.`contact`,
`order`.`phone`,
`order`.`address`,
`order`.`door`,
`order`.`payment`,
`i`.`delives_num`
FROM `ht_order_count` `i`
INNER JOIN `ht_order` `order` ON `order`.`selfnumber` = `i`.`orderSelfNum`
WHERE
`i`.`status` &lt;&gt; 11
AND `i`.`delete_time` = '0'
AND `i`.`goods_type` = '1'
AND ( ( `i`.`in_num` + `i`.`delives_num` ) > 0 )
and `i`.warehouse_id = #{oldWarehouseId}
<if test="param != null and param != ''">
AND `i`.`orderSelfNum` = #{param}
</if>
ORDER BY
`i`.`update_time` DESC) t on `o`.order_code = t.orderSelfNum
</select>
<select id="getTotalCountByInventory" resultType="int">
SELECT
count(`i`.`orderSelfNum`)
FROM
`ht_order_count` `i`
FROM `ht_order_count` `i`
INNER JOIN `ht_order` `order` ON `order`.`selfnumber` = `i`.`orderSelfNum`
WHERE
`i`.`status` &lt;&gt; 11
and `i`.`history_type` = 0
AND `i`.`delete_time` = '0'
AND ( ( `i`.`in_num` + `i`.`delives_num` ) > 0 )
AND `i`.`goods_type` = '1'
AND `i`.warehouse_id = #{oldWarehouseId}
AND ( ( `i`.`in_num` + `i`.`delives_num` ) > 0 )
and `i`.warehouse_id = #{oldWarehouseId}
<if test="param != null and param != ''">
AND `i`.`orderSelfNum` = #{param}
</if>
ORDER BY
`i`.`update_time` DESC
</select>
<select id="findOrderCodeListByPage" resultType="java.lang.String">
<select id="findOrderCodeListByPageWithInventoryId" resultType="java.lang.String">
SELECT
`i`.`orderSelfNum`
FROM
@ -47,6 +98,27 @@
LIMIT #{pageNum},#{pageSize}
</select>
<select id="findOrderCodeListByPage" resultType="java.lang.String">
select t.orderSelfNum
from ${tableName} `o`
left join (SELECT
`i`.`orderSelfNum`
FROM `ht_order_count` `i`
INNER JOIN `ht_order` `order` ON `order`.`selfnumber` = `i`.`orderSelfNum`
WHERE
`i`.`status` &lt;&gt; 11
AND `i`.`delete_time` = '0'
AND `i`.`goods_type` = '1'
AND ( ( `i`.`in_num` + `i`.`delives_num` ) > 0 )
and `i`.warehouse_id = #{oldWarehouseId}
<if test="param != null and param != ''">
AND `i`.`orderSelfNum` = #{param}
</if>
ORDER BY
`i`.`id` DESC) t on `o`.order_code = t.orderSelfNum
LIMIT #{pageNum},#{pageSize}
</select>
<select id="getGoodsTypeByOrderCode" resultType="java.lang.Integer">
select goods_type
from `ht_order_count` `i`
@ -106,4 +178,10 @@
LIMIT #{pageNum},#{pageSize}
</select>
<update id="updateStatusWithTableName">
update ${tableName}
set is_update = #{isUpdate}
where order_code = #{orderCode}
</update>
</mapper>

10
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IOrderService.java

@ -10,13 +10,19 @@ public interface IOrderService {
List<String> findOrderListByParam(String param);
Integer getTotalCountBy(String param, Integer oldWarehouseId);
Integer getTotalCountBy(String param, Integer oldWarehouseId,String tableName);
List<String> findOrderCodeListByPage(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize);
List<String> findOrderCodeListByPage(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize,String tableName);
Integer getGoodsTypeByOrderCode(String orderCode,Integer oldWarehouseId);
Integer getTotalCountByZero(String param, Integer oldWarehouseId);
List<String> findOrderCodeListByZero(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize);
Integer getTotalCountByInventory(String param, Integer oldWarehouseId);
List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize);
void updateStatusWithTableName(int isUpdate, String orderCode, String tableName);
}

23
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/OrderServiceImpl.java

@ -35,13 +35,13 @@ public class OrderServiceImpl implements IOrderService {
}
@Override
public Integer getTotalCountBy(String param, Integer oldWarehouseId) {
return orderMapper.getTotalCountBy(param,oldWarehouseId);
public Integer getTotalCountBy(String param, Integer oldWarehouseId,String tableName) {
return orderMapper.getTotalCountBy(param,oldWarehouseId,tableName);
}
@Override
public List<String> findOrderCodeListByPage(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) {
return orderMapper.findOrderCodeListByPage(param,oldWarehouseId,pageNum*pageSize,pageSize);
public List<String> findOrderCodeListByPage(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize,String tableName) {
return orderMapper.findOrderCodeListByPage(param,oldWarehouseId,pageNum*pageSize,pageSize,tableName);
}
@Override
@ -58,4 +58,19 @@ public class OrderServiceImpl implements IOrderService {
public List<String> findOrderCodeListByZero(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) {
return orderMapper.findOrderCodeListByZero(param,oldWarehouseId,pageNum*pageSize,pageSize);
}
@Override
public Integer getTotalCountByInventory(String param, Integer oldWarehouseId) {
return orderMapper.getTotalCountByInventory(param,oldWarehouseId);
}
@Override
public List<String> findOrderCodeListByPageWithInventoryId(String param, Integer oldWarehouseId, Integer pageNum, Integer pageSize) {
return orderMapper.findOrderCodeListByPageWithInventoryId(param,oldWarehouseId,pageNum,pageSize);
}
@Override
public void updateStatusWithTableName(int isUpdate, String orderCode, String tableName) {
orderMapper.updateStatusWithTableName(isUpdate,orderCode,tableName);
}
}

7
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java

@ -78,6 +78,7 @@ public class SyncOrderInfoToPlatform {
for (WarehouseMappingDataEntity mappingDataEntity:warehouseMappingDataEntityList){
Integer oldWarehouseId = mappingDataEntity.getOldWarehouseId();//老系统仓库id
Long newWarehouseId = mappingDataEntity.getNewWarehouseId();//新系统仓库id
String tableName = mappingDataEntity.getTableName();
//查询新系统是否已有仓库信息
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(newWarehouseId);
@ -100,7 +101,7 @@ public class SyncOrderInfoToPlatform {
currentPage = one.getCurrentPage();
}else{
//查询本次同步一共多少的个订单
Integer totalNum = orderClient.getTotalCountBy(param,oldWarehouseId);
Integer totalNum = orderClient.getTotalCountBy(param,oldWarehouseId,tableName);
if(totalNum == 0){
log.info("################syncZeroOrderInfo: 暂无需要执行的数据");
return ReturnT.SUCCESS;
@ -130,9 +131,9 @@ public class SyncOrderInfoToPlatform {
for (int j = currentPage; j < totalPage; j++) {
log.info("##################syncOrderInfo: 当前同步的第{}页的数据",j+1);
try{
List<String> orderCodeList = orderClient.findOrderCodeListByPage(param,oldWarehouseId,j,pageSize);
List<String> orderCodeList = orderClient.findOrderCodeListByPage(param,oldWarehouseId,j,pageSize,tableName);
syncOrderInfoService.handleData(orderCodeList,oldWarehouseId,newWarehouseId);
syncOrderInfoService.handleData(orderCodeList,oldWarehouseId,newWarehouseId,tableName);
log.info("################syncOrderInfo: 同步成功{}个订单",orderCodeList.size());
one.setCurrentPage(j+1);

2
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java

@ -3,7 +3,7 @@ package com.logpm.patch.service;
import java.util.List;
public interface ISyncOrderInfoService {
void handleData(List<String> orderCodeList,Integer oldWarehouseId,Long newWarehouseId);
void handleData(List<String> orderCodeList,Integer oldWarehouseId,Long newWarehouseId,String tableName);
void handleDataZero(List<String> orderCodeList, Integer oldWarehouseId, Long newWarehouseId);

4
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/AsyncDataServiceImpl.java

@ -70,7 +70,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
currentPage = one.getCurrentPage();
}else{
//查询本次同步一共多少的个订单
Integer totalNum = orderClient.getTotalCountBy("",oldWarehouseId);
Integer totalNum = orderClient.getTotalCountByInventory("",oldWarehouseId);
if(totalNum == 0){
log.info("################syncOrderInfo: 暂无需要执行的数据");
throw new CustomerException(403,"暂无需要执行的数据");
@ -104,7 +104,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
for (int j = currentPage; j < totalPage; j++) {
log.info("##################syncOrderInfo: 当前同步的第{}页的数据",j+1);
try{
List<String> orderCodeList = orderClient.findOrderCodeListByPage("",oldWarehouseId,j,pageSize);
List<String> orderCodeList = orderClient.findOrderCodeListByPageWithInventoryId("",oldWarehouseId,j,pageSize);
syncOrderInfoService.handleDataAndInventoryId(orderCodeList,oldWarehouseId,newWarehouseId,inventoryId);

6
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -84,7 +84,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
@Transactional(rollbackFor = Exception.class)
@Override
public void handleData(List<String> orderCodeList,Integer oldWarehouseId,Long newWarehouseId) {
public void handleData(List<String> orderCodeList,Integer oldWarehouseId,Long newWarehouseId,String tableName) {
log.info("#############handleData: 处理订单开始");
for (String orderCode:orderCodeList){
log.info("#############handleData: 当前处理orderCode={}的订单 ",orderCode);
@ -105,10 +105,14 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
saveTrayTypeInfoPackage(orderCode,oldWarehouseId,newWarehouseId);
orderClient.updateStatusWithTableName(1,orderCode,tableName);
}catch (CustomerException e){
log.error("同步订单"+orderCode+"失败: "+e.message,e);
orderClient.updateStatusWithTableName(2,orderCode,tableName);
}catch (Exception e){
log.error("同步订单"+orderCode+"失败",e);
orderClient.updateStatusWithTableName(2,orderCode,tableName);
}
// }

Loading…
Cancel
Save