代码更新
This commit is contained in:
@@ -2,6 +2,7 @@ package org.nl.wms.ext.mes.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -25,6 +26,8 @@ import org.nl.wms.sch.tasks.CoolCutTask;
|
||||
import org.nl.wms.st.inbill.service.CheckOutBillService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
@@ -689,7 +692,6 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
if (StrUtil.equals(is_mesTolms, "1")) {
|
||||
String isUnPlanProductionBox = param.getString("isUnPlanProductionBox"); // 生产订单
|
||||
String QuanlityInBox = param.getString("QuanlityInBox"); // 产品编码
|
||||
String BoxWeight = param.getString("BoxWeight"); // 产品名称
|
||||
String QualityGuaranPeriod = param.getString("QualityGuaranPeriod"); // 分切机台编码
|
||||
String ProductName = param.getString("ProductName"); // 来源卷位置
|
||||
String Description = param.getString("Description"); // 来源卷位置
|
||||
@@ -699,10 +701,12 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
String box_width = param.getString("Attribute3"); // 木箱料号
|
||||
String box_high = param.getString("Attribute4"); // 木箱料号
|
||||
|
||||
JSONArray details = param.getJSONArray("details");
|
||||
double BoxWeight = 0; // 木箱自身重量
|
||||
|
||||
JSONArray details = param.getJSONArray("details");
|
||||
for (int i = 0; i < details.size(); i++) {
|
||||
JSONObject detail = details.getJSONObject(i);
|
||||
BoxWeight = NumberUtil.add(BoxWeight, detail.getDoubleValue("NetWeight"));
|
||||
|
||||
String PackageBoxSN = detail.getString("PackageBoxSN"); // 分切订单类型
|
||||
String ContainerName = detail.getString("ContainerName"); // 子卷号
|
||||
@@ -730,7 +734,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
jo.put("box_width", box_width);
|
||||
jo.put("box_high", box_high);
|
||||
jo.put("quanlity_in_box", QuanlityInBox);
|
||||
jo.put("box_weight", BoxWeight);
|
||||
// jo.put("box_weight", BoxWeight);
|
||||
jo.put("quality_guaran_period", QualityGuaranPeriod);
|
||||
jo.put("sale_order_name", SaleOrderName);
|
||||
jo.put("customer_name", CustomerName);
|
||||
@@ -755,6 +759,10 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
jo.put("create_time", DateUtil.now());
|
||||
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SubPackageRelation");
|
||||
tab.insert(jo);
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("box_weight", String.valueOf(BoxWeight));
|
||||
tab.update(map,"package_box_sn = '"+PackageBoxSN+"'");
|
||||
}
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
|
||||
@@ -1927,7 +1927,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
* 销售出库:sap、mes
|
||||
* 改切出库:sap
|
||||
*/
|
||||
String isUpload = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("is_upload").getValue();
|
||||
/*String isUpload = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("is_upload").getValue();
|
||||
if (StrUtil.equals(isUpload, "1")) {
|
||||
String bill_type = jo_mst.getString("bill_type");
|
||||
// 销售出库
|
||||
@@ -2167,7 +2167,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
new LmsToMesServiceImpl().cutPlanMomRollDeliveryComplete(mes_jo);
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user