Browse Source

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

single_db
Diss 1 year ago
parent
commit
ad74f40d0b
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/LauncherConstant.java
  2. 8
      blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
  3. 207
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  4. 29
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  5. 28
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  6. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  7. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  8. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  9. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  10. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/StockupStateUpdateHandler.java
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  12. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  13. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  14. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/LauncherConstant.java

@ -67,7 +67,7 @@ public interface LauncherConstant {
/**
* sentinel prod 地址
*/
String SENTINEL_PROD_ADDR = "172.30.0.58:8858";
String SENTINEL_PROD_ADDR = "172.16.128.145:8858";
/**
* sentinel test 地址

8
blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java

@ -41,10 +41,10 @@ public class LauncherServiceImpl implements LauncherService {
PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile));
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos");
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123");
// PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos");
// PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123");
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos");
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123");
PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos");
PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123");
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));

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

@ -98,8 +98,14 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNotNull(myCurrentWarehouse)){
aftersalesWorkOrder.put("warehouseId", myCurrentWarehouse.getId());
}
IPage<AftersalesWorkOrderEntity> pages = aftersalesWorkOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(aftersalesWorkOrder, AftersalesWorkOrderEntity.class));
return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
try{
IPage<AftersalesWorkOrderEntity> pages = aftersalesWorkOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(aftersalesWorkOrder, AftersalesWorkOrderEntity.class));
return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
}catch (Exception e ){
log.info("工单查询系统异常》》》{}",e.getMessage());
return R.fail("系统异常!");
}
}
/**
@ -110,8 +116,14 @@ public class AftersalesWorkOrderController extends BladeController {
@ApiOperation(value = "查询异常工单完整数据集合", notes = "传入aftersalesWorkOrder")
public R<IPage<AftersalesWorkOrderVO>> getListOwn(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, Query query) {
log.info("异常工单查询参数》》》{}",aftersalesWorkOrder);
IPage<AftersalesWorkOrderEntity> pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query));
return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
try{
IPage<AftersalesWorkOrderEntity> pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query));
return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
}catch (Exception e){
log.info("工单查询系统异常》》》{}",e.getMessage());
return R.fail("系统异常!");
}
}
/**
@ -127,8 +139,14 @@ public class AftersalesWorkOrderController extends BladeController {
aftersalesWorkOrder.put("business_id",myCurrentWarehouse.getId());
aftersalesWorkOrder.put("business_name",myCurrentWarehouse.getName());
}
IPage<AftersalesSettlementEntity> pages = aftersalesWorkOrderService.getListSettlement(aftersalesWorkOrder, Condition.getPage(query));
return R.data(pages);
try{
IPage<AftersalesSettlementEntity> pages = aftersalesWorkOrderService.getListSettlement(aftersalesWorkOrder, Condition.getPage(query));
return R.data(pages);
}catch(Exception e){
log.info("查询异常工单理赔信息>>{}",e.getMessage());
return R.fail("系统异常");
}
}
/**
@ -145,7 +163,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getAftersalesProcessingResultsDTO())){
throw new ServiceException("异常工单处理结果不能为空");
}
return R.status(aftersalesWorkOrderService.addProcessingResults(aftersalesWorkOrderDTO));
try {
return R.status(aftersalesWorkOrderService.addProcessingResults(aftersalesWorkOrderDTO));
}catch(Exception e){
log.info("营业部提交异常工单处理结果>>>{}",e.getMessage());
return R.fail("系统异常!!");
}
}
@ -183,8 +207,15 @@ public class AftersalesWorkOrderController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询客服人员信息", notes = "传入aftersalesWorkOrder")
public R<List<User>> listUser() {
List<User> list = aftersalesWorkOrderService.getCustomerServicePersonnel();
return R.data(list);
try{
List<User> list = aftersalesWorkOrderService.getCustomerServicePersonnel();
return R.data(list);
}catch(Exception e){
log.info("查询客服人员信息>>>>{}",e.getMessage());
return R.fail("系统异常!!");
}
}
/**
@ -205,12 +236,14 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getSurveyRecordDTO().getContent())){
throw new ServiceException("内容不能为空!!");
}
}catch (Exception e ){
return R.status(aftersalesWorkOrderService.savaSurveyRecord(aftersalesWorkOrderDTO));
}catch (RuntimeException e ){
log.info("内容不能为空!!");
throw new ServiceException("内容不能为空!!");
}catch (Exception e){
log.info(">新增调查记录>>{}",e.getMessage());
return R.fail("系统异常!!");
}
return R.status(aftersalesWorkOrderService.savaSurveyRecord(aftersalesWorkOrderDTO));
}
/**
@ -225,8 +258,14 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getId())){
throw new ServiceException("异常工单ID不能为空");
}
AftersalesWorkOrderVO list = aftersalesWorkOrderService.getSurveyRecord(aftersalesWorkOrderDTO);
return R.data(list);
try{
AftersalesWorkOrderVO list = aftersalesWorkOrderService.getSurveyRecord(aftersalesWorkOrderDTO);
return R.data(list);
}catch(Exception e){
log.info("查询调查记录>>>{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
@ -242,8 +281,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getId())){
throw new ServiceException("异常工单ID不能为空");
}
AftersalesWorkOrderVO list = aftersalesWorkOrderService.getTrackRecord(aftersalesWorkOrderDTO);
return R.data(list);
try{
AftersalesWorkOrderVO list = aftersalesWorkOrderService.getTrackRecord(aftersalesWorkOrderDTO);
return R.data(list);
}catch (Exception e){
log.info("查询全部跟踪记录>>>{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
@ -254,8 +298,14 @@ public class AftersalesWorkOrderController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询营业部责任人人员信息", notes = "传入aftersalesWorkOrder")
public R<List<User>> getBusinessDepartmentUser(Long warehouseId) {
List<User> list = aftersalesWorkOrderService.getBusinessDepartmentUser(warehouseId);
return R.data(list);
try {
List<User> list = aftersalesWorkOrderService.getBusinessDepartmentUser(warehouseId);
return R.data(list);
}catch(Exception e){
log.info("查询营业部责任人人员信息》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**
@ -272,8 +322,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceId() ) || ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceName() )){
return R.fail("请填写客服信息 !");
}
R r = aftersalesWorkOrderService.updateAssignCustomerService(aftersalesWorkOrderDTO);
return R.success("提交成功!");
try{
R r = aftersalesWorkOrderService.updateAssignCustomerService(aftersalesWorkOrderDTO);
return R.success("提交成功!");
}catch (Exception e){
log.info("异常工单分配处理客服信息》》》{}",e.getMessage());
return R.fail("系统异常!!");
}
}
@ -291,8 +346,14 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceId() ) || ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceName() )){
return R.fail("请填写客服信息 !");
}
R r = aftersalesWorkOrderService.updateAssignArbitrateService(aftersalesWorkOrderDTO);
return R.success("提交成功!");
try {
R r = aftersalesWorkOrderService.updateAssignArbitrateService(aftersalesWorkOrderDTO);
return R.success("提交成功!");
}catch (Exception e){
log.info("异常工单仲裁 分配处理客服信息>>{}",e.getMessage());
return R.fail("系统异常!!");
}
}
@ -326,8 +387,13 @@ public class AftersalesWorkOrderController extends BladeController {
@ApiOperationSupport(order = 4)
@ApiOperation(value = "异常工单 客服完结处理", notes = "传入aftersalesWorkOrder")
public R addCompletionEnd(@Valid @RequestBody List<AftersalesWorkOrderDTO> aftersalesWorkOrder) {
try {
return R.status(aftersalesWorkOrderService.addCompletionEnd(aftersalesWorkOrder));
}catch (Exception e){
log.info("客服完结处理>>>{}",e.getMessage());
return R.fail("系统异常!!");
}
return R.status(aftersalesWorkOrderService.addCompletionEnd(aftersalesWorkOrder));
}
/**
@ -341,7 +407,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){
throw new ServiceException("异常工单ID不能为空!");
}
return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder));
try {
return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder));
}catch (Exception e){
log.info("修改完结处理》》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**
@ -358,7 +430,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesAppeal.getWorkOrderId())){
throw new ServiceException("异常工单ID不能为空!!");
}
return R.status(aftersalesWorkOrderService.updateByIdAppel(aftersalesAppeal));
try {
return R.status(aftersalesWorkOrderService.updateByIdAppel(aftersalesAppeal));
}catch (Exception e){
log.info("客服操作确定修改》》》{}",e.getMessage());
return R.fail("系统异常!!");
}
}
/**
@ -371,8 +449,14 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){
return R.fail("异常工单ID不能为空!!");
}
AftersalesWorkOrderVO workOrderVO = aftersalesWorkOrderService.getProcessingResults(aftersalesWorkOrder);
return R.data(workOrderVO);
try {
AftersalesWorkOrderVO workOrderVO = aftersalesWorkOrderService.getProcessingResults(aftersalesWorkOrder);
return R.data(workOrderVO);
}catch (Exception e){
log.info("查询详情全部信息数据》》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**
@ -386,7 +470,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrder) || aftersalesWorkOrder.getAssignList().isEmpty()){
throw new ServiceException("数据不能为空!!");
}
return R.status(aftersalesWorkOrderService.updateArbitrate(aftersalesWorkOrder));
try {
return R.status(aftersalesWorkOrderService.updateArbitrate(aftersalesWorkOrder));
}catch (Exception e){
log.info("申请仲裁》》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**
@ -400,7 +490,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull(aftersalesWorkOrder) || aftersalesWorkOrder.getAssignList().isEmpty()){
throw new ServiceException("数据不能为空!!");
}
return R.status(aftersalesWorkOrderService.addArbitrateEnd(aftersalesWorkOrder));
try {
return R.status(aftersalesWorkOrderService.addArbitrateEnd(aftersalesWorkOrder));
}catch (Exception e){
log.info("客服仲裁完结操作》》》{}",e.getMessage());
return R.fail("系统异常!!");
}
}
/**
@ -411,7 +507,13 @@ public class AftersalesWorkOrderController extends BladeController {
@ApiOperation(value = "修改", notes = "传入aftersalesWorkOrder")
public R update(@Valid @RequestBody AftersalesWorkOrderEntity aftersalesWorkOrder) {
log.info("修改参数》》》{}",aftersalesWorkOrder.toString());
return R.status(aftersalesWorkOrderService.updateById(aftersalesWorkOrder));
try {
return R.status(aftersalesWorkOrderService.updateById(aftersalesWorkOrder));
}catch (Exception e){
log.info("工单修改异常》》》{}",e.getMessage());
return R.fail("系统异常!!");
}
}
@ -426,7 +528,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(aftersalesWorkOrder.getAssignList().isEmpty()){
throw new ServiceException("确定工单ID不能为空!!");
}
return R.status( aftersalesWorkOrderService.updateManagerConfirmed(aftersalesWorkOrder) );
try {
return R.status( aftersalesWorkOrderService.updateManagerConfirmed(aftersalesWorkOrder) );
}catch (Exception e){
log.info("客服经理确定数据》》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**
@ -440,7 +548,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(aftersalesWorkOrder.getAssignList().isEmpty()){
throw new ServiceException("修改工单数据ID不能为空!!");
}
return R.status(aftersalesWorkOrderService.updateWorkOrderStatus(aftersalesWorkOrder));
try {
return R.status(aftersalesWorkOrderService.updateWorkOrderStatus(aftersalesWorkOrder));
}catch (Exception e){
log.info("批量修改工单状态为已处理>>{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**
@ -454,8 +568,13 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull( aftersalesWorkOrder.getAssignList())){
return R.fail("更新的异常工单不能为空!!");
}
R r = aftersalesWorkOrderService.getUpdateWorkList(aftersalesWorkOrder);
return r;
try{
return aftersalesWorkOrderService.getUpdateWorkList(aftersalesWorkOrder);
}catch (Exception e){
log.info("填写钉钉流程号异常》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**
@ -478,8 +597,14 @@ public class AftersalesWorkOrderController extends BladeController {
// throw new ServiceException("二级品类未填!");
// }
}
aftersalesWorkOrder.setInitiationIdentification("PC");
return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder));
try {
aftersalesWorkOrder.setInitiationIdentification("PC");
return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder));
}catch (Exception e){
log.info("工单提交异常》》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
@ -496,8 +621,14 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNotNull(myCurrentWarehouse)){
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
}
IPage<AftersalesWorkOrderVO> list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query));
return R.data(list);
try {
IPage<AftersalesWorkOrderVO> list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query));
return R.data(list);
}catch (Exception e){
log.info("仓库查询待处理的异常工单》》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**

29
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -64,13 +64,13 @@
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
<if test="param.initiationIdentification != null and param.initiationIdentification != '' ">and lawo.initiation_identification = #{param.initiationIdentification } </if>
<if test="param.discoveryNode != null and param.discoveryNode != '' ">and lawo.discovery_node = #{param.discoveryNode } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number = #{param.workOrderNumber } </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number = #{param.waybillNumber } </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code = #{param.orderCode } </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number = #{param.trainNumber } </if>
<if test="param.first != null and param.first != '' ">and lawo.first = #{param.first } </if>
<if test="param.secondary != null and param.secondary != '' ">and lawo.secondary = #{param.secondary } </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route = #{param.vehicleRoute } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test="param.first != null and param.first != '' ">and lawo.first like concat('%', #{param.first },'%') </if>
<if test="param.secondary != null and param.secondary != '' ">and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<!-- create_time >= unix_timestamp('2013-10-24 00:00:00') and create_time <= unix_timestamp('2013-10-24 23:59:59')
date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
-->
@ -81,13 +81,13 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test="param.auditTime != null and param.auditTime != '' ">and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test="param.entryTime != null and param.entryTime != '' ">and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test="param.overTime != null and param.overTime != '' ">and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test="param.waybillMall != null and param.waybillMall != '' ">and lawo.waybill_mall = #{param.waybillMall } </if>
<if test="param.waybillMall != null and param.waybillMall != '' ">and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') </if>
<if test="param.deliveryDriver != null and param.deliveryDriver != '' ">and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test="param.customerServiceState != null and param.customerServiceState == 30 "> and lawo.work_order_status in ('30','40') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 20 "> and lawo.work_order_status in ('30') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 10 "> and lawo.work_order_status in ('80','100') </if>
<if test="param.customerServiceId != null and param.customerServiceId != '' ">and lawo.customer_service_id = #{param.customerServiceId } </if>
<if test="param.customerServiceName != null and param.customerServiceName != '' ">and lawo.customer_service_name = #{param.customerServiceName } </if>
<if test="param.customerServiceName != null and param.customerServiceName != '' ">and lawo.customer_service_name like concat('%', #{param.customerServiceName },'%') </if>
<if test="param.waybillMallId != null and param.waybillMallId != '' ">and lawo.waybill_mall_id = #{param.waybillMallId } </if>
<if test="param.problemDescription != null and param.problemDescription != '' ">and lawo.problem_description = #{param.problemDescription} </if>
<if test="param.warehouseId != null and param.warehouseId != '' and param.handleStatus != 20">and lawo.warehouse_id = #{param.warehouseId} </if>
@ -106,7 +106,16 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test="param.handleStatus!= null and param.handleStatus == 30">and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<!-- <if test="param.handleStatus!= null and param.handleStatus == 10 ">and lawo.warehouse_id = #{param.warehouseId} </if>-->
<if test="param.handleStatus!= null and param.handleStatus == 20 ">and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
<if test="param.handleStatus != null "> or 1=1 </if>
<if test="param.handleStatus != null "> or 1=1 </if>
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
<if test="param.discoveryNode != null and param.discoveryNode != '' ">and lawo.discovery_node = #{param.discoveryNode } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test="param.first != null and param.first != '' ">and lawo.first like concat('%', #{param.first },'%') </if>
<if test="param.secondary != null and param.secondary != '' ">and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<if test="param.warehouseId != null and param.warehouseId != '' and param.handleStatus != 20 "> and lap.business_id = #{param.warehouseId} </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 "> and lawo.work_order_status in ( #{param.workOrderStatus }) </if>
<!-- <if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == null "> and lawo.work_order_status in ( #{param.workOrderStatus }) and lap.types_of = '2' </if>-->

28
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -168,7 +168,7 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
// 最大的管理员
if(StringUtil.isBlank(user.getRoleId())){
if (StringUtil.isBlank(user.getRoleId())) {
return null;
}
@ -245,18 +245,26 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
@Override
public BasicdataWarehouseEntity getMyCurrentWarehouse() {
// 根据当前登陆人的信息和角色判断查询是所属仓库 还是服务仓库
BladeUser user = AuthUtil.getUser();
String json = redis.get(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()));
if (StringUtil.isBlank(json)) {
List<BasicdataWarehouseEntity> myWarehouseList = getMyWarehouseList();
if (myWarehouseList != null) {
if (myWarehouseList.size() == 1) {
return myWarehouseList.get(0);
try {
BladeUser user = AuthUtil.getUser();
String json = redis.get(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()));
if (StringUtil.isBlank(json)) {
List<BasicdataWarehouseEntity> myWarehouseList = getMyWarehouseList();
if (myWarehouseList != null) {
if (myWarehouseList.size() == 1) {
return myWarehouseList.get(0);
}
}
}
BasicdataWarehouseEntity o = JSONObject.parseObject(json, BasicdataWarehouseEntity.class);
return o;
} catch (Exception e) {
log.error(">>>>>> 获取仓库信息错误",e);
}
BasicdataWarehouseEntity o = JSONObject.parseObject(json, BasicdataWarehouseEntity.class);
return o;
return null;
}
@Override

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -65,6 +65,7 @@ import org.springblade.common.constant.reservation.ReservationPackageStatusConst
import org.springblade.common.constant.reservation.ReservationSigningStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.exception.ServiceException;
@ -1505,6 +1506,8 @@ public class DistributionStockupAppController extends BladeController {
*/
@NotNull
private R stockupScanByCustom(StockupDTO stockupDTO) {
//包件扫描
String orderCode = stockupDTO.getOrderCode();//订单自编号
String packetBarCode = stockupDTO.getPacketBarCode();//包件码
@ -1589,9 +1592,16 @@ public class DistributionStockupAppController extends BladeController {
map.put("logId", entity.getId());
map.put("messageData", entity);
map.put("createTime", new Date().getTime());
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
log.info(">>>> find bug myCurrentWarehouse {}",myCurrentWarehouse);
if (Objects.isNull(myCurrentWarehouse)) {
throw new CustomerException(403, "仓库信息不能为空");
}
//将消息携带绑定键值
rabbitTemplate.convertAndSend(RabbitConstant.STOCKUP_SCAN_EXCHANGE, RabbitConstant.STOCKUP_SCAN_ROUTING, map);
//查询是否货位数据是否该下架
Map<String, Object> mapState = new HashMap<>();
mapState.put("messageId", CommonUtil.getUUID());
@ -1601,6 +1611,7 @@ public class DistributionStockupAppController extends BladeController {
mapState.put("reservationId", stockupDTO.getReservationId());
mapState.put("logId", entity.getId());
mapState.put("messageData", entity);
mapState.put("warehouseId",myCurrentWarehouse.getId());
mapState.put("createTime", new Date().getTime());

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -465,7 +465,6 @@
INNER JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
INNER JOIN logpm_distribution_reservation AS ldr ON ldr.id = lds.reservation_id
<where>
ldr.reservation_status != '40'
<if test="id!='' and id != null">
and lddl.id = #{id}
</if>

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -301,4 +301,12 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
DistributionSignforEntity getByReservationId(@Param("reservationId") Long id);
/**
* 查询配送任务下任务
* @param id
* @param k
* @return
*/
DistributionSignforEntity selectByDeliveryIdAndMallName(@Param("reservationId")Long deliveryId,@Param("mallName") String mallName);
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -1226,4 +1226,8 @@
<select id="getByReservationId" resultType="com.logpm.distribution.entity.DistributionSignforEntity">
SELECT * FROM logpm_distribution_signfor WHERE reservation_id = #{reservationId}
</select>
<select id="selectByDeliveryIdAndMallName"
resultType="com.logpm.distribution.entity.DistributionSignforEntity">
SELECT * FROM logpm_distribution_signfor AS lds LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id WHERE lds.delivery_id = #{deliveryId} AND ldr.mall_mame = #{mallName}
</select>
</mapper>

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/StockupStateUpdateHandler.java

@ -40,6 +40,7 @@ public class StockupStateUpdateHandler {
messageData.setStockupId((Long) map.get("stockupId"));
messageData.setTypeService(String.valueOf( map.get("typeService")));
messageData.setReservationId((Long) map.get("reservationId"));
messageData.setWarehouseId((Long)map.get("warehouseId"));
//查询是否货位数据是否该下架
distributionAsyncService.stockupSelfOffShelf(messageData);
log.info("######STOCKUP_STATE_UPDATE_QUEUE:备货下架查询成功");

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -155,7 +155,7 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
List<DisStockListDetailVO> selectDistributionAppDeliverywrapIn( DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
/**
* 修改配送任务
* 修改商配配送任务
* @param deliveryListDTO
* @return
*/

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -643,11 +643,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
*/
@Override
public void stockupSelfOffShelf(StockupDTO stockupDTO) throws InterruptedException {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
log.info(">>>> find bug {}",myCurrentWarehouse);
if (Objects.isNull(myCurrentWarehouse)) {
throw new CustomerException(403, "仓库信息不能为空");
}
//判断类型
List<DistributionStockupSelfVO> distributionStockupSelfVO = new ArrayList<>();
@ -656,7 +652,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
distributionStockupSelfVO = distributionStockupMapper.stockupSelfOffShelf(stockupDTO);
} else {
//商 市
log.info(">>>> find bug {}",stockupDTO);
log.info(">>>> find bug stockupDTO {}",stockupDTO);
distributionStockupSelfVO = distributionStockupMapper.stockupOffShelf(stockupDTO);
}
//有
@ -678,7 +674,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
if (a.get() == b.get()) {
//下架
list.forEach(i -> {
warehouseUpdownTypeClient.downPackage(i, myCurrentWarehouse.getId());
warehouseUpdownTypeClient.downPackage(i, stockupDTO.getWarehouseId());
});
}

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -2964,9 +2964,20 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
stockupInfoEntity.setStockUpType("1");
distributionStockupInfoService.save(stockupInfoEntity);
} else {
//根据配送计划和运单号查询出该预约
// DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomer(deliveryListEntityId, k);
DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomerUnit(deliveryListEntityId, k);
DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getReservationId, reservationEntity.getId())
.eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId())
);
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId());
throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单");
}
//查询出该预约下的订单信息
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleMapper.selectList(Wrappers.<DistributionReservationStockarticleEntity>query().lambda().eq(DistributionReservationStockarticleEntity::getReservationId, reservationEntity.getId()).ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue()));
Map<Long, List<DistributionReservationStockarticleEntity>> oldOrder = reservationStockarticleEntityList.stream().collect(Collectors.groupingBy(DistributionReservationStockarticleEntity::getStockArticleId));

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -2317,7 +2317,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setReservationNum(packageTotal.get());
this.updateById(reservationEntity);
deliveryPackageTotal.getAndAdd(reservationEntity.getReservationNum());
inventoryNub.getAndAdd(reservationEntity.getReservationStockListNum());
if (Func.isNotEmpty(reservationEntity.getReservationStockListNum())){
inventoryNub.getAndAdd(reservationEntity.getReservationStockListNum());
}
DistributionSignforEntity distributionSignforEntity = new DistributionSignforEntity();
distributionSignforEntity.setReservationId(reservationEntity.getId());
distributionSignforEntity.setTrainNumber(trainNumberMa);
@ -3586,6 +3588,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
String[] split = distributionCancelReservationPackageDTO.getPackageIds().split(",");
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionCancelReservationPackageDTO.getReservationId());
String orderCodes = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).distinct().collect(Collectors.joining(","));
for (String s : split) {
if (Func.isNotEmpty(distributionParcelListEntities)){
List<DistributionParcelListEntity> cancelPackage = distributionParcelListEntities.stream().filter(p -> p.getId().equals(Long.parseLong(s))).collect(Collectors.toList());
@ -3617,6 +3620,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
}
}
distributionStockArticleService.maintenanceOrderInfo(orderCodes,myCurrentWarehouse.getId());
//维护预约单状态
this.maintenanceReservationInfo(distributionCancelReservationPackageDTO.getReservationId());
//维护预约单数量

Loading…
Cancel
Save