Browse Source

1.干线bug修复

dist.1.3.0
zhenghaoyu 6 months ago
parent
commit
b9dab6dd5a
  1. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  2. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  3. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  4. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  5. 21
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -81,6 +81,7 @@ public class LoadCarsDTO implements Serializable {
private List<String> orderCodes;
private List<String> orderCodeList;
private Integer enterNum;

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -136,6 +136,8 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
//包条 HT+仓库拼音/超管/职能+年月日时分秒+订单索引+包条个数索引CodeNumConstant.PACKAGE
BasicdataCodeRecordEntity basicdataCodeRecordEntity = getBasicdataCodeRecordEntity(CodeDesEnum.PACKAGE.getCodeNum(), basicdataWarehouseEntity);
Calendar calendar = Calendar.getInstance();
Integer day = calendar.get(Calendar.DAY_OF_MONTH);
Integer oldNum = basicdataCodeRecordEntity.getNum();
List<String> packageCodes = new ArrayList<>();
@ -150,7 +152,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
String time = new String(System.currentTimeMillis() + "");
time=time.substring(4);
oldNum = oldNum + 1;
String packageCode = "HT" + warehouseCode + year + CommonUtil.geFourNumberByString(basicdataCodeRecordEntity.getMonth(), 2) + basicdataCodeRecordEntity.getDay() + time;
String packageCode = "HT" + warehouseCode + year + CommonUtil.geFourNumberByString(basicdataCodeRecordEntity.getMonth(), 2) + day + time;
packageCodes.add(packageCode);
}
basicdataCodeRecordEntity.setNum(oldNum);

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -574,8 +574,14 @@
#{item}
</foreach>
</if>
<if test="param.orderCodeList != null and param.orderCodeList.size() > 0">
and ldsa.order_code in
<foreach collection="param.orderCodeList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.waybillNo != null and param.waybillNo != ''">
and Locate(#{param.waybillNo},lww.waybill_no)
and Locate(#{param.waybillNo},lww.waybill_no) > 0
</if>
</select>

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -1385,7 +1385,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
String materialName = pacakgeDetailExcelDTO.getMaterialName();
String materialCode = pacakgeDetailExcelDTO.getMaterialCode();
advanceDetailModel.setMaterialName(materialName);
advanceDetailModel.setMaterialCode(materialCode);
if (StringUtil.isNotBlank(materialCode) && StringUtil.isNotBlank(materialName)) {
Long materialId = materialMap.get(materialCode);
if (!Objects.isNull(materialId)) {

21
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -204,7 +204,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
TrunklineBillladingLogEntity logEntity = new TrunklineBillladingLogEntity();
logEntity.setWarehouseId(warehouseId);
logEntity.setWarehouseName(warehouseName);
logEntity.setCreateUserName(AuthUtil.getUserName());
logEntity.setCreateUserName(AuthUtil.getNickName());
logEntity.setContent("修改提货单 billladingCode="+billladingCode+" "+updateMsg);
logEntity.setBillladingId(billladingId);
logEntity.setBeforeOpreation(JSON.toJSONString(billladingEntity));
@ -435,8 +435,8 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
billladingEntity.setBillladingStatus("4");
billladingEntity.setSettlementTime(date);
billladingEntity.setSettlementId(AuthUtil.getUserId());
billladingEntity.setSettlementName(AuthUtil.getUserName());
stringBuffer.append(",提货完成变更为已结算,时间").append(CommonUtil.dateToString(date)).append(",变更人").append(AuthUtil.getUserName());
billladingEntity.setSettlementName(AuthUtil.getNickName());
stringBuffer.append(",提货完成变更为已结算,时间").append(CommonUtil.dateToString(date)).append(",变更人").append(AuthUtil.getNickName());
List<TrunklineBillladingWaybillEntity> billladingWaybillEntities = billladingWaybillService.findNoFinishWaybillByBillladingId(billladingId);
Map<Long,Integer> map = new HashMap<>();
@ -480,7 +480,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
case 6:
//取消提货
billladingEntity.setBillladingStatus("5");
stringBuffer.append(",变更为取消提货,时间").append(CommonUtil.dateToString(new Date())).append(",变更人").append(AuthUtil.getUserName());
stringBuffer.append(",变更为取消提货,时间").append(CommonUtil.dateToString(new Date())).append(",变更人").append(AuthUtil.getNickName());
break;
default:
log.warn("#############updateBillladingStatus: 未知的更新操作");
@ -547,6 +547,13 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
return R.fail(405,"提货单不存在");
}
String billladingStatus = billladingEntity.getBillladingStatus();
if(!"1".equals(billladingStatus) && !"2".equals(billladingStatus)){
log.warn("#############updateBillladingWaybillNum: 提货已经完成 billladingId={}",billladingId);
return R.fail(405,"提货已经完成");
}
Integer stockNum = 0;
BigDecimal stockWeight = BigDecimal.ZERO;
BigDecimal stockVolume = BigDecimal.ZERO;
@ -683,6 +690,12 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
return R.fail(405,"提货单不存在");
}
String billladingStatus = trunklineBillladingEntity.getBillladingStatus();
if(!"1".equals(billladingStatus) && !"2".equals(billladingStatus)){
log.warn("#############addWaybillToBillladingId: 提货已完成 billladingId={}",billladingId);
return R.fail(405,"提货已完成");
}
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(Objects.isNull(warehouseWaybillEntity)){
log.warn("#############addWaybillToBillladingId: 运单不存在 waybillNo={}",waybillNo);

Loading…
Cancel
Save