Commit 0f3ccdbd authored by 刘学辉's avatar 刘学辉

物料主数据变更或扩展的调整

parent 186edd7e
...@@ -183,7 +183,11 @@ function saveForm(status) { ...@@ -183,7 +183,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
// _self.close(); // _self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -199,7 +199,11 @@ function saveForm(status) { ...@@ -199,7 +199,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
//_self.close(); //_self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -42,6 +42,10 @@ function loadNonProdApplyListGrid() { ...@@ -42,6 +42,10 @@ function loadNonProdApplyListGrid() {
Public.tip("请选择一条已审核后数据!") Public.tip("请选择一条已审核后数据!")
return false; return false;
} }
if(result.distribute!==3){
Public.tip("请选择一条已办结的数据!")
return false;
}
modifyHandler(result.id,result.matnr); modifyHandler(result.id,result.matnr);
//publishDatas('确实要发布数据吗?', result.id); //publishDatas('确实要发布数据吗?', result.id);
} }
...@@ -54,6 +58,10 @@ function loadNonProdApplyListGrid() { ...@@ -54,6 +58,10 @@ function loadNonProdApplyListGrid() {
Public.tip("请选择一条已审核后数据!") Public.tip("请选择一条已审核后数据!")
return false; return false;
} }
if(result.distribute!==3){
Public.tip("请选择一条已办结的数据!")
return false;
}
extendedHandler(result.id,result.matnr);; extendedHandler(result.id,result.matnr);;
} }
} }
...@@ -74,8 +82,6 @@ function loadNonProdApplyListGrid() { ...@@ -74,8 +82,6 @@ function loadNonProdApplyListGrid() {
columns: [ columns: [
{display: "申请单编号", name: "billCode", width: 150, minWidth: 60, type: "string", align: "left"}, {display: "申请单编号", name: "billCode", width: 150, minWidth: 60, type: "string", align: "left"},
{display: "申请状态", name: "statusTextView", width: 60, minWidth: 60, type: "string", align: "left"}, {display: "申请状态", name: "statusTextView", width: 60, minWidth: 60, type: "string", align: "left"},
{display: "申请人", name: "personMemberName", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "申请部门", name: "deptName", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "申请日期", name: "fillinDate", width: 120, minWidth: 60, type: "date", align: "left"}, {display: "申请日期", name: "fillinDate", width: 120, minWidth: 60, type: "date", align: "left"},
{display: "类型", name: "kind", width: 80, minWidth: 60, type: "string", align: "left", {display: "类型", name: "kind", width: 80, minWidth: 60, type: "string", align: "left",
render:function(item){ render:function(item){
...@@ -102,9 +108,8 @@ function loadNonProdApplyListGrid() { ...@@ -102,9 +108,8 @@ function loadNonProdApplyListGrid() {
return result; return result;
} }
}, },
{display: "批准人", name: "approver", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "批准日期", name: "approvalDate", width: 140, minWidth: 60, type: "date", align: "left"},
{display: "通用品名", name: "genericName", width: 200, minWidth: 60, type: "string", align: "left"}, {display: "通用品名", name: "genericName", width: 200, minWidth: 60, type: "string", align: "left"},
{display: "汉语品名", name: "maktx", width: 200, minWidth: 60, type: "string", align: "left"},
{display: "适用标准", name: "applicableStandard", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "适用标准", name: "applicableStandard", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "基本计量单位", name: "baseUnitTextView", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "基本计量单位", name: "baseUnitTextView", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "规格", name: "specifications", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "规格", name: "specifications", width: 140, minWidth: 60, type: "string", align: "left"},
...@@ -116,6 +121,10 @@ function loadNonProdApplyListGrid() { ...@@ -116,6 +121,10 @@ function loadNonProdApplyListGrid() {
{display: "物品属性", name: "itemAttributesTextView", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "物品属性", name: "itemAttributesTextView", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "业务用途", name: "businessUsageTextView", width: 300, minWidth: 60, type: "string", align: "left"}, {display: "业务用途", name: "businessUsageTextView", width: 300, minWidth: 60, type: "string", align: "left"},
{display: "文本说明", name: "textDescription", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "文本说明", name: "textDescription", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "批准人", name: "approver", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "批准日期", name: "approvalDate", width: 140, minWidth: 60, type: "date", align: "left"},
{display: "申请人", name: "personMemberName", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "申请部门", name: "deptName", width: 120, minWidth: 60, type: "string", align: "left"},
/* {display: "是否分发", name: "distribute", width: 80, minWidth: 60, type: "string", align: "left", /* {display: "是否分发", name: "distribute", width: 80, minWidth: 60, type: "string", align: "left",
render:function(item){ render:function(item){
var result = "待处理"; var result = "待处理";
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<x:inputC name="proofingApplyNo" required="false" label="申请单号" labelCol="1"/> <x:inputC name="proofingApplyNo" required="false" label="申请单号" labelCol="1"/>
<x:inputC name="genericName" required="false" label="通用品名" labelCol="1"/> <x:inputC name="genericName" required="false" label="通用品名" labelCol="1"/>
<x:inputC name="matnr" required="false" label="物料编码" labelCol="1"/> <x:inputC name="matnr" required="false" label="物料编码" labelCol="1"/>
<x:inputC name="maktx" required="false" label="汉语品名" labelCol="1"/>
<x:selectC name="maintenanceType" label="维护类型" labelCol="1" fieldCol="2" dictionary="maintainType"/> <x:selectC name="maintenanceType" label="维护类型" labelCol="1" fieldCol="2" dictionary="maintainType"/>
<x:selectC name="status" label="审批状态" labelCol="1" fieldCol="2" dictionary="bizBillStatus"/> <x:selectC name="status" label="审批状态" labelCol="1" fieldCol="2" dictionary="bizBillStatus"/>
<x:searchButtons/> <x:searchButtons/>
......
...@@ -235,7 +235,11 @@ function saveForm(status) { ...@@ -235,7 +235,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
// _self.close(); // _self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -181,7 +181,11 @@ function saveForm(status) { ...@@ -181,7 +181,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
// _self.close(); // _self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -62,7 +62,7 @@ function initializate() { ...@@ -62,7 +62,7 @@ function initializate() {
$('input[name="isAll"]').change(function () { /* $('input[name="isAll"]').change(function () {
//alert($(this).is(':checked')); //alert($(this).is(':checked'));
if ($(this).is(':checked')) { alert(1); if ($(this).is(':checked')) { alert(1);
$("input[name='businessUsage']").each(function(){ $("input[name='businessUsage']").each(function(){
...@@ -74,7 +74,7 @@ function initializate() { ...@@ -74,7 +74,7 @@ function initializate() {
$(this).attr("checked",false); $(this).attr("checked",false);
}) })
} }
}); });*/
var dictUsage=dictUsages.split(";"); var dictUsage=dictUsages.split(";");
$('input[name="businessUsage"]').change(function () { $('input[name="businessUsage"]').change(function () {
...@@ -187,19 +187,25 @@ function loadGrid() { ...@@ -187,19 +187,25 @@ function loadGrid() {
*/ */
function saveForm(status) { function saveForm(status) {
// alert($("#businessCode").val()); // alert($("#businessCode").val());
$("#active").val(status); // let extendedData = getExtendedData();
let extendedData = getExtendedData(); // debugger
if (!extendedData) return false; // if (!extendedData) return false;
var _self = this; var _self = this;
$("#active").val(status);
$('#submitForm').ajaxSubmit({ $('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax', url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
param: extendedData, //param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result=="")
if (status==1) { {
$("#buttonBox").remove(); Public.successTip("保存成功!");
} } else {
Public.tip(data.result);
}
if (status==1) {
$("#buttonBox").remove();
}
_self.close(); _self.close();
UICtrl.reloadTabById('homepage'); UICtrl.reloadTabById('homepage');
} }
...@@ -395,6 +401,7 @@ function bindEvent() { ...@@ -395,6 +401,7 @@ function bindEvent() {
function getExtendedData() { function getExtendedData() {
let msg = "["; let msg = "[";
let isUndefined = false; let isUndefined = false;
let extendedData = {};
/* let deptStaffResult = DataUtil.getGridData({ /* let deptStaffResult = DataUtil.getGridData({
gridManager: gridManager, gridManager: gridManager,
isAllData: true, isAllData: true,
...@@ -406,22 +413,21 @@ function getExtendedData() { ...@@ -406,22 +413,21 @@ function getExtendedData() {
return true; return true;
} }
}); */ }); */
let deptStaffResult=gridManager.getData(); let deptStaffResult = gridManager.getData();
for (var i=0;i<deptStaffResult.length;i++) { for (var i = 0; i < deptStaffResult.length; i++) {
// alert(deptStaffResult[i].deptName); alert(deptStaffResult[i].userCode); // alert(deptStaffResult[i].deptName); alert(deptStaffResult[i].userCode);
if (deptStaffResult[i].userCode==undefined) { if (deptStaffResult[i].userCode == undefined) {
//if (isUndefined) { //if (isUndefined) {
isUndefined=true; isUndefined = true;
break; break;
} }
} }
if (isUndefined){ if (isUndefined) {
Public.tip(deptStaffResult[i].deptName+'未选择对应分发人员'); Public.tip(deptStaffResult[i].deptName + '未选择对应分发人员');
return false return false
} }
let extendedData = {}; extendedData.deptStaff = Public.encodeJSONURI(deptStaffResult);
extendedData.deptStaff = Public.encodeJSONURI(deptStaffResult); return extendedData;
return extendedData;
} }
......
...@@ -153,9 +153,9 @@ ...@@ -153,9 +153,9 @@
fieldCol="5" disabled="true"/--> fieldCol="5" disabled="true"/-->
<!--x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1" <!--x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1"
fieldCol="5"/--> fieldCol="5"/-->
<c:if test="${applyType==2}"> <c:if test="${applyType==2&&active==1}">
<div class="hg-form-row"> <div class="hg-form-row">
<x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1" <x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11"/> fieldCol="11"/>
</div> </div>
</c:if> </c:if>
...@@ -165,9 +165,9 @@ ...@@ -165,9 +165,9 @@
fieldCol="11" disabled="true"/> fieldCol="11" disabled="true"/>
</div> </div>
</c:if> </c:if>
<c:if test="${applyType==0&&active==1}"> <c:if test="${applyType==0}">
<div class="hg-form-row"> <div class="hg-form-row">
<x:checkbox name="isAll" label="是否全选" /> <!--x:checkbox name="isAll" label="是否全选" /-->
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1" <x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="8"/> fieldCol="8"/>
</div> </div>
...@@ -245,12 +245,13 @@ ...@@ -245,12 +245,13 @@
<x:inputC name="bstrf" label="舍入值" labelCol="1" fieldCol="2"/> <x:inputC name="bstrf" label="舍入值" labelCol="1" fieldCol="2"/>
<x:selectC name="beskz" label="获取类型" labelCol="1" fieldCol="2" dictionary="beskz"/> <x:selectC name="beskz" label="获取类型" labelCol="1" fieldCol="2" dictionary="beskz"/>
<x:inputC name="sobsl" label="特殊获取方式" labelCol="1" fieldCol="2"/> <x:inputC name="sobsl" label="特殊获取方式" labelCol="1" fieldCol="2"/>
<x:inputC name="lgpro" label="默认生产库存地" labelCol="1" fieldCol="2"/> <x:inputC name="lgpro" label="默认生产库存地" labelCol="2" fieldCol="2"/>
<x:selectC name="rgekz" label="倒冲标志" labelCol="1" fieldCol="2" dictionary="rgekz"/> <x:selectC name="rgekz" label="倒冲标志" labelCol="2" fieldCol="2" dictionary="rgekz"/>
<x:inputC name="lgfsb" label="默认采购收货库存地" labelCol="1" fieldCol="2"/> <x:inputC name="lgfsb" label="默认采购收货库存地" labelCol="2" fieldCol="2"/>
<x:inputC name="webaz" label="收货处理天数" labelCol="1" fieldCol="2"/> <x:inputC name="webaz" label="收货处理天数" labelCol="1" fieldCol="1"/>
<x:inputC name="dzeit" label="自制时间" labelCol="1" fieldCol="2"/> <x:inputC name="dzeit" label="自制时间" labelCol="1" fieldCol="1"/>
<x:inputC name="plifz" label="外部采购交货时间" labelCol="1" fieldCol="2"/> <x:inputC name="plifz" label="外部采购交货时间" labelCol="2" fieldCol="2"/>
<x:selectC name="diskz" label="库存地MRP标识" labelCol="2" fieldCol="2" dictionary="diskz"/>
<x:inputC name="fhori" label="排程边际码" labelCol="1" fieldCol="2"/> <x:inputC name="fhori" label="排程边际码" labelCol="1" fieldCol="2"/>
<x:inputC name="eisbe" label="安全库存" labelCol="1" fieldCol="2"/> <x:inputC name="eisbe" label="安全库存" labelCol="1" fieldCol="2"/>
<x:inputC name="eislo" label="最小安全库存" labelCol="1" fieldCol="2"/> <x:inputC name="eislo" label="最小安全库存" labelCol="1" fieldCol="2"/>
...@@ -259,7 +260,7 @@ ...@@ -259,7 +260,7 @@
<x:inputC name="wzeit" label="补货提前天数" labelCol="1" fieldCol="2"/> <x:inputC name="wzeit" label="补货提前天数" labelCol="1" fieldCol="2"/>
<x:inputC name="altsl" label="BOM选择方法" labelCol="1" fieldCol="2"/> <x:inputC name="altsl" label="BOM选择方法" labelCol="1" fieldCol="2"/>
<x:selectC name="sbdkz" label="独立/集中" labelCol="1" fieldCol="2" dictionary="sbdkz"/> <x:selectC name="sbdkz" label="独立/集中" labelCol="1" fieldCol="2" dictionary="sbdkz"/>
<x:selectC name="diskz" label="库存地MRP标识" labelCol="1" fieldCol="2" dictionary="diskz"/>
</div> </div>
</div> </div>
...@@ -268,9 +269,9 @@ ...@@ -268,9 +269,9 @@
<div class="hg-form-cols"> <div class="hg-form-cols">
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="ausme" label="投料计量单位" labelCol="1" fieldCol="2"/> <x:inputC name="ausme" label="投料计量单位" labelCol="1" fieldCol="2"/>
<x:inputC name="umrenProd" label="转换分母(生产)" labelCol="1" fieldCol="2"/> <x:inputC name="umrenProd" label="转换分母(生产)" labelCol="2" fieldCol="2"/>
<x:inputC name="umrezProd" label="转换分子(生产)" labelCol="1" fieldCol="2"/> <x:inputC name="umrezProd" label="转换分子(生产)" labelCol="2" fieldCol="2"/>
<x:selectC name="sfcpf" label="生产计划参数文件" labelCol="1" fieldCol="2" dictionary="sfcpf"/> <x:selectC name="sfcpf" label="生产计划参数文件" labelCol="2" fieldCol="2" dictionary="sfcpf"/>
<x:selectC name="insmk" label="过账到质检" labelCol="1" fieldCol="2" dictionary="insmk"/> <x:selectC name="insmk" label="过账到质检" labelCol="1" fieldCol="2" dictionary="insmk"/>
</div> </div>
</div> </div>
...@@ -293,13 +294,14 @@ ...@@ -293,13 +294,14 @@
<x:hidden name="lgortProfit"/> <x:hidden name="lgortProfit"/>
<x:selectC name="lgnum" label="仓库号" labelCol="1" fieldCol="2" dictionary="lgnum"/> <x:selectC name="lgnum" label="仓库号" labelCol="1" fieldCol="2" dictionary="lgnum"/>
<x:inputC name="lgtypName" label="存储类型" labelCol="1" fieldCol="2"/> <x:inputC name="lgtypName" label="存储类型" labelCol="1" fieldCol="2"/>
<x:inputC name="ltkza" label="存货下架存储类型" labelCol="1" fieldCol="2"/>
<x:inputC name="ltkze" label="存货上架存储类型" labelCol="1" fieldCol="2"/>
<x:inputC name="lgbkz" label="存储分区标识" labelCol="1" fieldCol="2"/> <x:inputC name="lgbkz" label="存储分区标识" labelCol="1" fieldCol="2"/>
<x:inputC name="lhmg1" label="仓库设施1存储数量" labelCol="1" fieldCol="2"/> <x:inputC name="ltkza" label="存货下架存储类型" labelCol="2" fieldCol="2"/>
<x:inputC name="lhme1Name" label="仓库设施1存储单位" labelCol="1" fieldCol="2" wrapper="select"/> <x:inputC name="ltkze" label="存货上架存储类型" labelCol="2" fieldCol="2"/>
<x:inputC name="lhmg1" label="仓库设施1存储数量" labelCol="2" fieldCol="2"/>
<x:inputC name="lhme1Name" label="仓库设施1存储单位" labelCol="2" fieldCol="2" wrapper="select"/>
<x:hidden name="lhme1"/> <x:hidden name="lhme1"/>
<x:inputC name="lety1" label="仓库设施1类型" labelCol="1" fieldCol="2"/> <x:inputC name="lety1" label="仓库设施1类型" labelCol="2" fieldCol="2"/>
</div> </div>
</div> </div>
...@@ -333,7 +335,7 @@ ...@@ -333,7 +335,7 @@
<div class="hg-form-cols"> <div class="hg-form-cols">
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="ekalr" label="数量结构" labelCol="1" fieldCol="2"/> <x:inputC name="ekalr" label="数量结构" labelCol="1" fieldCol="2"/>
<x:inputC name="ncost" label="不参与成本核算" labelCol="1" fieldCol="2"/> <x:inputC name="ncost" label="不参与核算" labelCol="1" fieldCol="2"/>
<x:inputC name="hkmat" label="物料来源" labelCol="1" fieldCol="2"/> <x:inputC name="hkmat" label="物料来源" labelCol="1" fieldCol="2"/>
<x:inputC name="awsls" label="差异码" labelCol="1" fieldCol="2"/> <x:inputC name="awsls" label="差异码" labelCol="1" fieldCol="2"/>
</div> </div>
......
...@@ -194,7 +194,11 @@ function saveForm(status) { ...@@ -194,7 +194,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
//_self.close(); //_self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -187,7 +187,11 @@ function saveForm(status) { ...@@ -187,7 +187,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
// _self.close(); // _self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -213,7 +213,11 @@ function saveForm(status) { ...@@ -213,7 +213,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
// _self.close(); // _self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -208,7 +208,11 @@ function saveForm(status) { ...@@ -208,7 +208,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
//_self.close(); //_self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -188,7 +188,11 @@ function saveForm(status) { ...@@ -188,7 +188,11 @@ function saveForm(status) {
param: extendedData, param: extendedData,
success: function (data) { success: function (data) {
$("#applyDeptId").val(data.applyDeptId); $("#applyDeptId").val(data.applyDeptId);
Public.successTip("保存成功!"); if (data.result==""){
Public.successTip("保存成功!");
} else {
Public.tip(data.result);
}
//_self.close(); //_self.close();
if (status==1) { if (status==1) {
$("#buttonBox").remove(); $("#buttonBox").remove();
......
...@@ -169,7 +169,7 @@ function loadSuppliersPayListGrid() { ...@@ -169,7 +169,7 @@ function loadSuppliersPayListGrid() {
display: "中心记帐冻结", name: "sperrTextView", width: 100, minWidth: 60, type: "String", align: "left", display: "中心记帐冻结", name: "sperrTextView", width: 100, minWidth: 60, type: "String", align: "left",
editor: { editor: {
type: 'dictionary', type: 'dictionary',
data: {name: 'insmk'}, data: {name: 'sperr'},
textField: 'sperrTextView', textField: 'sperrTextView',
valueField: 'sperr', valueField: 'sperr',
required: false, required: false,
...@@ -182,8 +182,8 @@ function loadSuppliersPayListGrid() { ...@@ -182,8 +182,8 @@ function loadSuppliersPayListGrid() {
display: "对公司代码过帐冻结", name: "sperrBTextView", width: 140, minWidth: 60, type: "String", align: "left", display: "对公司代码过帐冻结", name: "sperrBTextView", width: 140, minWidth: 60, type: "String", align: "left",
editor: { editor: {
type: 'dictionary', type: 'dictionary',
data: {name: 'insmk'}, data: {name: 'sperrB'},
textField: 'insmkTextView', textField: 'sperrBTextView',
valueField: 'sperrB', valueField: 'sperrB',
required: false, required: false,
render: function (item) { render: function (item) {
......
...@@ -87,9 +87,8 @@ ...@@ -87,9 +87,8 @@
<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/> <x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>
<x:inputC name="stenr" label="责任税务部门的税收编号" labelCol="2" fieldCol="2" required="true"/> <x:inputC name="stenr" label="责任税务部门的税收编号" labelCol="2" fieldCol="2" required="true"/>
<x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="1" dictionary="insmk"/> <x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="1" dictionary="sperr"/>
<x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB"/>
<x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="insmk"/>
</div> </div>
......
...@@ -147,6 +147,9 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes ...@@ -147,6 +147,9 @@ public class BsnMessageApplicationImpl extends BaseApplication implements BsnMes
public Map<String, Object> circulate(String meId) { public Map<String, Object> circulate(String meId) {
BsnMessageExecute execute = this.getExecuteByMeId(meId); BsnMessageExecute execute = this.getExecuteByMeId(meId);
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
if (execute==null){
return paramMap;
}
paramMap.put("deptCode", execute.getBusinessCode()); paramMap.put("deptCode", execute.getBusinessCode());
paramMap.put("active", execute.getActive()); paramMap.put("active", execute.getActive());
paramMap.put("meId", execute.getId()); paramMap.put("meId", execute.getId());
......
...@@ -290,6 +290,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA ...@@ -290,6 +290,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
SapNonProdApplyDept applyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getId()); SapNonProdApplyDept applyDept=nonProdApplyDeptApplication.getNonProdApplyDeptByBaseInfoId(nonProdApplyBaseInfo.getId());
if (applyDept!=null){ if (applyDept!=null){
nonProdApplyBaseInfo.setApplyDeptId(applyDept.getApplyDeptId()); nonProdApplyBaseInfo.setApplyDeptId(applyDept.getApplyDeptId());
nonProdApplyBaseInfo.setMatnr(applyDept.getMatnr());
} }
return nonProdApplyBaseInfo; return nonProdApplyBaseInfo;
} }
...@@ -314,6 +315,12 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA ...@@ -314,6 +315,12 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
model.addCriteria(" and t.generic_name =:genericName"); model.addCriteria(" and t.generic_name =:genericName");
model.putParam("genericName", query.getGenericName()); model.putParam("genericName", query.getGenericName());
} }
if (query.getMaktx() != null) {
model.addCriteria(" and ad.maktx like:maktx");
model.putLikeParam("maktx", query.getMaktx());
}
model.putDictionary("maintenanceType", DictUtil.getDictionary("maintainType")); model.putDictionary("maintenanceType", DictUtil.getDictionary("maintainType"));
model.putDictionary("baseUnit", DictUtil.getDictionary("measuringUnit")); model.putDictionary("baseUnit", DictUtil.getDictionary("measuringUnit"));
model.putDictionary("itemAttributes", DictUtil.getDictionary("suppliesType")); model.putDictionary("itemAttributes", DictUtil.getDictionary("suppliesType"));
......
...@@ -55,6 +55,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements ...@@ -55,6 +55,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
@Override @Override
public Map<String,Object> saveSapNonProdApplyDept(SDO sdo){ public Map<String,Object> saveSapNonProdApplyDept(SDO sdo){
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("result","");
String businessCode=sdo.getString("businessCode"); String businessCode=sdo.getString("businessCode");
String baseId=sdo.getString("id"); String baseId=sdo.getString("id");
String genericName=sdo.getString("genericName"); String genericName=sdo.getString("genericName");
...@@ -166,7 +167,8 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements ...@@ -166,7 +167,8 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
} }
} }
if (canSended) { if (canSended) {
sendSapData(nonProdApplyBaseInfo, nonProdApplyDept); String backStr=sendSapData(nonProdApplyBaseInfo, nonProdApplyDept);
map.put("result",backStr);
} }
} }
map.put("applyDeptId",nonProdApplyDept.getApplyDeptId()); map.put("applyDeptId",nonProdApplyDept.getApplyDeptId());
...@@ -268,15 +270,15 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements ...@@ -268,15 +270,15 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
/** /**
* 远程调用sap接口,传递数据 * 远程调用sap接口,传递数据
*/ */
public void sendSapData(NonProdApplyBaseInfo baseInfo,SapNonProdApplyDept applyDept) { public String sendSapData(NonProdApplyBaseInfo baseInfo,SapNonProdApplyDept applyDept) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
String backStr="";
ProdApplyToSapVO sapVO=new ProdApplyToSapVO(); ProdApplyToSapVO sapVO=new ProdApplyToSapVO();
ClassHelper.copyProperties(baseInfo,sapVO); ClassHelper.copyProperties(baseInfo,sapVO);
ClassHelper.copyProperties(applyDept,sapVO); ClassHelper.copyProperties(applyDept,sapVO);
sapVO.setUpdkz("I"); sapVO.setUpdkz("I");
if (sapVO.getInsmk().equals("0")){ if ("0".equals(sapVO.getInsmk())){
sapVO.setInsmk(""); sapVO.setInsmk("");
} }
Map<String,Object> unitsaleMap = new HashMap<>(); Map<String,Object> unitsaleMap = new HashMap<>();
...@@ -321,25 +323,29 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements ...@@ -321,25 +323,29 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
applyDept.setMatnr((String) backMap.get("MESSAGE_V1")); applyDept.setMatnr((String) backMap.get("MESSAGE_V1"));
} }
this.nonProdApplyDeptRepository.save(applyDept); this.nonProdApplyDeptRepository.save(applyDept);
baseInfo.setDistribute(3); baseInfo.setDistribute(3); //已办结
nonProdApplyBaseInfoRepository.save(baseInfo); nonProdApplyBaseInfoRepository.save(baseInfo);
} else { } else {
//更改分发状态 //更改分发状态
baseInfo.setDistribute(1); baseInfo.setDistribute(1);
backStr="传输失败:" + backMap.get("MESSAGE");
nonProdApplyBaseInfoRepository.save(baseInfo); nonProdApplyBaseInfoRepository.save(baseInfo);
throw new RuntimeException("数据传输失败,请稍后手动重试!" + backMap.get("MESSAGE")); //throw new RuntimeException(backStr);
} }
} catch (Exception e) { } catch (Exception e) {
backMap.put("type", "E"); backMap.put("type", "E");
backMap.put("message",applyDept.getMatnr()+":"+e.getMessage()); backMap.put("message",applyDept.getMatnr()+":"+e.getMessage());
//sapMutualEpLogApplication.saveSapMutualEpLog(resultMap); //sapMutualEpLogApplication.saveSapMutualEpLog(resultMap);
throw new RuntimeException("数据传输失败请检查数据后重试!" + e.getMessage()); backStr="传输失败:" + e.getMessage();
throw new RuntimeException(backStr);
} finally { } finally {
sapMutualEpLogApplication.saveSapMutualEpLog(backMap); sapMutualEpLogApplication.saveSapMutualEpLog(backMap);
// String createdById = "5EEB2DC861694A65933CB4CE9A8D870A@C18E23AAAA6940E09DF7C122332C51E0"; // String createdById = "5EEB2DC861694A65933CB4CE9A8D870A@C18E23AAAA6940E09DF7C122332C51E0";
Operator operator = operatorApplication.createOperatorByPersonMemberId(baseInfo.getPersonMemberId()); Operator operator = operatorApplication.createOperatorByPersonMemberId(baseInfo.getPersonMemberId());
saveBsnMessageData(baseInfo,applyDept,operator,backMap.get("message").toString()); saveBsnMessageData(baseInfo,applyDept,operator,backMap.get("message").toString());
return backStr;
} }
} }
final void mapCopy(Map resultMap, Map paramMap) { final void mapCopy(Map resultMap, Map paramMap) {
......
...@@ -62,23 +62,26 @@ public class NonProdApplyController extends CommonController { ...@@ -62,23 +62,26 @@ public class NonProdApplyController extends CommonController {
nonProdApplyBaseInfo.setMaintenanceType("new"); nonProdApplyBaseInfo.setMaintenanceType("new");
nonProdApplyBaseInfo.setApplyType("0"); nonProdApplyBaseInfo.setApplyType("0");
nonProdApplyBaseInfo.setKind("materiel"); nonProdApplyBaseInfo.setKind("materiel");
if (StringUtil.isNotBlank(extended)){ //扩展流程 if (StringUtil.isNotBlank(extended)) { //扩展流程
nonProdApplyBaseInfo = nonProdApplyApplication.loadNonProdApplyBaseInfoById(bizId); nonProdApplyBaseInfo = nonProdApplyApplication.loadNonProdApplyBaseInfoById(bizId);
this.putAttribute("processDefinitionKey", NonProdApplyApplication.PROCESS_DEFINITION_KEY_EXD); if (!isLastedData(nonProdApplyBaseInfo.getBillCode(), nonProdApplyBaseInfo.getMatnr())) {
this.putAttribute("applyType", "2"); throw new RuntimeException("请选择物料"+nonProdApplyBaseInfo.getMatnr()+"的最新数据进行扩展!");
nonProdApplyBaseInfo.setMaintenanceType("extend"); }
nonProdApplyBaseInfo.setBillCode(""); this.putAttribute("processDefinitionKey", NonProdApplyApplication.PROCESS_DEFINITION_KEY_EXD);
nonProdApplyBaseInfo.setId(""); this.putAttribute("applyType", "2");
// suppliersInfo.setSId(bizId); nonProdApplyBaseInfo.setMaintenanceType("extend");
Map<String, Object> map = new HashMap(); nonProdApplyBaseInfo.setBillCode("");
map.put("bizId", ""); nonProdApplyBaseInfo.setId("");
sdo.setProperties(map); // suppliersInfo.setSId(bizId);
nonProdApplyBaseInfo.setFullId(""); Map<String, Object> map = new HashMap();
nonProdApplyBaseInfo.setSourceId(bizId); map.put("bizId", "");
Map <String,String>dictMapUsage=DictUtil.getDictionary("serviceusage"); sdo.setProperties(map);
List <Map<String,String>> list=new ArrayList<>(); nonProdApplyBaseInfo.setFullId("");
//for (Map maps:mapUsage){ nonProdApplyBaseInfo.setSourceId(bizId);
//查询扩展前所有的 业务部门 Map<String, String> dictMapUsage = DictUtil.getDictionary("serviceusage");
List<Map<String, String>> list = new ArrayList<>();
//for (Map maps:mapUsage){
//查询扩展前所有的 业务部门
/* String usedBusiness=nonProdApplyApplication.getChangeBusinessUsage(bizId,"扩展"); /* String usedBusiness=nonProdApplyApplication.getChangeBusinessUsage(bizId,"扩展");
String []usages=usedBusiness.split(",");//nonProdApplyBaseInfo.getBusinessUsage().split(","); String []usages=usedBusiness.split(",");//nonProdApplyBaseInfo.getBusinessUsage().split(",");
Map <String, String>mapTmp=new HashMap(); Map <String, String>mapTmp=new HashMap();
...@@ -107,52 +110,71 @@ public class NonProdApplyController extends CommonController { ...@@ -107,52 +110,71 @@ public class NonProdApplyController extends CommonController {
} }
this.putAttribute("businessUsageSeledList",mapTmp); */ this.putAttribute("businessUsageSeledList",mapTmp); */
Map <String, String>unMapTmp=new HashMap(); Map<String, String> unMapTmp = new HashMap();
for (Map.Entry<String, String> entry : dictMapUsage.entrySet()) { for (Map.Entry<String, String> entry : dictMapUsage.entrySet()) {
String key = entry.getKey().toUpperCase(); String key = entry.getKey().toUpperCase();
boolean isexists = false; boolean isexists = false;
if (!"K".equals(key)) { if (!"K".equals(key)) {
unMapTmp.put(key, entry.getValue()); unMapTmp.put(key, entry.getValue());
}
} }
} this.putAttribute("businessUsageUnSeledList", unMapTmp);
this.putAttribute("businessUsageUnSeledList",unMapTmp); // nonProdApplyBaseInfo.setBusinessUsageSeled(nonProdApplyBaseInfo.getBusinessUsage());
// nonProdApplyBaseInfo.setBusinessUsageSeled(nonProdApplyBaseInfo.getBusinessUsage()); // nonProdApplyBaseInfo.setBusinessUsageSeled(usedBusiness);
// nonProdApplyBaseInfo.setBusinessUsageSeled(usedBusiness); nonProdApplyBaseInfo.setApplyType("2");
nonProdApplyBaseInfo.setApplyType("2");
this.putAttribute("bizId", "");
this.putAttribute("sourceId", bizId);
this.putAttribute("id", "");
} else if (StringUtil.isNotBlank(sdo.getString("modify"))){ //变更
if (StringUtil.isNotBlank(bizId)) {
nonProdApplyBaseInfo = nonProdApplyApplication.loadNonProdApplyBaseInfoById(bizId);
this.putAttribute("processDefinitionKey", NonProdApplyApplication.PROCESS_DEFINITION_KEY_MOD);
this.putAttribute("applyType", "1");
nonProdApplyBaseInfo.setMaintenanceType("modify");
nonProdApplyBaseInfo.setBillCode("");
nonProdApplyBaseInfo.setId("");
nonProdApplyBaseInfo.setApplyType("1");
// suppliersInfo.setSId(bizId);
//获取变更前的业务状态
String usedBusiness=nonProdApplyApplication.getChangeBusinessUsage(bizId,"变更");
Map<String, Object> map = new HashMap();
map.put("bizId", "");
sdo.setProperties(map);
nonProdApplyBaseInfo.setFullId("");
nonProdApplyBaseInfo.setSourceId(bizId);
this.putAttribute("bizId", ""); this.putAttribute("bizId", "");
this.putAttribute("sourceId", bizId); this.putAttribute("sourceId", bizId);
this.putAttribute("id", ""); this.putAttribute("id", "");
} else if (StringUtil.isNotBlank(sdo.getString("modify"))) { //变更
if (StringUtil.isNotBlank(bizId)) {
nonProdApplyBaseInfo = nonProdApplyApplication.loadNonProdApplyBaseInfoById(bizId);
if (!isLastedData(nonProdApplyBaseInfo.getBillCode(), nonProdApplyBaseInfo.getMatnr())) {
throw new IllegalArgumentException("请选择物料"+nonProdApplyBaseInfo.getMatnr()+"的最新数据进行变更!");
}
this.putAttribute("processDefinitionKey", NonProdApplyApplication.PROCESS_DEFINITION_KEY_MOD);
this.putAttribute("applyType", "1");
nonProdApplyBaseInfo.setMaintenanceType("modify");
nonProdApplyBaseInfo.setBillCode("");
nonProdApplyBaseInfo.setId("");
nonProdApplyBaseInfo.setApplyType("1");
// suppliersInfo.setSId(bizId);
//获取变更前的业务状态
String usedBusiness = nonProdApplyApplication.getChangeBusinessUsage(bizId, "变更");
Map<String, Object> map = new HashMap();
map.put("bizId", "");
sdo.setProperties(map);
nonProdApplyBaseInfo.setFullId("");
nonProdApplyBaseInfo.setSourceId(bizId);
this.putAttribute("bizId", "");
this.putAttribute("sourceId", bizId);
this.putAttribute("id", "");
}
} }
} nonProdApplyBaseInfo.setAttbizId(CommonUtil.createGUID()); // 自动生成附件id
nonProdApplyBaseInfo.setAttbizId(CommonUtil.createGUID()); // 自动生成附件id nonProdApplyBaseInfo.setStatusId(BizBillStatus.APPLYING.getId());
nonProdApplyBaseInfo.setStatusId(BizBillStatus.APPLYING.getId()); Operator operator = getOperator();//获取当前操作员的详情信息
Operator operator = getOperator();//获取当前操作员的详情信息 nonProdApplyBaseInfo.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
nonProdApplyBaseInfo.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
return forward("nonProdApplyDetail",nonProdApplyBaseInfo); return forward("nonProdApplyDetail",nonProdApplyBaseInfo);
} }
// 查询当前物料是否最新的数据进行变更或扩展
public boolean isLastedData(String billCode,String matnr){
NonProdApplyBaseInfoQueryRequest query =new NonProdApplyBaseInfoQueryRequest();
query.setMatnr(matnr);
Map exmap=nonProdApplyApplication.slicedNonApplyBaseInfoByMatnr(query);
List <Map <String,Object>>extendedList=(List)exmap.get("Rows");
Map <String,Object> map=extendedList.get(0);
String newBillCode=map.get("billCode").toString();
if (newBillCode.equals(billCode)){
return true;
} else {
return false;
}
}
public String slicedNonProdApplyList(){ public String slicedNonProdApplyList(){
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
......
...@@ -230,7 +230,9 @@ public class NonProdApplyNextController extends CommonController { ...@@ -230,7 +230,9 @@ public class NonProdApplyNextController extends CommonController {
throw new RuntimeException("不存在该业务或未发布!"); throw new RuntimeException("不存在该业务或未发布!");
} }
NonProdApplyBaseInfo baseInfo = nonProdApplyApplication.loadNonProdApplyBaseInfoById(nonProdApplyDept.getBaseInfoId()); NonProdApplyBaseInfo baseInfo = nonProdApplyApplication.loadNonProdApplyBaseInfoById(nonProdApplyDept.getBaseInfoId());
nonProdApplyDept.setBusinessCode(circulate.get("deptCode").toString()); if (circulate!=null&&circulate.get("deptCode")!=null) {
nonProdApplyDept.setBusinessCode(circulate.get("deptCode").toString());
}
getBaseInfoAttrs(baseInfo,nonProdApplyDept); getBaseInfoAttrs(baseInfo,nonProdApplyDept);
int slen=1; int slen=1;
if (StringUtil.isNotBlank(baseInfo.getBusinessUsage())){ if (StringUtil.isNotBlank(baseInfo.getBusinessUsage())){
...@@ -238,7 +240,7 @@ public class NonProdApplyNextController extends CommonController { ...@@ -238,7 +240,7 @@ public class NonProdApplyNextController extends CommonController {
} }
this.putAttribute("busiLens",slen); this.putAttribute("busiLens",slen);
this.putAttribute("active",baseInfo.getDistribute()); this.putAttribute("active",baseInfo.getDistribute());
String businessCode=circulate.get("deptCode").toString(); String businessCode=circulate.get("deptCode")!=null?circulate.get("deptCode").toString():"";
switch (businessCode) { switch (businessCode) {
case "INIT_DPT": //推送SAP错误 产生的待办消息 case "INIT_DPT": //推送SAP错误 产生的待办消息
baseInfo.setApplyType("0"); baseInfo.setApplyType("0");
...@@ -256,6 +258,15 @@ public class NonProdApplyNextController extends CommonController { ...@@ -256,6 +258,15 @@ public class NonProdApplyNextController extends CommonController {
dictMapUsages+=entry.getKey().toUpperCase()+","+entry.getValue()+";"; dictMapUsages+=entry.getKey().toUpperCase()+","+entry.getValue()+";";
} }
this.putAttribute("dictUsages",dictMapUsages); this.putAttribute("dictUsages",dictMapUsages);
Map <String, String>unMapTmp=new HashMap();
for (Map.Entry<String, String> entry : dictMapUsage.entrySet()) {
String key = entry.getKey().toUpperCase();
// boolean isexists = false;
if (!"K".equals(key)) {
unMapTmp.put(key, entry.getValue());
}
}
this.putAttribute("businessUsageUnSeledList",unMapTmp);
return forward("nonProdApplyNext", nonProdApplyDept); return forward("nonProdApplyNext", nonProdApplyDept);
case "K": case "K":
this.putAttribute("active",2); //已经分发的 填写基本数据 this.putAttribute("active",2); //已经分发的 填写基本数据
......
...@@ -133,7 +133,8 @@ public class NonProdApplyBaseInfo extends FlowBillAbstractEntity { ...@@ -133,7 +133,8 @@ public class NonProdApplyBaseInfo extends FlowBillAbstractEntity {
@Transient @Transient
private String applyDeptId; private String applyDeptId;
@Transient
private String matnr;
/** /**
* 扩展时显示已选择的业务用途 * 扩展时显示已选择的业务用途
*/ */
......
...@@ -93,6 +93,8 @@ public class NonProdApplyBaseInfoQueryRequest extends FlowBillSuperQueryRequest ...@@ -93,6 +93,8 @@ public class NonProdApplyBaseInfoQueryRequest extends FlowBillSuperQueryRequest
//物料编码 //物料编码
private String matnr; private String matnr;
//汉语品名
private String maktx;
} }
\ No newline at end of file
...@@ -319,10 +319,22 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier ...@@ -319,10 +319,22 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
if (suppliersInfo.getApplyType().equals("-1")) { //删除 if (suppliersInfo.getApplyType().equals("-1")) { //删除
suppliersInfoVo.setUpdkz("D"); suppliersInfoVo.setUpdkz("D");
} }
if ("0".equals(suppliersInfoVo.getSperr())){
suppliersInfoVo.setSperr("");
}
if ("0".equals(suppliersInfoVo.getSperm())){
suppliersInfoVo.setSperm("");
}
List<SuppliersPayVo> payVoList = new ArrayList<>(); List<SuppliersPayVo> payVoList = new ArrayList<>();
for (SuppliersPay suppliersPay : payList) { for (SuppliersPay suppliersPay : payList) {
SuppliersPayVo payVo = new SuppliersPayVo(); SuppliersPayVo payVo = new SuppliersPayVo();
ClassHelper.copyProperties(suppliersPay, payVo); ClassHelper.copyProperties(suppliersPay, payVo);
if (payVo.getSperr().equals("0")){
payVo.setSperr("");
}
if (payVo.getSperrB().equals("0")){
payVo.setSperrB("");
}
payVoList.add(payVo); payVoList.add(payVo);
} }
suppliersInfoVo.setSuppliersPayList(payVoList); suppliersInfoVo.setSuppliersPayList(payVoList);
......
package com.huigou.topsun.sap.suppliers.domain; package com.huigou.topsun.sap.suppliers.domain;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.topsunit.query.annotations.Dictionary;
import lombok.Data; import lombok.Data;
import org.hibernate.annotations.GenericGenerator; import org.hibernate.annotations.GenericGenerator;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
LEFT JOIN bsn_message_sponsor t2 ON t2.id = t.message_sponsor_id LEFT JOIN bsn_message_sponsor t2 ON t2.id = t.message_sponsor_id
LEFT JOIN sap_non_prod_apply_dept ad ON ad.apply_dept_id = t2.business_id LEFT JOIN sap_non_prod_apply_dept ad ON ad.apply_dept_id = t2.business_id
left join sap_non_prod_apply_base_info bs on bs.id=ad.base_info_id left join sap_non_prod_apply_base_info bs on bs.id=ad.base_info_id
WHERE t.active IN (0, 3) and (bs.distribute=1 or t.business_code='INIT_DPT') WHERE t.active IN (0, 3) and (bs.distribute=2 or t.business_code='INIT_DPT')
and task_execute = :taskExecute order by t.update_date desc and task_execute = :taskExecute order by t.update_date desc
</sql-query> </sql-query>
</query> </query>
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
<query-mappings> <query-mappings>
<query name="slicedNonProdApplyBaseInfoQuery" table="sap_non_prod_apply_base_info"> <query name="slicedNonProdApplyBaseInfoQuery" table="sap_non_prod_apply_base_info">
<sql-query> <sql-query>
select t.*,ad.matnr,ad.status as dept_status from sap_non_prod_apply_base_info t left join sap_non_prod_apply_dept ad on t.id = ad.base_info_id where 1=1 select t.*,ad.matnr,ad.status as dept_status,ad.maktx from sap_non_prod_apply_base_info t left join sap_non_prod_apply_dept ad on t.id = ad.base_info_id where 1=1
</sql-query> </sql-query>
<!-- <condition column="stats_indicators_id" name="statsIndicatorsId" type="java.lang.String" symbol="=" alias="t"/>--> <!-- <condition column="stats_indicators_id" name="statsIndicatorsId" type="java.lang.String" symbol="=" alias="t"/>-->
</query> </query>
<query name="slicedNonApplyBaseInfoByMatnr" label="按物料编号查询扩展前数据" table="sap_non_prod_apply_base_info"> <query name="slicedNonApplyBaseInfoByMatnr" label="按物料编号查询扩展前数据" table="sap_non_prod_apply_base_info">
<sql-query> <sql-query>
select business_usage,status,maintenance_type from sap_non_prod_apply_base_info t where t.id in ( select id,fillin_date,bill_code,business_usage,status,maintenance_type from sap_non_prod_apply_base_info t where t.id in (
select base_info_id from sap_non_prod_apply_dept where MATNR=:matnr) select base_info_id from sap_non_prod_apply_dept where MATNR=:matnr) order by fillin_date desc,bill_code desc
</sql-query> </sql-query>
<!--condition column="matnr" name="matnr" type="java.lang.String" symbol="=" alias="t"/--> <!--condition column="matnr" name="matnr" type="java.lang.String" symbol="=" alias="t"/-->
</query> </query>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment