Browse Source

opt:代码优化

master
DESKTOP-5DIJMF9\admin 2 weeks ago
parent
commit
6a3e9de7be
  1. 12
      lxapi/com/noblelift/imp/products/mes/api/em/EquipmentFileService.java
  2. 21
      lxapi/com/noblelift/imp/products/mes/api/ifs/sap/SapToWmsService.java
  3. 2
      lxapp/app/products/mes/ifs/sap/WOPostFailed_query.jsp
  4. 21
      lxservice/com/noblelift/imp/products/mes/service/em/EquipmentFileServiceImpl.java
  5. 12
      lxservice/com/noblelift/imp/products/mes/service/ifs/sap/SapToWmsServiceImpl.java
  6. 8
      lxservice/com/noblelift/imp/products/mes/service/lxrf/rc/ReceiveAPIServiceImpl.java

12
lxapi/com/noblelift/imp/products/mes/api/em/EquipmentFileService.java

@ -55,18 +55,6 @@ public interface EquipmentFileService {
*/ */
public ServiceResultBean queryTechLevel(ServiceContext ctx,String account_id); public ServiceResultBean queryTechLevel(ServiceContext ctx,String account_id);
/**
*
* @discription 查询设备变更类型
* @author lmyu
* @created 2018年12月4日 上午11:29:19
* @param ctx 上下文
* @param account_id 操作者id
* @return
*/
public ServiceResultBean queryDeviceChange(ServiceContext ctx,String account_id);
/** /**
* *
* @discription 新增 * @discription 新增

21
lxapi/com/noblelift/imp/products/mes/api/ifs/sap/SapToWmsService.java

@ -20,7 +20,7 @@ import net.sf.json.JSONObject;
public interface SapToWmsService { public interface SapToWmsService {
/** /**
* Description 物料详细规格同步 根据物料导入详细规格直接删除插入接口表 * Description 物料详细规格同步 根据物料导入详细规格直接删除插入接口表ZWMS_GET_MATERIAL_INFO
* *
* @param context * @param context
* 上下文 * 上下文
@ -37,7 +37,7 @@ public interface SapToWmsService {
public ServiceResultBean getMaterialInfo(ServiceContext context, JSONObject accountId,JSONObject form); public ServiceResultBean getMaterialInfo(ServiceContext context, JSONObject accountId,JSONObject form);
/** /**
* Description 班组发料信息导入 "根据日期导入当天的班组发料清单 * Description 班组发料信息导入 "根据日期导入当天的班组发料清单ZWMS_GET_MATERIAL_ISSUELIST
* 包括线边仓发料信息線邊倉的標記如果庫存地點為5開頭則為線邊倉如为线边仓直接发料出库完成" * 包括线边仓发料信息線邊倉的標記如果庫存地點為5開頭則為線邊倉如为线边仓直接发料出库完成"
* *
* @param context * @param context
@ -51,7 +51,7 @@ public interface SapToWmsService {
public ServiceResultBean getMaterialIssuelist(ServiceContext context, JSONObject accountId, JSONObject form); public ServiceResultBean getMaterialIssuelist(ServiceContext context, JSONObject accountId, JSONObject form);
/** /**
* Description 物料信息同步 根据更新日期同步SAP物料基本信息直接删除插入接口表更新物料属性表 * Description 物料信息同步 根据更新日期同步SAP物料基本信息直接删除插入接口表更新物料属性表ZWMS_GET_MATERIAL
* *
* @param context * @param context
* 上下文 * 上下文
@ -65,7 +65,7 @@ public interface SapToWmsService {
public ServiceResultBean getMaterial(ServiceContext context, JSONObject accountId,JSONObject form); public ServiceResultBean getMaterial(ServiceContext context, JSONObject accountId,JSONObject form);
/** /**
* Description 班组欠料信息导入 导入各班组欠料最新信息直接删除插入到接口表 * Description 班组欠料信息导入 导入各班组欠料最新信息直接删除插入到接口表ZWMS_GET_MATERIAL_SHORTLIST
* *
* @param context * @param context
* 上下文 * 上下文
@ -78,7 +78,7 @@ public interface SapToWmsService {
/** /**
* Description 其它出入库信息上传WMS发起的转仓信息上传 6个接口 * Description 其它出入库信息上传WMS发起的转仓信息上传 6个接口 ZWMS_MATERIAL_STOCK_MOVE
* *
* @param context * @param context
* 上下文 * 上下文
@ -142,7 +142,7 @@ public interface SapToWmsService {
public ServiceResultBean getWOComponent(ServiceContext context, JSONObject accountId, JSONObject form); public ServiceResultBean getWOComponent(ServiceContext context, JSONObject accountId, JSONObject form);
/** /**
* Description 盘点结果信息上传 * Description 盘点结果信息上传 ZWMS_MATERIAL_STOCK_UPDATE
* *
* @param context * @param context
* 上下文 * 上下文
@ -160,7 +160,8 @@ public interface SapToWmsService {
*/ */
public ServiceResultBean materialStockUpdate(ServiceContext context, JSONObject accountId, JSONArray allrows); public ServiceResultBean materialStockUpdate(ServiceContext context, JSONObject accountId, JSONArray allrows);
/** /**
* Description materialStockMove PO订单信息导入 根据日期段导入最新的PO清单信息中山公司的所有PO包括公司間的PO有物料號碼和無物料號碼 的PO * Description materialStockMove PO订单信息导入 根据日期段导入最新的PO清单信息
* 中山公司的所有PO包括公司間的PO有物料號碼和無物料號碼 的PO ZWMS_GET_PO_INFO
* *
* @param context * @param context
* 上下文 * 上下文
@ -210,7 +211,7 @@ public interface SapToWmsService {
public ServiceResultBean POPost2(ServiceContext context, JSONObject accountId, JSONArray allrows); public ServiceResultBean POPost2(ServiceContext context, JSONObject accountId, JSONArray allrows);
/** /**
* Description 供应商信息同步 同步SAP供应商基本信息直接删除插入接口表更新供应商表 * Description 供应商信息同步 同步SAP供应商基本信息直接删除插入接口表更新供应商表ZWMS_GET_VENDOR_INFO
* *
* @param context * @param context
* 上下文 * 上下文
@ -226,7 +227,7 @@ public interface SapToWmsService {
/** /**
* Description 自制件入库信息导入 根据WMS用戶輸入的生產訂單號碼 * Description 自制件入库信息导入 根据WMS用戶輸入的生產訂單號碼
* 實時連接SAP系統根據提供的RFC程式取得相關信息如物料編號訂單數量未入庫數量入庫地點 * 實時連接SAP系統根據提供的RFC程式取得相關信息如物料編號訂單數量未入庫數量入庫地點ZWMS_GET_WO_INFO
* *
* @param context * @param context
* 上下文 * 上下文
@ -244,7 +245,7 @@ public interface SapToWmsService {
/** /**
* Description 生产订单急件上传 根据WMS用戶輸入的生產訂單號碼 * Description 生产订单急件上传 根据WMS用戶輸入的生產訂單號碼
* 根据WMS系统输入的相关参数进行当前系统日期的过帐操作并返回提示信息 * 根据WMS系统输入的相关参数进行当前系统日期的过帐操作并返回提示信息 ZWMS_GET_WO_SEND
* *
* @param context * @param context
* 上下文 * 上下文

2
lxapp/app/products/mes/ifs/sap/WOPostFailed_query.jsp

@ -227,7 +227,7 @@
<div class="page-toolbar"> <div class="page-toolbar">
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-recycle'" onclick="_upload()">批量上传</a> <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-recycle'" onclick="_upload()">批量上传</a>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-recycle'" onclick="dis_upload()">不上传</a> <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-recycle'" onclick="dis_upload()">不上传</a>
<a href="javascript:void(0);" id="btnxlsexpall" class="easyui-linkbutton" data-options="iconCls:'fa fa-info-circle'" onclick="test()">测试</a> <!-- <a href="javascript:void(0);" id="btnxlsexpall" class="easyui-linkbutton" data-options="iconCls:'fa fa-info-circle'" onclick="test()">测试</a> -->
</div> </div>
</div> </div>
<div data-options="region:'center',border:false,collapsed:false" > <div data-options="region:'center',border:false,collapsed:false" >

21
lxservice/com/noblelift/imp/products/mes/service/em/EquipmentFileServiceImpl.java

@ -96,27 +96,6 @@ public class EquipmentFileServiceImpl implements EquipmentFileService {
return srb; return srb;
} }
@Override
public ServiceResultBean queryDeviceChange(ServiceContext ctx, String account_id) {
JSONArray ja = WQLObject.getWQLObject("ENUM_EM_DeviceChangeType").query("sysisdelete = '0'")
.getResultJSONArray(0);
JSONArray ja2 = new JSONArray();
for (int i = 0; i < ja.size(); i++) {
JSONObject jo = ja.getJSONObject(i);
JSONObject jo2 = new JSONObject();
jo2.put("id", jo.optString("devicechange_code"));
jo2.put("text", jo.optString("devicechange_name"));
jo2.put("uuid", jo.optString("devicechange_uuid"));
ja2.add(jo2);
}
ServiceResultBean srb = new ServiceResultBean();
srb.setSuccess();
srb.setDesc("查询成功");
srb.addJSONArray("result", ja2);
return srb;
}
@WDKTransaction @WDKTransaction
@Override @Override
public ServiceResultBean create(ServiceContext ctx, JSONObject accountInfo, JSONObject form) { public ServiceResultBean create(ServiceContext ctx, JSONObject accountInfo, JSONObject form) {

12
lxservice/com/noblelift/imp/products/mes/service/ifs/sap/SapToWmsServiceImpl.java

@ -79,10 +79,10 @@ public class SapToWmsServiceImpl implements SapToWmsService {
String IF_SAP_NoCodePurchaseOrder = "IF_SAP_NoCodePurchaseOrder"; String IF_SAP_NoCodePurchaseOrder = "IF_SAP_NoCodePurchaseOrder";
// 无物料号采购订单接口处理表 // 无物料号采购订单接口处理表
String IF_SAP_NoCodePurchaseOrderProc = "IF_SAP_NoCodePurchaseOrderProc"; String IF_SAP_NoCodePurchaseOrderProc = "IF_SAP_NoCodePurchaseOrderProc";
// 采购订单接口合单处理表
String IF_SAP_PurchaseOrderMerge = "IF_SAP_PurchaseOrderMerge"; String IF_SAP_PurchaseOrderMerge = "IF_SAP_PurchaseOrderMerge";
WQLObject wo_IssueBillUrgent = WQLObject.getWQLObject(IF_SAP_PurchaseOrder); WQLObject wo_PurchaseOrder = WQLObject.getWQLObject(IF_SAP_PurchaseOrder);
WQLObject wo_IssueBillUrgentProc = WQLObject.getWQLObject(IF_SAP_PurchaseOrderProc); WQLObject wo_PurchaseOrderProc = WQLObject.getWQLObject(IF_SAP_PurchaseOrderProc);
WQLObject wo_PurchaseOrderMerge = WQLObject.getWQLObject(IF_SAP_PurchaseOrderMerge);
WQLObject wo_NoCodePurchaseOrder = WQLObject.getWQLObject(IF_SAP_NoCodePurchaseOrder); WQLObject wo_NoCodePurchaseOrder = WQLObject.getWQLObject(IF_SAP_NoCodePurchaseOrder);
WQLObject wo_NoCodePurchaseOrderProc = WQLObject.getWQLObject(IF_SAP_NoCodePurchaseOrderProc); WQLObject wo_NoCodePurchaseOrderProc = WQLObject.getWQLObject(IF_SAP_NoCodePurchaseOrderProc);
@ -127,7 +127,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
if (!in_exmat.equals("X")) {// 无物料 if (!in_exmat.equals("X")) {// 无物料
wo_NoCodePurchaseOrder.insert(joi); wo_NoCodePurchaseOrder.insert(joi);
} else { } else {
wo_IssueBillUrgent.insert(joi); wo_PurchaseOrder.insert(joi);
} }
JSONObject row = new JSONObject(); JSONObject row = new JSONObject();
@ -174,7 +174,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
joi.put("no_received_qty", joi.optString("UMENG")); joi.put("no_received_qty", joi.optString("UMENG"));
joi.put("instor_qty", "0"); joi.put("instor_qty", "0");
joi.put("no_instor_qty", joi.optString("UMENG")); joi.put("no_instor_qty", joi.optString("UMENG"));
wo_IssueBillUrgentProc.insert(joi); wo_PurchaseOrderProc.insert(joi);
} else { } else {
continue; continue;
} }
@ -189,7 +189,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
joi.put("no_received_qty", joi.optString("UMENG")); joi.put("no_received_qty", joi.optString("UMENG"));
joi.put("instor_qty", "0"); joi.put("instor_qty", "0");
joi.put("no_instor_qty", joi.optString("UMENG")); joi.put("no_instor_qty", joi.optString("UMENG"));
wo_IssueBillUrgentProc.insert(joi); wo_PurchaseOrderProc.insert(joi);
} }
} }
} }

8
lxservice/com/noblelift/imp/products/mes/service/lxrf/rc/ReceiveAPIServiceImpl.java

@ -94,7 +94,7 @@ public class ReceiveAPIServiceImpl implements ReceiveAPIService {
WQLObject tbObj2 = WQLObject.getWQLObject("ST_RC_ReceiveDtl"); WQLObject tbObj2 = WQLObject.getWQLObject("ST_RC_ReceiveDtl");
WQLObject tbObj3 = WQLObject.getWQLObject("ST_BS_RealStorAttr"); WQLObject tbObj3 = WQLObject.getWQLObject("ST_BS_RealStorAttr");
WQLObject tbObj4 = WQLObject.getWQLObject("MD_CS_Factory"); WQLObject tbObj4 = WQLObject.getWQLObject("MD_CS_Factory");
WQLObject tbObj5 = WQLObject.getWQLObject("IF_SAP_PurchaseOrderProc"); WQLObject wo_PurchaseOrderProc = WQLObject.getWQLObject("IF_SAP_PurchaseOrderProc");
WQLObject tbObj6 = WQLObject.getWQLObject("ST_BS_SectAttr"); WQLObject tbObj6 = WQLObject.getWQLObject("ST_BS_SectAttr");
WQLObject tbObj7 = WQLObject.getWQLObject("MD_CS_SUPPLIEREXT"); WQLObject tbObj7 = WQLObject.getWQLObject("MD_CS_SUPPLIEREXT");
WQLObject tbObj8 = WQLObject.getWQLObject("MD_PB_MeasureUnit"); WQLObject tbObj8 = WQLObject.getWQLObject("MD_PB_MeasureUnit");
@ -191,7 +191,7 @@ public class ReceiveAPIServiceImpl implements ReceiveAPIService {
String factory_uuid = dtl.optString("factory_uuid"); String factory_uuid = dtl.optString("factory_uuid");
double fact_qty = dtl.optDouble("fact_qty",0); double fact_qty = dtl.optDouble("fact_qty",0);
JSONObject jo1 = tbObj4.query("factory_uuid='"+factory_uuid+"'").uniqueResult(0); JSONObject jo1 = tbObj4.query("factory_uuid='"+factory_uuid+"'").uniqueResult(0);
JSONArray invDtls =tbObj5.query("nocrea_receive_qty<>0 and ebeln='"+inv_code+"'and matnr='"+material_code+"'and werks='"+jo1.optString("factory_code")+"'","ebelp").getResultJSONArray(0); JSONArray invDtls =wo_PurchaseOrderProc.query("nocrea_receive_qty<>0 and ebeln='"+inv_code+"'and matnr='"+material_code+"'and werks='"+jo1.optString("factory_code")+"'","ebelp").getResultJSONArray(0);
for(int n=0;n<invDtls.size();n++) { for(int n=0;n<invDtls.size();n++) {
if(fact_qty>0){ if(fact_qty>0){
@ -210,7 +210,7 @@ public class ReceiveAPIServiceImpl implements ReceiveAPIService {
fact_qty = fact_qty - nocrea_receive_qty; fact_qty = fact_qty - nocrea_receive_qty;
} }
ResultBean rb3 = tbObj5.update(jo); ResultBean rb3 = wo_PurchaseOrderProc.update(jo);
if (!rb3.isSuccess()) { if (!rb3.isSuccess()) {
throw new WDKException("更新采购订单接口表已生成收货单数量字段失败!"); throw new WDKException("更新采购订单接口表已生成收货单数量字段失败!");
} }
@ -220,7 +220,7 @@ public class ReceiveAPIServiceImpl implements ReceiveAPIService {
map.put("is_proc", "1"); map.put("is_proc", "1");
for(int n=0;n<invDtls.size();n++) { for(int n=0;n<invDtls.size();n++) {
JSONObject sap = invDtls.optJSONObject(n); JSONObject sap = invDtls.optJSONObject(n);
ResultBean rb2 = tbObj5.update(map,"id='"+sap.optString("id")+"'"); ResultBean rb2 = wo_PurchaseOrderProc.update(map,"id='"+sap.optString("id")+"'");
if (!rb2.isSuccess()) { if (!rb2.isSuccess()) {
throw new WDKException("更新采购订单接口表是否已处理字段失败!"); throw new WDKException("更新采购订单接口表是否已处理字段失败!");
} }

Loading…
Cancel
Save