Browse Source

opt:提交最新代码

master
DESKTOP-5DIJMF9\admin 2 months ago
parent
commit
f1dd60bf7e
  1. 13
      lxapi/com/noblelift/imp/products/mes/api/md/me/api/MaterialService.java
  2. 59
      lxapp/app/products/mes/md/me/material_query.jsp
  3. 2
      lxapp/app/products/mes/md/me/material_update.jsp
  4. 27
      lxservice/com/noblelift/imp/products/mes/service/ifs/sap/SapToWmsServiceImpl.java
  5. 36
      lxservice/com/noblelift/imp/products/mes/service/md/me/MaterialServiceImpl.java

13
lxapi/com/noblelift/imp/products/mes/api/md/me/api/MaterialService.java

@ -134,6 +134,19 @@ public interface MaterialService {
* @return
*/
public ServiceResultBean delete(ServiceContext ctx, String accountId, String material_uuid);
/**
*
* @discription 删除物料维护页面的grid数据
* @author lmyu
* @created 2018年11月1日 下午4:21:23
* @param ctx
* 上下文
* @param accountId
* @param material_uuid
* 主键
* @return
*/
public ServiceResultBean add1061(ServiceContext ctx, String accountId, String material_uuid);
/**
*

59
lxapp/app/products/mes/md/me/material_query.jsp

@ -164,16 +164,53 @@
}
//添加物料
function add(){
$.openInTab({
id:$.getUUID(),
title : '新增物料',
height:600,
width:1200,
url : './products/mes/md/me/material_insert.jsp',
queryParams : {
class_uuid:class_uuid
}
var row = $.grid_getSelected({
id : _gridid
});
if(row == null){
alert("请先选择一条物料信息!");
return;
}
confirmDialog('是否确认新增1061工厂物料!',function(){
//打开旋转
$.wait_open();
//请求参数
var dataParam = {
_SRVNAME:'service.md.material'
,_SRVMETHOD:'add1061'
,_DATA:$.json2str({
accountId:$.getSessionUser().account_id,
deleteId: row.material_uuid
})
};
//加载数据
$.cuajax({
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime()
,method:"post"
,timeout:WDK_Timeout
,data:dataParam
,success:function(result) {
//关闭旋转
$.wait_close();
var jres = $.str2json(result);
//操作成功
if (jres.code == "1") {
alert(jres.desc);
//删除后重新请求
query("");
}else{
alert(jres.desc);
}
},
error:function(result){
$.wait_close();
alert('网络错误!result='+result);
}
});
},function(){});
}
//修改供应商数据
@ -406,10 +443,10 @@
</div>
<div class="edit-page-toolbar" style="line-height:30px;">
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-check-square'" onclick="sametime()">同步</a>
<!--<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="add()">新增</a>-->
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="add()">新增1061物料</a>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-info-circle'" onclick="enable('0')">启用</a>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-info-circle'" onclick="enable('1')">停用</a>
<!-- <div style="position: absolute;top:0;bottom:0;right:0;padding-top:4px;"><div id="excel_div">数据导入</div></div> -->
<div style="position: absolute;top:0;bottom:0;right:0;padding-top:4px;"><div id="excel_div">数据导入</div></div>
</div>
</div>
<div data-options="region:'west',border:true,collapsed:false" style="width:370px;background:#fff;" >

2
lxapp/app/products/mes/md/me/material_update.jsp

@ -537,7 +537,7 @@
<div class="formgroup">
<label class="required">物料名称:</label>
<div>
<input type="text" class="easyui-validatebox nospaceinside" id="material_name" name="material_name" value="" data-options="required:true,tipPosition:'bottom'" disabled/>
<input type="text" class="easyui-validatebox nospaceinside" id="material_name" name="material_name" value="" data-options="required:true,tipPosition:'bottom'"/>
</div>
</div>
</div>

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

@ -11,6 +11,7 @@ import org.wdk.core.bean.WDKLogger;
import org.wdk.core.env.context.ServiceContext;
import org.wdk.core.spring.annotation.WDKTransaction;
import org.wdk.core.util.uString;
import org.wdk.core.wql.core.bean.ResultBean;
import org.wdk.core.wql.core.bean.WQLData;
import org.wdk.core.wql.core.bean.WQLObject;
@ -237,8 +238,8 @@ public class SapToWmsServiceImpl implements SapToWmsService {
String IF_SAP_ProductOrder = "IF_SAP_ProductOrder";
// 生产订单接口处理表
String IF_SAP_ProductOrderProc = "IF_SAP_ProductOrderProc";
WQLObject wo_IssueBillUrgent = WQLObject.getWQLObject(IF_SAP_ProductOrder);
WQLObject wo_IssueBillUrgentProc = WQLObject.getWQLObject(IF_SAP_ProductOrderProc);
WQLObject wo_IF_SAP_ProductOrder = WQLObject.getWQLObject(IF_SAP_ProductOrder);
WQLObject wo_IF_SAP_ProductOrderProc = WQLObject.getWQLObject(IF_SAP_ProductOrderProc);
logger.debug("数据数量:" + tblexport.getNumRows());
for (int i = 0; i < tblexport.getNumRows(); i++) {
tblexport.setRow(i);
@ -261,7 +262,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
joi.put("MEINS", tblexport.getString("MEINS"));
joi.put("LGORT", tblexport.getString("LGORT"));
// 新增
wo_IssueBillUrgent.insert(joi);
wo_IF_SAP_ProductOrder.insert(joi);
JSONObject row = WdkUtil.queryOneByAttr(whereExpr.toJSONArray(), "", IF_SAP_ProductOrderProc);
if (row == null || row.optDouble("crea_receive_qty") == 0) {
@ -277,7 +278,7 @@ public class SapToWmsServiceImpl implements SapToWmsService {
joi.put("no_instor_qty", qty + "");
joi.put("importor_id", "0000");
joi.put("import_time", WDK.getDateTime());
wo_IssueBillUrgentProc.insert(joi);
wo_IF_SAP_ProductOrderProc.insert(joi);
}
}
}
@ -790,6 +791,8 @@ public class SapToWmsServiceImpl implements SapToWmsService {
jo = new JSONObject();
jo.put("material_code", joi.optString("MATNR"));
String material_name = joi.optString("MAKTX");
material_name = material_name.replace("\"","’");
material_name = material_name.replace("'","’");
jo.put("material_name", material_name);
JSONObject unit = WQLObject.getWQLObject("MD_PB_MeasureUnit")
@ -855,18 +858,23 @@ public class SapToWmsServiceImpl implements SapToWmsService {
ST_BS_WMSMaterialIsDull.insert(wmsmaterial);
//暂时屏蔽1061的物料
wmsmaterial.put("wmsmaterial_uuid", "uuid-" + MATNR + "-1061");
/*wmsmaterial.put("wmsmaterial_uuid", "uuid-" + MATNR + "-1061");
wmsmaterial.put("factory_uuid", "1061");
ST_BS_WMSMaterial.insert(wmsmaterial);
wmsmaterial.put("is_dull", "0");
ST_BS_WMSMaterialIsDull.insert(wmsmaterial);
ST_BS_WMSMaterialIsDull.insert(wmsmaterial);*/
} else {// 更新
jo.put("sysupdatetime", datanow);
jo.put("sysupdateuseruuid", "0000");
jo.put("material_name", joi.optString("MAKTX"));
String material_name = joi.optString("MAKTX");
material_name = material_name.replace("\"","’");
material_name = material_name.replace("'","’");
jo.put("material_name", material_name);
JSONObject unit = WQLObject.getWQLObject("MD_PB_MeasureUnit")
.query("unit_name = '" + joi.optString("MEINS") + "'").uniqueResult(0);
jo.put("base_unit_uuid", unit.optString("measure_unit_uuid"));
@ -905,6 +913,11 @@ public class SapToWmsServiceImpl implements SapToWmsService {
jo.put("sect_name", sect.optString("sect_name", ""));
}
MD_ME_MaterialBase.update(jo);
//更新物料唯一表
HashMap<String, String> map = new HashMap<String, String>();
map.put("material_name", material_name);
ResultBean rb2 = ST_BS_WMSMaterial.update(map, "material_code = ?",
new String[] { MATNR });
}
}
}

