rev:合同台账修改

This commit is contained in:
2024-06-20 15:01:11 +08:00
parent 8f0f209878
commit e1ce0e3daa
2 changed files with 15 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.ext.erp.service.WmsToErpService;
import org.nl.utils.PageUtil;
import org.nl.utils.SecurityUtils;
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
import org.nl.wms.basedata.master.service.ClassstandardService;
@@ -216,9 +217,9 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
if (!ObjectUtil.isEmpty(supp_name)) {
map.put("supp_name", "%" + supp_name + "%");
}
if (!ObjectUtil.isEmpty(iszero)) {
/* if (!ObjectUtil.isEmpty(iszero)) {
map.put("iszero", "true".equals(iszero)?"= 0":"<> 0");
}
}*/
String classIds = classstandardService.getAllChildIdStr(MaterOptTypeEnum.ZLFL.getClass_idStr());
map.put("classIds",classIds);
@@ -232,7 +233,7 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
.map(row -> row.getString("contract_no"))
.collect(Collectors.joining("','"));
// 查询erp视图
// 查询erp视图 QTY_HT 重量 QTY_ZT 未到货重量NORIGTAXMNY 合同金额
List<JSONObject> ja = WQL.getWO("QERP").setDbname("dataSource1").addParam("flag", "8").addParam("no_ids", "('"+no_ids+"')").process().getResultJSONArray(0).toJavaList(JSONObject.class);
for (int i = 0; i < content.size(); i++) {
@@ -242,8 +243,15 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
.filter(row -> row.getString("vbillcode").equals(jsonObject.getString("contract_no"))
&& row.getString("item_code").equals(jsonObject.getString("material_code"))).findAny();
jsonObject.put("subscribedate",first.isPresent() ? first.get().get("subscribedate"): "");
// 合同重量
jsonObject.put("qty_ht",first.isPresent() ? first.get().get("QTY_HT"): 0);
// 合同未到货重量
jsonObject.put("qty_zt",first.isPresent() ? first.get().get("QTY_ZT"): 0);
// 合同金额
jsonObject.put("norigtaxmny",first.isPresent() ? first.get().get("NORIGTAXMNY"): 0);
}
json.put("content",content);
return json;
}