Browse Source

Merge branch 'pre-production'

master
pref_mail@163.com 3 months ago
parent
commit
82dd585df0
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  2. 3
      blade-service/logpm-distribution/src/main/resources/application-dev.yml
  3. 146
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java
  4. 20
      blade-service/logpm-report/src/main/resources/application-dev.yml
  5. 10
      blade-service/logpm-report/src/main/resources/application-prod.yml
  6. 7
      blade-service/logpm-report/src/main/resources/application-test.yml
  7. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  8. 2
      blade-service/logpm-warehouse/src/main/resources/luascript/resubmit.lua

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

@ -8140,7 +8140,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//更新签收人
distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), user);
//维护订单状态
String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getSigningUser() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
String content = "包件在" + myCurrentWarehouse.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd());
aaa.add(trunklinePackageTrackLog);
} else {

3
blade-service/logpm-distribution/src/main/resources/application-dev.yml

@ -45,6 +45,9 @@ spring:
datasource:
dynamic:
druid:
# connect-timeout: 60000
#通用校验配置
validation-query: select 1
#启用sql日志拦截器

146
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java

@ -158,151 +158,5 @@ public class OrderStatusHandler {
log.info("##################orderStatusHandler: 未知品牌 type={}", type);
}
// String status = orderStatusDTO.getStatus();
// if("2".equals(status)){
// String currentWarehouse = orderStatusDTO.getCurrentWarehouse();
// BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getWarehouseByOldId(Integer.parseInt(currentWarehouse));
// if(Objects.isNull(basicdataWarehouseEntity)){
// log.warn("####################orderStatusHandler: 仓库信息为空 basicdataWarehouseEntity={}",basicdataWarehouseEntity);
// return;
// }
// Long warehouseId = basicdataWarehouseEntity.getId();
// Integer oldId = basicdataWarehouseEntity.getOldId();
//
// Integer trayId = orderStatusDTO.getTrayId();
// if(Objects.isNull(trayId)){
// log.warn("####################orderStatusHandler: 托盘id为空 trayId={}",trayId);
// return;
// }
// BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode("T" + trayId);
// if(Objects.isNull(basicdataTrayEntity)){
// log.info("############syncTrayTypeData: 托盘信息不存在");
// //如果托盘不存在就去同步该托盘
// TrayEntity trayEntity = trayClient.getTrayById(trayId);
// basicdataTrayEntity = new BasicdataTrayEntity();
// basicdataTrayEntity.setTenantId("627683");
// basicdataTrayEntity.setCreateUser(1714696768639311873L);
// basicdataTrayEntity.setUpdateUser(1714696768639311873L);
// basicdataTrayEntity.setCreateDept(1649331096241836033L);
// basicdataTrayEntity.setPalletName(trayEntity.getTrayNo());
// basicdataTrayEntity.setPalletCode("T"+trayEntity.getId());
// basicdataTrayEntity.setWarehouseId(warehouseId);
// basicdataTrayEntity.setTrayStatus(trayEntity.getStatus()+"");
// basicdataTrayEntity.setType(1);
// basicdataTrayEntity.setOldId(trayId);
//// basicdataTrayEntity.setNowWarehouseId(nowNewWarehouseId);
// Long aLong = basicdataTrayClient.addTray(basicdataTrayEntity);
// basicdataTrayEntity.setId(aLong);
// }
//
// TrayScanDesEntity trayScanDesEntity = trayScanDesClient.findScanTypeId(trayId, unitNo, oldId);
// if(Objects.isNull(trayScanDesEntity)){
// log.warn("####################orderStatusHandler: 没有打托数据 trayId={}",trayId);
// return;
// }
// Integer trayScanId = trayScanDesEntity.getTrayScanId();
// TrayScanEntity trayScanEntity = trayScanClient.getEntityByTrayScanId(trayScanId);
// if(Objects.isNull(trayScanEntity)){
// log.warn("####################orderStatusHandler: 没有打托方式数据 trayScanId={}",trayScanId);
// return;
// }
// Integer trayType = trayScanEntity.getType();
//
// String newTrayType = "100";
// if(1==trayType){
// newTrayType = "60";
// }else if(2==trayType){
// newTrayType = "30";
// }else if(3==trayType){
// newTrayType = "50";
// }else if(4==trayType){
// newTrayType = "100";
// }else if(5==trayType){
// newTrayType = "10";
// }else if(6==trayType){
// newTrayType = "20";
// }
//
// //判断托盘是否有上架
// Long allocationId = taryAllocationClient.findAllocationByTrayId(basicdataTrayEntity.getId());
// if(Objects.isNull(allocationId)){
// //没有上架就直接打托
// Map<String,Object> m = new HashMap<>();
// m.put("trayType",newTrayType);
// m.put("trayCode","T"+trayId);
// m.put("warehouseId",warehouseId);
// m.put("orderPackageCode",unitNo);
//
// R response = warehouseTrayTypeClient.orderScanOrderPackageCodeReturnR(m);
// int code = response.getCode();
// if(code == 4001){
// log.info("####################orderStatusHandler: 包件已在当前托盘打托 unitNo={} trayCode={}",unitNo,"T"+trayId);
// }else if(code == 4002){
// log.info("####################orderStatusHandler: 包件已在其他托盘打托 unitNo={} ",unitNo);
// WarehouseTrayGoodsEntity trayGoodsEntity = warehouseTrayGoodsClient.findTrayCodeByOrderPackageCode(unitNo);
// if(Objects.isNull(trayGoodsEntity)){
// log.warn("####################orderStatusHandler: 包件未打托 unitNo={}",unitNo);
// }else{
// String oldTrayCode = trayGoodsEntity.getTrayCode();
// Long trayGoodsId = trayGoodsEntity.getId();
// Long wid = trayGoodsEntity.getWarehouseId();
// BasicdataTrayEntity oldTrayEntity = basicdataTrayClient.getTrayByTrayCode(oldTrayCode);
// Long oldTrayId = oldTrayEntity.getId();
// //判断托盘是否有上架
// Long oldAllocationId = taryAllocationClient.findAllocationByTrayId(oldTrayId);
// if (Objects.isNull(oldAllocationId)){
// //没有上架
// //直接解绑托盘
// warehouseTrayGoodsClient.delTrayGoodsById(trayGoodsId,wid);
// }else{
// //有上架
// //下架
// updownTypeClient.downPackage(unitNo,wid);
// }
// }
//
// boolean b1 = warehouseTrayTypeClient.orderScanOrderPackageCode(m);
// if(!b1){
// log.warn("####################orderStatusHandler: 二次打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
// }else{
// log.info("####################orderStatusHandler: 二次打托成功 unitNo={} trayCode={}",unitNo,"T"+trayId);
// }
// }else if(code == 4003){
// log.info("####################orderStatusHandler: 包件未打托已上架 unitNo={} ",unitNo);
// WarehouseUpdownGoodsEntity updownGoodsEntity = warehouseUpdownGoodsClient.findEntityByOrderPackageCode(unitNo);
// if(Objects.isNull(updownGoodsEntity)){
// log.warn("####################orderStatusHandler: 包件未上架 unitNo={}",unitNo);
// }else{
// Long wid = updownGoodsEntity.getWarehouseId();
// updownTypeClient.downPackage(unitNo,wid);
// }
// boolean b1 = warehouseTrayTypeClient.orderScanOrderPackageCode(m);
// if(!b1){
// log.warn("####################orderStatusHandler: 二次打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
// }else{
// log.info("####################orderStatusHandler: 二次打托成功 unitNo={} trayCode={}",unitNo,"T"+trayId);
// }
// }else if(code == 4004){
// log.info("####################orderStatusHandler: 包件打托方式不正确 unitNo={} ",unitNo);
// //先去空置托盘再打托
// warehouseTrayTypeClient.trayToNull("T"+trayId);
// boolean b1 = warehouseTrayTypeClient.orderScanOrderPackageCode(m);
// if(!b1){
// log.warn("####################orderStatusHandler: 二次打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
// }
// }else{
// String msg1 = r.getMsg();
// int code1 = r.getCode();
// log.warn("######################orderStatusHandler: 打托失败 msg={} code={}",msg1,code1);
// log.warn("######################orderStatusHandler: 打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
// }
//
// }else{
// //有上架就上架
// updownTypeClient.upShelfPackage(unitNo,allocationId,warehouseId);
// }
// }
}
}