36
lxservice/com/noblelift/imp/products/mes/service/md/me/MaterialServiceImpl.java

@ -229,7 +229,41 @@ public class MaterialServiceImpl implements MaterialService {
}
return srb;
}
@WDKTransaction
@Override
public ServiceResultBean add1061(ServiceContext ctx, String accountId, String material_uuid) {
//物料基本信息接口表
WQLObject wo_ST_BS_WMSMaterial = WQLObject.getWQLObject("ST_BS_WMSMaterial");
WQLObject wo_ST_BS_WMSMaterialIsDull = WQLObject.getWQLObject("ST_BS_WMSMaterialIsDull");
JSONObject jo = WQLObject.getWQLObject("MD_ME_MaterialBase")
.query("material_uuid = ?", new String[] { material_uuid }, "").uniqueResult(0);
if(jo != null){
if (jo.optString("sysisdelete").equals("1")) {
throw new WDKException("物料已被删除 ");
}
String MATNR = jo.optString("material_code");
JSONObject wmsmaterial = new JSONObject();
wmsmaterial.put("wmsmaterial_uuid", "uuid-" + MATNR + "-1061");
wmsmaterial.put("material_uuid", "uuid-" + MATNR);
wmsmaterial.put("material_code", MATNR);
wmsmaterial.put("material_name", jo.optString("material_name"));
wmsmaterial.put("factory_uuid", "1061");
wo_ST_BS_WMSMaterial.insert(wmsmaterial);
wmsmaterial.put("is_dull", "0");
wo_ST_BS_WMSMaterialIsDull.insert(wmsmaterial);
}
ServiceResultBean srb = new ServiceResultBean();
srb.setSuccess();
srb.setDesc("新增1061工厂物料成功!");
return srb;
}
@WDKTransaction
@Override
public ServiceResultBean delete(ServiceContext ctx, String accountId, String material_uuid) {

Loading…
Cancel
Save