Browse Source

opt:修改正式环境相关

test-20240527
gongbx 7 months ago
parent
commit
a9709687d8
  1. 5
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/InventoryInfo.java
  2. 9
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillDetailMapper.xml
  3. 7
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java
  4. 18
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java
  5. 1
      nlsso-server/src/main/java/org/nl/wms/ext/eas/WmsToEasService.java
  6. 2
      nlsso-server/src/main/java/org/nl/wms/ext/srm/WmsToSrmService.java
  7. 2
      nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java

5
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/InventoryInfo.java

@ -104,6 +104,11 @@ public class InventoryInfo extends Model<InventoryInfo> {
/**
* 单位
*/
private String unitno;
/**
* 组织编码
*/

9
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillDetailMapper.xml

@ -7,7 +7,7 @@
FROM
EAS_NOBLE.V_UC_OUTINBILL
WHERE DJZT = '提交'
AND TO_DATE(cjsj, 'YYYY-MM-DD') >= TRUNC(SYSDATE) - INTERVAL '15' DAY(3)
AND TO_DATE(cjsj, 'YYYY-MM-DD HH24:MI:SS') >= TRUNC(SYSDATE) - INTERVAL '15' DAY(3)
</select>
<select id="selectSrmPageWithInventory" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
SELECT
@ -39,10 +39,11 @@
SELECT
stono as zzbm,
warehouseno as ckbm,
locationno as kwbm ,
materialno as wlbm ,
locationno as kwbm,
materialno as wlbm,
lot as pc,
curstoreqty as kcsl ,
curstoreqty as kcsl,
unitno,
trackno
FROM EAS_NOBLE.V_UC_INVENTORYINFO
<where>

7
nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java

@ -106,13 +106,10 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai
// && Objects.equals(inventory.getTrackno(), bill.getTrackno())
// && Objects.equals(inventory.getKwbm(), bill.getKwbm()))
// .collect(Collectors.toList());
//将库存数量赋值给单据
Optional<InventoryInfo> minKcsl = matchedInventory.stream()
.filter(r -> r.getUnitno().equals(bill.getJldw()))
.min(Comparator.comparing(InventoryInfo::getKcsl));
minKcsl.ifPresent(m -> {
//todo 增加库存数量本地计算 自动审核单据 确认明细单据是否逐一审核
bill.setKcsl(m.getKcsl());
});
minKcsl.ifPresent(m -> bill.setKcsl(m.getKcsl()));
});
result.setRecords(easOutInBillDetailList);
return CommonPage.getPage(result);

18
nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java

@ -84,9 +84,9 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
JSONArray jsonArray = new JSONArray();
JSONObject version = new JSONObject();
// 获取静态文件的路径
String downloadUrl = "http://10.10.188.45:8012/app.apk";
String downloadUrl = "http://10.10.188.45:8011/app.apk";
version.put("url", downloadUrl); // 将下载链接放入JSON对象中
version.put("versionName", "1.0.1");
version.put("versionName", "2.0.0");
jsonArray.add(version);
return jsonArray;
}
@ -99,7 +99,6 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
@Override
@SaIgnore
public CommonPage<EasOutInBill> page(EasOutInBillQuery params) {
params.setFuzzy("");
Page<EasOutInBill> easOutInBills = easOutInBillMapper.selectPage(new Page<>(params.getPage(), params.getSize()), new QueryWrapper<EasOutInBill>()
.lambda()
.eq(ObjectUtil.isNotEmpty(params.getDjlx()), EasOutInBill::getDjlx, params.getDjlx())
@ -191,10 +190,10 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
log.error("异常信息:" + e);
}
}, pool);
CompletableFuture.runAsync(() -> {
//todo 检查事务是否会失效
autoDeleteBill(easOutInBillDetails, existingIds);
}, pool);
// CompletableFuture.runAsync(() -> {
// //todo 检查事务是否会失效
// autoDeleteBill(easOutInBillDetails, existingIds);
// }, pool);
}
@ -213,8 +212,8 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
bill.setSl(bill.getSl().abs());
}
bill.setSysl(bill.getSl());
bill.setCjsj(LocalDateTime.parse(bill.getCjsj(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")).toLocalDate().toString());
if (bill.getDjly() == null) {
bill.setCjsj(LocalDateTime.parse(bill.getCjsj(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
bill.setDjly("1");
} else {
//srm的未入库改为提交
@ -255,6 +254,9 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
bill.setBtbz(detail.getBtbz());
bill.setCksj(detail.getCksj());
bill.setLlr(detail.getLlr());
if (bill.getDjlx().equals("CGRKD")) {
bill.setDjly("2");
}
return bill;
})
.collect(Collectors.toList());

1
nlsso-server/src/main/java/org/nl/wms/ext/eas/WmsToEasService.java

@ -46,6 +46,7 @@ public class WmsToEasService {
private String operationName;
public MsgDto sendWebService(String json) throws ServiceException, RemoteException {
log.error("Eas同步接口开始请求,请求json为:"+json);
Service s = new Service();
Call call = (Call) s.createCall();
call.setOperationName("login");

2
nlsso-server/src/main/java/org/nl/wms/ext/srm/WmsToSrmService.java

@ -32,11 +32,13 @@ public class WmsToSrmService {
private String host;
public SrmMsgDto sendWebPostData(String json) throws ServiceException, RemoteException {
log.error("Srm同步接口开始请求,请求json为:"+json);
SrmMsgDto srmMsgDto;
com.alibaba.fastjson.JSONObject result;
String resultMsg = HttpRequest.post(host)
.body(json)
.execute().body();
log.error("Srm同步接口请求成功,输出参数为:-------------------" +resultMsg);
srmMsgDto= JSON.parseObject(String.valueOf(resultMsg), SrmMsgDto.class);
return srmMsgDto;
}

2
nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java

@ -81,7 +81,7 @@ public class EasBillSchedule {
* eas单据自动审核
*/
@Async("taskExecutor")
@Scheduled(cron = "0/120 * * * * *")
//@Scheduled(cron = "0/120 * * * * *")
@Transactional(rollbackFor = Exception.class)
public void automaticAuditBills() {
try {

Loading…
Cancel
Save