20
blade-service/logpm-report/src/main/resources/application-dev.yml

@ -21,16 +21,32 @@ spring:
#启用sql日志拦截器
proxy-filters:
- sqlLogInterceptor
query-timeout: 60000
#设置默认的数据源或者数据源组,默认值即为master
# query-timeout: 60000
# connect-timeout: 60000
# transaction-timeout: 60000
# max-wait: 60000
# time-between-eviction-runs-millis: 60000
# min-evictable-idle-time-millis: 300000
# connectTimeout: 60000
# socketTimeout: 60000
# queryTimeout: 60000
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:
master:
druid:
#独立校验配置
validation-query: select 1
queryTimeout: 60000
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.report.master.url}
username: ${blade.datasource.report.master.username}
password: ${blade.datasource.report.master.password}
627683:
druid:
validation-query: select 1
queryTimeout: 60000
url: jdbc:mysql://192.168.2.46:3306/logpm_platform?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&socketTimeout=30000
username: root
password: 12345678

10
blade-service/logpm-report/src/main/resources/application-prod.yml

@ -21,9 +21,6 @@ spring:
#启用sql日志拦截器
proxy-filters:
- sqlLogInterceptor
query-timeout: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:
@ -36,3 +33,10 @@ spring:
url: ${blade.datasource.report.master.url}
username: ${blade.datasource.report.master.username}
password: ${blade.datasource.report.master.password}
627683:
druid:
validation-query: select 1
queryTimeout: 60000
url: ${blade.datasource.report.627683.url}
username: ${blade.datasource.report.627683.username}
password: ${blade.datasource.report.627683.password}

7
blade-service/logpm-report/src/main/resources/application-test.yml

@ -34,3 +34,10 @@ spring:
url: ${blade.datasource.report.master.url}
username: ${blade.datasource.report.master.username}
password: ${blade.datasource.report.master.password}
627683:
druid:
validation-query: select 1
queryTimeout: 60000
url: ${blade.datasource.report.627683.url}
username: ${blade.datasource.report.627683.username}
password: ${blade.datasource.report.627683.password}

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -1780,16 +1780,19 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
redisScript.setResultType(Long.class);
List<String> keys = Collections.singletonList(key);
List<String> args = Arrays.asList(value, String.valueOf(expireTime));
List<Object> args = Arrays.asList(value, expireTime);
Long result = redis.getRedisTemplate().execute(redisScript, keys, args);
log.info("Keys: {}", keys);
log.info("Args: {}", args);
Long result = redis.getRedisTemplate().execute(redisScript, keys, args.toArray());
if (result == 1) {
log.warn("#########orderScanOrderPackageCode: 托盘正在保存打托方式 trayCode={} warehouseId={}", trayCode, warehouseId);
throw new CustomerException(405, "托盘信息正在更新,请重试");
}
redis.setEx(key,"1",5L);
// redis.setEx(key,"1",5L);
WarehouseTrayTypeEntity trayTypeEntity = new WarehouseTrayTypeEntity();
BladeUser user = AuthUtil.getUser();
@ -1879,7 +1882,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
//修改托盘的状态
basicdataTrayClient.updateTrayStatus(trayId, 2);
redis.del(key);
// redis.del(key);
return trayTypeEntity;
}

2
blade-service/logpm-warehouse/src/main/resources/luascript/resubmit.lua

@ -1,6 +1,6 @@
local key = KEYS[1]
local value = ARGV[1]
local expireTime = tonumber(ARGV[2])
local expireTime = ARGV[2]
local exists = redis.call("EXISTS", key)

Loading…
Cancel
Save