Commit 3d5fc58d authored by 1650842865's avatar 1650842865

供应商增加联系人信息;源发BPM采购申请的关单流程;工序外协增加交货日期;采购申请审批删除关闭待办任务

parent 26982d8a
...@@ -65,7 +65,7 @@ function loadOrderItemGrid() { ...@@ -65,7 +65,7 @@ function loadOrderItemGrid() {
meinsName: row.MSEH3, meinsName: row.MSEH3,
menge: row.GAMNG, menge: row.GAMNG,
printLoss: row.ZLOSSC, printLoss: row.ZLOSSC,
eeind: Public.formatDate(new Date(),'%Y-%M-%D'), bedat: Public.formatDate(new Date(),'%Y-%M-%D'),
// 行号加一 // 行号加一
sequence: (orderItemGridManager.getData().length + 1), sequence: (orderItemGridManager.getData().length + 1),
kpein: 1, kpein: 1,
...@@ -317,7 +317,7 @@ function getOrderColumns(){ ...@@ -317,7 +317,7 @@ function getOrderColumns(){
} }
},); },);
columns.push({ columns.push({
display: "需求日期", name: "eeind", width: 140, minWidth: 60, type: "string", align: "left", display: "需求日期", name: "bedat", width: 140, minWidth: 60, type: "date", align: "left",
editor: { editor: {
type: "date", required: true type: "date", required: true
} }
...@@ -343,6 +343,12 @@ function getOrderColumns(){ ...@@ -343,6 +343,12 @@ function getOrderColumns(){
} }
},); },);
if (typeof(getSubProcUnitId) =='function'&&"outer" == getSubProcUnitId()){ if (typeof(getSubProcUnitId) =='function'&&"outer" == getSubProcUnitId()){
columns.push({
display: "交货日期", name: "eeind", width: 140, minWidth: 60, type: "date", align: "left",
editor: {
type: "date", required: true
}
},);
columns.push({ columns.push({
display: "单价", name: "kbetr", width: 140, minWidth: 60, type: "string", align: "left", display: "单价", name: "kbetr", width: 140, minWidth: 60, type: "string", align: "left",
editor: { editor: {
...@@ -405,6 +411,9 @@ function getOrderColumns(){ ...@@ -405,6 +411,9 @@ function getOrderColumns(){
// }, // },
}); });
}else { }else {
columns.push({
display: "交货日期", name: "eeind", width: 140, minWidth: 60, type: "date", align: "left",
},);
columns.push({ columns.push({
display: "单价", name: "kbetr", width: 140, minWidth: 60, type: "string", align: "left", display: "单价", name: "kbetr", width: 140, minWidth: 60, type: "string", align: "left",
},); },);
......
...@@ -20,6 +20,7 @@ function loadProcessOutsourceOrderListGrid() { ...@@ -20,6 +20,7 @@ function loadProcessOutsourceOrderListGrid() {
{display: "申请单编号", name: "billCode", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "申请单编号", name: "billCode", width: 120, 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: "fillinDate", width: 120, minWidth: 60, type: "datetime", align: "left"}, {display: "申请日期", name: "fillinDate", width: 120, minWidth: 60, type: "datetime", align: "left"},
{display: "需求日期", name: "bedat", width: 140, minWidth: 60, type: "date", align: "left"},
{display: "工厂", name: "werksName", width: 200, minWidth: 60, type: "string", align: "left"}, {display: "工厂", name: "werksName", width: 200, minWidth: 60, type: "string", align: "left"},
{display: "采购订单", name: "ebeln", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "采购订单", name: "ebeln", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "订单行项目号", name: "ebelp", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "订单行项目号", name: "ebelp", width: 120, minWidth: 60, type: "string", align: "left"},
...@@ -37,7 +38,7 @@ function loadProcessOutsourceOrderListGrid() { ...@@ -37,7 +38,7 @@ function loadProcessOutsourceOrderListGrid() {
{display: "定价基数", name: "kpein", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "定价基数", name: "kpein", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "币别", name: "waersTextView", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "币别", name: "waersTextView", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "税码", name: "purchaseMwskzTextView", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "税码", name: "purchaseMwskzTextView", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "需求到货日期", name: "eeind", width: 140, minWidth: 60, type: "date", align: "left"}, {display: "货日期", name: "eeind", width: 140, minWidth: 60, type: "date", align: "left"},
{display: "供应商", name: "lifnrName", width: 200, minWidth: 60, type: "string", align: "left"}, {display: "供应商", name: "lifnrName", width: 200, minWidth: 60, type: "string", align: "left"},
{display: "申请人", name: "personMemberName", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "申请人", name: "personMemberName", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "申请部门", name: "deptName", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "申请部门", name: "deptName", width: 120, minWidth: 60, type: "string", align: "left"},
......
...@@ -26,6 +26,7 @@ function initPurchaseListGrid() { ...@@ -26,6 +26,7 @@ function initPurchaseListGrid() {
Public.tip("只能由创建人撤审!"); Public.tip("只能由创建人撤审!");
return; return;
} }
var _self = this;
UICtrl.showAjaxDialog({ UICtrl.showAjaxDialog({
url: web_app.name + '/sapPurchase/showRevokeDetail.load', url: web_app.name + '/sapPurchase/showRevokeDetail.load',
param:{id:row.id}, param:{id:row.id},
...@@ -35,6 +36,7 @@ function initPurchaseListGrid() { ...@@ -35,6 +36,7 @@ function initPurchaseListGrid() {
Public.ajax(web_app.name + '/sapPurchase/revokeApproval.ajax', {id: row.id,revokeReason: $("#revokeForm #revokeReason").val(),revokeType:$("#revokeType").val()}, function (msg) { Public.ajax(web_app.name + '/sapPurchase/revokeApproval.ajax', {id: row.id,revokeReason: $("#revokeForm #revokeReason").val(),revokeType:$("#revokeType").val()}, function (msg) {
purchaseGridManager.loadData(); purchaseGridManager.loadData();
}); });
_self.close();
} }
}); });
// UICtrl.confirm('确定要把当前单据撤销审批吗?',function(){ // UICtrl.confirm('确定要把当前单据撤销审批吗?',function(){
...@@ -59,6 +61,7 @@ function initPurchaseListGrid() { ...@@ -59,6 +61,7 @@ function initPurchaseListGrid() {
{display: "PR类型", name: "bsartTextView", width: 150, minWidth: 60, type: "string", align: "center"}, {display: "PR类型", name: "bsartTextView", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "科目分配类别", name: "knttpTextView", width: 150, minWidth: 60, type: "string", align: "center"}, {display: "科目分配类别", name: "knttpTextView", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "采购申请编号", name: "banfn", width: 150, minWidth: 60, type: "string", align: "center"}, {display: "采购申请编号", name: "banfn", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "sap回执", name: "message", width: 200, minWidth: 60, type: "string", align: "center"},
//{display: "批准时间", name: "frgdt", width: 200, minWidth: 60, type: "date", align: "center"}, //{display: "批准时间", name: "frgdt", width: 200, minWidth: 60, type: "date", align: "center"},
//{display: "申请日期", name: "fillinDate", width: 120, minWidth: 60, type: "string", align: "left"}, //{display: "申请日期", name: "fillinDate", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "录入人", name: "personMemberName", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "录入人", name: "personMemberName", width: 120, minWidth: 60, type: "string", align: "left"},
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<x:hidden name="id"/> <x:hidden name="id"/>
<div class="hg-form-cols"> <div class="hg-form-cols">
<div class="hg-form-row"> <div class="hg-form-row">
<x:selectC name="revokeType" required="true" label="撤审类型" labelCol="4" fieldCol="8" dictionary="revokeType"/> <x:selectC name="revokeType" required="true" label="撤审类型" labelCol="4" fieldCol="8" dictionary="revokeType" disabled="true"/>
<x:textareaC name="revokeReason" required="true" label="撤审原因" labelCol="4" fieldCol="8" rows="3"/> <x:textareaC name="revokeReason" required="true" label="撤审原因" labelCol="4" fieldCol="8" rows="3"/>
</div> </div>
</div> </div>
......
...@@ -23,6 +23,7 @@ function initPurchaseListGrid() { ...@@ -23,6 +23,7 @@ function initPurchaseListGrid() {
Public.tip("只能由创建人撤审!"); Public.tip("只能由创建人撤审!");
return; return;
} }
var _self = this;
UICtrl.showAjaxDialog({ UICtrl.showAjaxDialog({
url: web_app.name + '/sapPurchaseApproval/showRevokeDetail.load', url: web_app.name + '/sapPurchaseApproval/showRevokeDetail.load',
param:{id:row.id}, param:{id:row.id},
...@@ -32,6 +33,7 @@ function initPurchaseListGrid() { ...@@ -32,6 +33,7 @@ function initPurchaseListGrid() {
Public.ajax(web_app.name + '/sapPurchaseApproval/revokeApproval.ajax', {id: row.id,revokeReason: $("#revokeForm #revokeReason").val(),revokeType:$("#revokeType").val()}, function (msg) { Public.ajax(web_app.name + '/sapPurchaseApproval/revokeApproval.ajax', {id: row.id,revokeReason: $("#revokeForm #revokeReason").val(),revokeType:$("#revokeType").val()}, function (msg) {
purchaseApprovalGridManager.loadData(); purchaseApprovalGridManager.loadData();
}); });
_self.close();
} }
}); });
} }
......
...@@ -38,6 +38,7 @@ function loadGrid() { ...@@ -38,6 +38,7 @@ function loadGrid() {
Public.tip("只能由创建人撤审!"); Public.tip("只能由创建人撤审!");
return; return;
} }
var _self = this;
UICtrl.showAjaxDialog({ UICtrl.showAjaxDialog({
url: web_app.name + '/sapPurchaseOrder/showRevokeDetail.load', url: web_app.name + '/sapPurchaseOrder/showRevokeDetail.load',
param:{id:row.id}, param:{id:row.id},
...@@ -47,6 +48,7 @@ function loadGrid() { ...@@ -47,6 +48,7 @@ function loadGrid() {
Public.ajax(web_app.name + '/sapPurchaseOrder/revokeApproval.ajax', {id: row.id,revokeReason: $("#revokeForm #revokeReason").val(),revokeType:$("#revokeType").val()}, function (msg) { Public.ajax(web_app.name + '/sapPurchaseOrder/revokeApproval.ajax', {id: row.id,revokeReason: $("#revokeForm #revokeReason").val(),revokeType:$("#revokeType").val()}, function (msg) {
purchaseOrderGridManager.loadData(); purchaseOrderGridManager.loadData();
}); });
_self.close();
} }
}); });
} }
......
...@@ -52,42 +52,57 @@ ...@@ -52,42 +52,57 @@
<x:selectC name="buGroup" label="业务伙伴分组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/> <x:selectC name="buGroup" label="业务伙伴分组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/>
<x:inputC name="partner" label="供应商编码" labelCol="1" fieldCol="2" required="false" readonly="true"/> <x:inputC name="partner" label="供应商编码" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:selectC name="title" label="称谓代码" labelCol="1" fieldCol="2" dictionary="title"/> <x:selectC name="title" label="称谓代码" labelCol="1" fieldCol="2" dictionary="title"/>
</div>
<div class="hg-form-row">
<x:inputC name="nameOrg1" label="供应商名称1" labelCol="1" fieldCol="2" required="true"/> <x:inputC name="nameOrg1" label="供应商名称1" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="nameOrg2" label="供应商名称2" labelCol="1" fieldCol="2"/> <x:inputC name="nameOrg2" label="供应商名称2" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="nameOrg3" label="组织名称3" labelCol="1" fieldCol="2"/>
<x:inputC name="nameOrg4" label="组织名称4" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="buSort1" label="搜索词1" labelCol="1" fieldCol="2" required="true"/> <x:inputC name="buSort1" label="搜索词1" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="buSort2" label="搜索词2" labelCol="1" fieldCol="2"/> <x:inputC name="buSort2" label="搜索词2" labelCol="1" fieldCol="2"/>
</div>
<%--<x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2"/> <div class="hg-form-row">
<x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2"/>
<x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="land1Name" label="国家" labelCol="1" fieldCol="2" required="true" wrapper="select"/> <x:inputC name="land1Name" label="国家" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:hidden name="land1"/> <x:hidden name="land1"/>
<x:inputC name="regionName" label="地区" labelCol="1" fieldCol="2" required="true" wrapper="select"/> <x:inputC name="regionName" label="地区" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:hidden name="region"/> <x:hidden name="region"/>
<x:inputC name="city1" label="城市" labelCol="1" fieldCol="2" required="true" /> <x:inputC name="city1" label="城市" labelCol="1" fieldCol="2" required="true" />
<x:inputC name="postCode1" label="城市邮政编码" labelCol="1" fieldCol="2" required="true" maxLength="6"/>
</div>
<div class="hg-form-row">
<x:inputC name="street" label="街道地址" labelCol="1" fieldCol="2" maxLength="35"/> <x:inputC name="street" label="街道地址" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2" maxLength="35"/> <x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2" maxLength="35"/> <x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2" maxLength="35"/> <x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="strSuppl4" label="街道5" labelCol="1" fieldCol="2" maxLength="35"/> </div>
<div class="hg-form-row">
<x:selectC name="langu" label="语言" labelCol="1" fieldCol="2" required="true" dictionary="langu"/> <x:selectC name="langu" label="语言" labelCol="1" fieldCol="2" required="true" dictionary="langu"/>
<x:inputC name="smtpAddr" label="电子邮件地址" labelCol="1" fieldCol="2" maxLength="30" match="email"/>
<x:inputC name="postCode1" label="城市邮政编码" labelCol="1" fieldCol="2" required="true" maxLength="6"/>
<x:inputC name="telNumber" label="电话" labelCol="1" fieldCol="2" />
<%--<x:inputC name="telExtens" label="第一个电话号码分机" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="mobNumber" label="移动电话" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="mobExtens" label="第一个移动电话号码分机" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2" maxLength="30"/>
<%--<x:inputC name="faxExtens" label="第一个传真号分机号" labelCol="1" fieldCol="2"/>--%>
<!--x:selectC name="ktokk" label="供应商帐户组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/-->
<x:inputC name="kunnr" label="客户编号" labelCol="1" fieldCol="2"/> <x:inputC name="kunnr" label="客户编号" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" required="true" maxLength="18"/> <x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" required="true" maxLength="18"/>
<x:inputC name="mobNumber" label="移动电话" labelCol="1" fieldCol="2"/>
</div>
<x:title title="联系人信息" name="group"/>
<div class="hg-form-row">
<x:inputC name="contact" label="联系人" labelCol="1" fieldCol="2"/>
<x:inputC name="telNumber" label="电话" labelCol="1" fieldCol="2" />
<x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2" maxLength="30"/>
<x:inputC name="smtpAddr" label="电子邮件地址" labelCol="1" fieldCol="2" maxLength="30" match="email"/>
</div>
<div class="hg-form-row">
<x:inputC name="contact1" label="联系人1" labelCol="1" fieldCol="2"/>
<x:inputC name="telNumber1" label="电话1" labelCol="1" fieldCol="2" />
<x:inputC name="faxNumber1" label="传真1" labelCol="1" fieldCol="2" maxLength="30"/>
<x:inputC name="smtpAddr1" label="电子邮件地址1" labelCol="1" fieldCol="2" maxLength="30" match="email"/>
</div>
<div class="hg-form-row">
<x:inputC name="contact2" label="联系人2" labelCol="1" fieldCol="2"/>
<x:inputC name="telNumber2" label="电话2" labelCol="1" fieldCol="2" />
<x:inputC name="faxNumber2" label="传真2" labelCol="1" fieldCol="2" maxLength="30"/>
<x:inputC name="smtpAddr2" label="电子邮件地址2" labelCol="1" fieldCol="2" maxLength="30" match="email"/>
</div>
<div class="hg-form-row">
<x:inputC name="contact3" label="联系人3" labelCol="1" fieldCol="2"/>
<x:inputC name="telNumber3" label="电话3" labelCol="1" fieldCol="2" />
<x:inputC name="faxNumber3" label="传真3" labelCol="1" fieldCol="2" maxLength="30"/>
<x:inputC name="smtpAddr3" label="电子邮件地址3" labelCol="1" fieldCol="2" maxLength="30" match="email"/>
</div> </div>
<x:title title="供应商银行信息" name="group"/> <x:title title="供应商银行信息" name="group"/>
<div class="hg-form-row"> <div class="hg-form-row">
...@@ -98,7 +113,6 @@ ...@@ -98,7 +113,6 @@
<x:inputC name="bkref" label="银行细目的参考明细" labelCol="1" fieldCol="2" required="false" maxLength="18"/> <x:inputC name="bkref" label="银行细目的参考明细" labelCol="1" fieldCol="2" required="false" maxLength="18"/>
<x:inputC name="koinh" label="账户持有人姓名" labelCol="1" fieldCol="2" required="false" /> <x:inputC name="koinh" label="账户持有人姓名" labelCol="1" fieldCol="2" required="false" />
</div> </div>
<div id="frozenDiv"> <div id="frozenDiv">
<x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2" dictionary="sperr"/> <x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2" dictionary="sperr"/>
<x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB"/> <x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB"/>
......
...@@ -44,42 +44,60 @@ ...@@ -44,42 +44,60 @@
<x:selectC name="buGroup" label="业务伙伴分组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup" disabled="true"/> <x:selectC name="buGroup" label="业务伙伴分组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup" disabled="true"/>
<x:inputC name="partner" label="供应商编码" labelCol="1" fieldCol="2" required="false" readonly="true"/> <x:inputC name="partner" label="供应商编码" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:selectC name="title" label="称谓代码" labelCol="1" fieldCol="2" dictionary="title" disabled="true"/> <x:selectC name="title" label="称谓代码" labelCol="1" fieldCol="2" dictionary="title" disabled="true"/>
</div>
<div class="hg-form-row">
<x:inputC name="nameOrg1" label="供应商名称1" labelCol="1" fieldCol="2" required="true" readonly="true"/> <x:inputC name="nameOrg1" label="供应商名称1" labelCol="1" fieldCol="2" required="true" readonly="true"/>
<x:inputC name="nameOrg2" label="供应商名称2" labelCol="1" fieldCol="2" readonly="true"/> <x:inputC name="nameOrg2" label="供应商名称2" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="nameOrg3" label="组织名称3" labelCol="1" fieldCol="2"/>
<x:inputC name="nameOrg4" label="组织名称4" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="buSort1" label="搜索词1" labelCol="1" fieldCol="2" required="true" readonly="true"/> <x:inputC name="buSort1" label="搜索词1" labelCol="1" fieldCol="2" required="true" readonly="true"/>
<x:inputC name="buSort2" label="搜索词2" labelCol="1" fieldCol="2" readonly="true"/> <x:inputC name="buSort2" label="搜索词2" labelCol="1" fieldCol="2" readonly="true"/>
</div>
<%--<x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2"/> <div class="hg-form-row">
<x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2"/>
<x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="land1Name" label="国家" labelCol="1" fieldCol="2" required="true" wrapper="select" readonly="true"/> <x:inputC name="land1Name" label="国家" labelCol="1" fieldCol="2" required="true" wrapper="select" readonly="true"/>
<x:hidden name="land1"/> <x:hidden name="land1"/>
<x:inputC name="regionName" label="地区" labelCol="1" fieldCol="2" required="true" wrapper="select" readonly="true"/> <x:inputC name="regionName" label="地区" labelCol="1" fieldCol="2" required="true" wrapper="select" readonly="true"/>
<x:hidden name="region"/> <x:hidden name="region"/>
<x:inputC name="city1" label="城市" labelCol="1" fieldCol="2" required="true" readonly="true"/> <x:inputC name="city1" label="城市" labelCol="1" fieldCol="2" required="true" readonly="true"/>
<x:inputC name="postCode1" label="城市邮政编码" labelCol="1" fieldCol="2" required="true" maxLength="6" readonly="true"/>
</div>
<div class="hg-form-row">
<x:inputC name="street" label="街道地址" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/> <x:inputC name="street" label="街道地址" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/> <x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/> <x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/> <x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:inputC name="strSuppl4" label="街道5" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/> </div>
<div class="hg-form-row">
<x:selectC name="langu" label="语言" labelCol="1" fieldCol="2" required="true" dictionary="langu" disabled="true"/> <x:selectC name="langu" label="语言" labelCol="1" fieldCol="2" required="true" dictionary="langu" disabled="true"/>
<x:inputC name="smtpAddr" label="电子邮件地址" labelCol="1" fieldCol="2" maxLength="30" readonly="true" match="email"/>
<x:inputC name="postCode1" label="城市邮政编码" labelCol="1" fieldCol="2" required="true" maxLength="6" readonly="true"/>
<x:inputC name="telNumber" label="电话" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="telExtens" label="第一个电话号码分机" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="mobNumber" label="移动电话" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="mobExtens" label="第一个移动电话号码分机" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2" maxLength="30" readonly="true"/>
<%--<x:inputC name="faxExtens" label="第一个传真号分机号" labelCol="1" fieldCol="2"/>--%>
<!--x:selectC name="ktokk" label="供应商帐户组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/-->
<x:inputC name="kunnr" label="客户编号" labelCol="1" fieldCol="2" readonly="true"/> <x:inputC name="kunnr" label="客户编号" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" required="true" maxLength="18" readonly="true"/> <x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" required="true" maxLength="18" readonly="true"/>
<x:inputC name="mobNumber" label="移动电话" labelCol="1" fieldCol="2" readonly="true"/>
</div>
<x:title title="联系人信息" name="group"/>
<div class="hg-form-row">
<x:inputC name="contact" label="联系人" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="telNumber" label="电话" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2" maxLength="30" readonly="true"/>
<x:inputC name="smtpAddr" label="电子邮件地址" labelCol="1" fieldCol="2" maxLength="30" match="email" readonly="true"/>
</div>
<div class="hg-form-row">
<x:inputC name="contact1" label="联系人1" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="telNumber1" label="电话1" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="faxNumber1" label="传真1" labelCol="1" fieldCol="2" maxLength="30" readonly="true"/>
<x:inputC name="smtpAddr1" label="电子邮件地址1" labelCol="1" fieldCol="2" maxLength="30" match="email" readonly="true"/>
</div>
<div class="hg-form-row">
<x:inputC name="contact2" label="联系人2" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="telNumber2" label="电话2" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="faxNumber2" label="传真2" labelCol="1" fieldCol="2" maxLength="30" readonly="true"/>
<x:inputC name="smtpAddr2" label="电子邮件地址2" labelCol="1" fieldCol="2" maxLength="30" match="email" readonly="true"/>
</div>
<div class="hg-form-row">
<x:inputC name="contact3" label="联系人3" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="telNumber3" label="电话3" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="faxNumber3" label="传真3" labelCol="1" fieldCol="2" maxLength="30" readonly="true"/>
<x:inputC name="smtpAddr3" label="电子邮件地址3" labelCol="1" fieldCol="2" maxLength="30" match="email" readonly="true"/>
</div>
<div class="hg-form-row">
<x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2" dictionary="sperr" disabled="true"/> <x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2" dictionary="sperr" disabled="true"/>
<x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB" disabled="true"/> <x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB" disabled="true"/>
</div> </div>
......
...@@ -18,4 +18,8 @@ public interface BaseTask { ...@@ -18,4 +18,8 @@ public interface BaseTask {
//根据业务ID查询审批人 //根据业务ID查询审批人
List<String> queryHandlersByBizId(String bizId); List<String> queryHandlersByBizId(String bizId);
void deleteRunTimeTaskExtensionByBizId(String bizId);
void updateHistoricTaskInstanceExtensionByBizId(String bizId);
} }
...@@ -6,11 +6,19 @@ import com.huigou.data.query.model.QueryDescriptor; ...@@ -6,11 +6,19 @@ import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.base.task.BaseTask; import com.huigou.topsun.base.task.BaseTask;
import com.huigou.uasp.bmp.common.application.BaseApplication; import com.huigou.uasp.bmp.common.application.BaseApplication;
import com.huigou.uasp.bmp.operator.OperatorApplication; import com.huigou.uasp.bmp.operator.OperatorApplication;
import com.huigou.uasp.bpm.ProcessStatus;
import com.huigou.uasp.bpm.TaskStatus;
import com.huigou.uasp.bpm.engine.application.WorkflowApplication; import com.huigou.uasp.bpm.engine.application.WorkflowApplication;
import com.huigou.uasp.bpm.engine.domain.model.HistoricTaskInstanceExtension;
import com.huigou.uasp.bpm.engine.domain.model.RuntimeTaskExtension;
import com.huigou.uasp.bpm.engine.repository.HistoricTaskInstanceExtensionRepository;
import com.huigou.uasp.bpm.engine.repository.RuntimeTaskExtensionRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -24,6 +32,10 @@ public class BaseTaskImpl extends BaseApplication implements BaseTask { ...@@ -24,6 +32,10 @@ public class BaseTaskImpl extends BaseApplication implements BaseTask {
private OperatorApplication operatorApplication; private OperatorApplication operatorApplication;
@Autowired @Autowired
private WorkflowApplication workflowService; private WorkflowApplication workflowService;
@Autowired
private RuntimeTaskExtensionRepository runtimeTaskExtensionRepository;
@Autowired
private HistoricTaskInstanceExtensionRepository historicTaskInstanceExtensionRepository;
@Override @Override
public String queryTaskByBizId(String bizId) { public String queryTaskByBizId(String bizId) {
...@@ -47,4 +59,32 @@ public class BaseTaskImpl extends BaseApplication implements BaseTask { ...@@ -47,4 +59,32 @@ public class BaseTaskImpl extends BaseApplication implements BaseTask {
String sql = queryDescriptor.getSql(); String sql = queryDescriptor.getSql();
return this.sqlExecutorDao.queryToList(sql, String.class, bizId); return this.sqlExecutorDao.queryToList(sql, String.class, bizId);
} }
@Override
public void deleteRunTimeTaskExtensionByBizId(String bizId) {
//删除待办任务
List<String> kindIds = new ArrayList<>();
kindIds.add("task");
List<RuntimeTaskExtension> extensionList = runtimeTaskExtensionRepository.findCoordinationTaskInstances(bizId, "process", kindIds);
if (!CollectionUtils.isEmpty(extensionList)){
runtimeTaskExtensionRepository.delete(extensionList);
}
}
@Override
public void updateHistoricTaskInstanceExtensionByBizId(String bizId) {
//更新任务状态
List<HistoricTaskInstanceExtension> extensionList = historicTaskInstanceExtensionRepository.findByBusinessKeyAndTaskDefinitionKey(bizId, "Apply");
if (!CollectionUtils.isEmpty(extensionList)){
extensionList.forEach(historicTaskInstanceExtension -> {
if ("back".equals(historicTaskInstanceExtension.getGenerateReason())){
historicTaskInstanceExtension.setStatusId(ProcessStatus.ABORTED.getId());
historicTaskInstanceExtension.setStatusName(ProcessStatus.ABORTED.getDisplayName());
historicTaskInstanceExtension.setEndTime(new Date());
historicTaskInstanceExtension.setDeleteReason(TaskStatus.ABORTED.getId());
historicTaskInstanceExtensionRepository.save(historicTaskInstanceExtension);
}
});
}
}
} }
...@@ -108,7 +108,7 @@ public class ProcessOutsourceOrderItem extends AbstractEntity { ...@@ -108,7 +108,7 @@ public class ProcessOutsourceOrderItem extends AbstractEntity {
private String lgortName; private String lgortName;
/** /**
* 需求到货日期 * 货日期
*/ */
@Column(name = "EEIND") @Column(name = "EEIND")
private Date eeind; private Date eeind;
...@@ -179,4 +179,10 @@ public class ProcessOutsourceOrderItem extends AbstractEntity { ...@@ -179,4 +179,10 @@ public class ProcessOutsourceOrderItem extends AbstractEntity {
@Column(name = "amount") @Column(name = "amount")
private BigDecimal amount; private BigDecimal amount;
/**
* 需求日期
*/
@Column(name = "BEDAT")
private Date bedat;
} }
...@@ -52,7 +52,7 @@ public class ProcessOutsourceItemVo implements Serializable { ...@@ -52,7 +52,7 @@ public class ProcessOutsourceItemVo implements Serializable {
private String meins; private String meins;
/** /**
* 需求到货日期 * 货日期
*/ */
@JsonProperty("EEIND") @JsonProperty("EEIND")
private String eeind; private String eeind;
...@@ -130,4 +130,10 @@ public class ProcessOutsourceItemVo implements Serializable { ...@@ -130,4 +130,10 @@ public class ProcessOutsourceItemVo implements Serializable {
@JsonProperty("WAERS") @JsonProperty("WAERS")
private String waers; private String waers;
/**
* 需求日期
*/
@JsonProperty("BEDAT")
private String bedat;
} }
...@@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.cache.SystemCache; import com.huigou.cache.SystemCache;
import com.huigou.context.Operator; import com.huigou.context.Operator;
import com.huigou.context.ThreadLocalUtil; import com.huigou.context.ThreadLocalUtil;
...@@ -24,6 +26,8 @@ import com.huigou.topsun.sap.purchase.domain.vo.SapPurchaseItemVo; ...@@ -24,6 +26,8 @@ import com.huigou.topsun.sap.purchase.domain.vo.SapPurchaseItemVo;
import com.huigou.topsun.sap.purchase.domain.vo.SapPurchaseVo; import com.huigou.topsun.sap.purchase.domain.vo.SapPurchaseVo;
import com.huigou.topsun.sap.purchase.repository.SapPurchaseRepository; import com.huigou.topsun.sap.purchase.repository.SapPurchaseRepository;
import com.huigou.topsun.sap.common.domain.SapResult; import com.huigou.topsun.sap.common.domain.SapResult;
import com.huigou.topsun.sap.purchaseApproval.application.SapPurchaseApprovalApplication;
import com.huigou.topsun.sap.purchaseApproval.domain.SapPurchaseApprovalItem;
import com.huigou.uasp.bmp.common.BizBillStatus; import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bmp.operator.OperatorApplication; import com.huigou.uasp.bmp.operator.OperatorApplication;
import com.huigou.uasp.bmp.opm.domain.model.org.Org; import com.huigou.uasp.bmp.opm.domain.model.org.Org;
...@@ -67,6 +71,8 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -67,6 +71,8 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
private DataPermissionApplication dataPermissionApplication; private DataPermissionApplication dataPermissionApplication;
@Autowired @Autowired
private OperatorApplication operatorApplication; private OperatorApplication operatorApplication;
@Autowired
private SapPurchaseApprovalApplication sapPurchaseApprovalApplication;
@Override @Override
protected String saveBizAndApprovalData() { protected String saveBizAndApprovalData() {
...@@ -183,10 +189,18 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -183,10 +189,18 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
SapPurchase sapPurchase = sapPurchaseRepository.findOne(bizId); SapPurchase sapPurchase = sapPurchaseRepository.findOne(bizId);
sapPurchase.setStatusId(status.getId()); sapPurchase.setStatusId(status.getId());
sapPurchase.setFrgdt(new Date()); sapPurchase.setFrgdt(new Date());
if ("close".equals(sapPurchase.getRevokeType())){
this.closeSapPurchase(sapPurchase);
}else {
this.createdSapPurchase(sapPurchase);
}
}
public void createdSapPurchase(SapPurchase sapPurchase){
SapPurchaseVo sapPurchaseVo = this.getSapPurchaseVoJson(sapPurchase); SapPurchaseVo sapPurchaseVo = this.getSapPurchaseVoJson(sapPurchase);
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
resultMap.put("businessType", "采购申请创建"); resultMap.put("businessType", "采购申请创建");
resultMap.put("businessId", bizId); resultMap.put("businessId", sapPurchase.getId());
resultMap.put("parameter", JSON.toJSONString(sapPurchaseVo)); resultMap.put("parameter", JSON.toJSONString(sapPurchaseVo));
try { try {
String url = SystemCache.getParameter("sap.purchase.url", String.class); String url = SystemCache.getParameter("sap.purchase.url", String.class);
...@@ -202,6 +216,8 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -202,6 +216,8 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
throw new RuntimeException("数据传输失败,"+ String.join(";",messages)); throw new RuntimeException("数据传输失败,"+ String.join(";",messages));
} }
sapPurchase.setBanfn(sapResult.getMESSAGE_V1());//SAP采购申请编号 sapPurchase.setBanfn(sapResult.getMESSAGE_V1());//SAP采购申请编号
sapPurchase.setType(sapResult.getTYPE());
sapPurchase.setMessage(sapResult.getMESSAGE());
sapPurchaseRepository.save(sapPurchase); sapPurchaseRepository.save(sapPurchase);
} catch (IOException e) { } catch (IOException e) {
resultMap.put("TYPE", "E"); resultMap.put("TYPE", "E");
...@@ -212,6 +228,56 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -212,6 +228,56 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
} }
} }
public void closeSapPurchase(SapPurchase sapPurchase){
List<SapPurchaseItem> sapPurchaseItemList = this.sapPurchaseItemApplication.findBySapPurchaseId(sapPurchase.getId());
List<Map<String,Object>> paramList= new ArrayList<>();
for (SapPurchaseItem sapPurchaseItem : sapPurchaseItemList) {
Map<String,Object> paramItem = new HashMap<>();
paramItem.put("banfn",sapPurchase.getBanfn());
paramItem.put("BEDNR",sapPurchase.getBillCode());
paramItem.put("frgkz","10");
paramItem.put("bnfpo",sapPurchaseItem.getBnfpo());
paramItem.put("flag","N");
paramItem.put("status",0);
paramItem.put("ELIKZ", "X");
paramList.add(paramItem);
}
Map<String,Object> param = new HashMap<>();
param.put("MODE","PR");
param.put("DATA",paramList);
ObjectMapper objectMapper = new ObjectMapper();
String url = "pass_approval/approval";
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("businessType", "采购申请关单");
resultMap.put("businessId", sapPurchase.getId());
resultMap.put("parameter", JSON.toJSONString(param));
String type = "";
String message = "";
try {
String result = httpClient.execute(param, url);
List<Map<String, Object>> resultList = objectMapper.readValue(result, new TypeReference<List<Map<String, Object>>>() {});
Map<String, Object> backMap = resultList.get(0);
type = (String) backMap.get("TYPE");
message = (String) backMap.get("MESSAGE");
if (!"S".equals(type)) {
throw new RuntimeException("数据传输失败,请稍后手动重试!"+message);
} else {
resultMap.put("TYPE", type);
resultMap.put("MESSAGE", message);
}
} catch (Exception e) {
resultMap.put("TYPE", "E");
resultMap.put("MESSAGE", e.getMessage());
throw new RuntimeException("数据传输失败请检查数据后重试!"+e.getMessage());
}finally {
sapPurchase.setType(type);
sapPurchase.setMessage(message);
sapPurchaseRepository.save(sapPurchase);
sapMutualEpLogApplication.saveSapMutualEpLog(resultMap);
}
}
/** /**
* 转换成SAP JSON格式数据 * 转换成SAP JSON格式数据
* @param sapPurchase * @param sapPurchase
...@@ -319,6 +385,12 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -319,6 +385,12 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
@Override @Override
public String revokeApproval(String id,String revokeReason,String revokeType){ public String revokeApproval(String id,String revokeReason,String revokeType){
SapPurchase sapPurchase = this.sapPurchaseRepository.findOne(id); SapPurchase sapPurchase = this.sapPurchaseRepository.findOne(id);
//验证采购申请单是否生成了采购订单
String result = this.sapPurchaseApprovalApplication.checkOrderByPurchaseNo(sapPurchase.getBanfn());
//Y是可以提交撤审,N是查询到有对应的采购订单,不可以提交撤审
if ("N".equals(result)){
throw new RuntimeException("采购申请单已生成采购订单,不能撤销!");
}
if (sapPurchase.getStatusId()!=BizBillStatus.COMPLETED.getId()){ if (sapPurchase.getStatusId()!=BizBillStatus.COMPLETED.getId()){
throw new RuntimeException("审批完成的单据才能撤销!"); throw new RuntimeException("审批完成的单据才能撤销!");
} }
...@@ -329,6 +401,7 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -329,6 +401,7 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
SapPurchase newSapPurchase=new SapPurchase(); SapPurchase newSapPurchase=new SapPurchase();
ClassHelper.copyProperties(sapPurchase,newSapPurchase); ClassHelper.copyProperties(sapPurchase,newSapPurchase);
newSapPurchase.setId(""); newSapPurchase.setId("");
newSapPurchase.setBillCode("");
newSapPurchase.setRevokeReason(revokeReason); newSapPurchase.setRevokeReason(revokeReason);
newSapPurchase.setRevokeType(revokeType); newSapPurchase.setRevokeType(revokeType);
String pId=mannualStartWorkApplication.startWorkflow(newSapPurchase,PROCESS_DEFINITION_KEY,"sapPurchase"); String pId=mannualStartWorkApplication.startWorkflow(newSapPurchase,PROCESS_DEFINITION_KEY,"sapPurchase");
......
...@@ -189,6 +189,9 @@ public class SapPurchaseController extends CommonController { ...@@ -189,6 +189,9 @@ public class SapPurchaseController extends CommonController {
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
String id = sdo.getId(); String id = sdo.getId();
this.putAttribute("id",id); this.putAttribute("id",id);
this.putAttribute("revokeType","close");
this.putAttribute("revokeTypeTextView","关单");
return forward("showRevokeDetail"); return forward("showRevokeDetail");
} }
} }
...@@ -53,6 +53,17 @@ public class SapPurchase extends FlowBillAbstractEntity { ...@@ -53,6 +53,17 @@ public class SapPurchase extends FlowBillAbstractEntity {
@Column(name = "revoke_type") @Column(name = "revoke_type")
private String revokeType; private String revokeType;
/**
* 消息类型
*/
@Column(name = "TYPE")
private String type;
/**
* 消息内容
*/
@Column(name = "MESSAGE")
private String message;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Override @Override
......
...@@ -25,5 +25,7 @@ public interface SapPurchaseApprovalApplication { ...@@ -25,5 +25,7 @@ public interface SapPurchaseApprovalApplication {
String revokeApproval(String id,String revokeReason,String revokeType); String revokeApproval(String id,String revokeReason,String revokeType);
void abortPurchaseApproval(String id,String jobPageId); String checkOrderByPurchaseNo(String banfn);
void abortPurchaseApproval(String id, String jobPageId);
} }
...@@ -5,21 +5,17 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -5,21 +5,17 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.cache.DictUtil;
import com.huigou.cache.SystemCache; import com.huigou.cache.SystemCache;
import com.huigou.context.Operator; import com.huigou.context.Operator;
import com.huigou.context.OrgUnit;
import com.huigou.context.ThreadLocalUtil; import com.huigou.context.ThreadLocalUtil;
import com.huigou.data.domain.model.CommonDomainConstants; import com.huigou.data.domain.model.CommonDomainConstants;
import com.huigou.data.query.model.QueryDescriptor; import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel; import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.base.bsnMessage.appliction.MannualStartWorkApplication; import com.huigou.topsun.base.bsnMessage.appliction.MannualStartWorkApplication;
import com.huigou.topsun.base.task.BaseTask;
import com.huigou.topsun.sap.common.DefaultHttpClient; import com.huigou.topsun.sap.common.DefaultHttpClient;
import com.huigou.topsun.sap.common.application.SapMutualEpLogApplication; import com.huigou.topsun.sap.common.application.SapMutualEpLogApplication;
import com.huigou.topsun.sap.common.domain.SapMutualEpLog; import com.huigou.topsun.sap.common.domain.SapMutualEpLog;
import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement;
import com.huigou.topsun.sap.purchase.domain.SapPurchase;
import com.huigou.topsun.sap.purchase.domain.SapPurchaseItem;
import com.huigou.topsun.sap.purchaseApproval.application.SapPurchaseApprovalApplication; import com.huigou.topsun.sap.purchaseApproval.application.SapPurchaseApprovalApplication;
import com.huigou.topsun.sap.purchaseApproval.application.SapPurchaseApprovalItemApplication; import com.huigou.topsun.sap.purchaseApproval.application.SapPurchaseApprovalItemApplication;
import com.huigou.topsun.sap.purchaseApproval.domain.SapPurchaseApproval; import com.huigou.topsun.sap.purchaseApproval.domain.SapPurchaseApproval;
...@@ -29,24 +25,16 @@ import com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalDto; ...@@ -29,24 +25,16 @@ import com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalDto;
import com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalItemVo; import com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalItemVo;
import com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalVo; import com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalVo;
import com.huigou.topsun.sap.purchaseApproval.repository.SapPurchaseApprovalRepository; import com.huigou.topsun.sap.purchaseApproval.repository.SapPurchaseApprovalRepository;
import com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder;
import com.huigou.topsun.sap.sapApplication.application.SapDictionaryApplication; import com.huigou.topsun.sap.sapApplication.application.SapDictionaryApplication;
import com.huigou.topsun.sap.transfers.application.SapStockTransfersApplication; import com.huigou.topsun.sap.transfers.application.SapStockTransfersApplication;
import com.huigou.topsun.util.SAPUtils;
import com.huigou.uasp.bmp.common.BizBillStatus; import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bmp.fn.CodeGenerator;
import com.huigou.uasp.bmp.operator.OperatorApplication; import com.huigou.uasp.bmp.operator.OperatorApplication;
import com.huigou.uasp.bmp.opm.domain.model.org.Org; import com.huigou.uasp.bmp.opm.domain.model.org.Org;
import com.huigou.uasp.bpm.FlowBroker; import com.huigou.uasp.bpm.FlowBroker;
import com.huigou.uasp.bpm.ProcessAction; import com.huigou.uasp.bpm.ProcessAction;
import com.huigou.uasp.bpm.ProcessStartModel;
import com.huigou.uasp.bpm.engine.application.WorkflowApplication;
import com.huigou.util.*; import com.huigou.util.*;
import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask; import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.impl.persistence.entity.ExecutionEntity;
import org.activiti.engine.impl.persistence.entity.TaskEntity;
import org.activiti.engine.runtime.ProcessInstance;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -84,6 +72,8 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa ...@@ -84,6 +72,8 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
private SapStockTransfersApplication sapStockTransfersApplication; private SapStockTransfersApplication sapStockTransfersApplication;
@Autowired @Autowired
private SapDictionaryApplication sapDictionaryApplication; private SapDictionaryApplication sapDictionaryApplication;
@Autowired
private BaseTask baseTask;
@Override @Override
protected String saveBizAndApprovalData() { protected String saveBizAndApprovalData() {
...@@ -289,6 +279,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa ...@@ -289,6 +279,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
BeanUtil.copyProperties(sapPurchaseApprovalDto.getLsDeader(), sapPurchaseApproval); BeanUtil.copyProperties(sapPurchaseApprovalDto.getLsDeader(), sapPurchaseApproval);
List<SapPurchaseApprovalItemVo> approvalItemVoList = sapPurchaseApprovalDto.getItems(); List<SapPurchaseApprovalItemVo> approvalItemVoList = sapPurchaseApprovalDto.getItems();
List<SapPurchaseApprovalItem> sapPurchaseApprovalItems = new ArrayList<>(); List<SapPurchaseApprovalItem> sapPurchaseApprovalItems = new ArrayList<>();
String loekz = "";//删除标识
for (SapPurchaseApprovalItemVo approvalItemVo : approvalItemVoList) { for (SapPurchaseApprovalItemVo approvalItemVo : approvalItemVoList) {
SapPurchaseApprovalItem sapPurchaseApprovalItem = new SapPurchaseApprovalItem(); SapPurchaseApprovalItem sapPurchaseApprovalItem = new SapPurchaseApprovalItem();
BeanUtil.copyProperties(approvalItemVo,sapPurchaseApprovalItem); BeanUtil.copyProperties(approvalItemVo,sapPurchaseApprovalItem);
...@@ -317,6 +308,9 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa ...@@ -317,6 +308,9 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
if ("7".equals(sapPurchaseApprovalItem.getPstyp())){ if ("7".equals(sapPurchaseApprovalItem.getPstyp())){
sapPurchaseApproval.setBatxt(sapPurchaseApprovalItem.getPtext()); sapPurchaseApproval.setBatxt(sapPurchaseApprovalItem.getPtext());
} }
if ("L".equals(approvalItemVo.getLoekz())){
loekz = "L";
}
} }
//knttp审批要素没有值时,赋值0,防止发起流程时报错 //knttp审批要素没有值时,赋值0,防止发起流程时报错
if (StringUtil.isBlank(sapPurchaseApproval.getKnttp())){ if (StringUtil.isBlank(sapPurchaseApproval.getKnttp())){
...@@ -354,6 +348,12 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa ...@@ -354,6 +348,12 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
List<String> collect = itemList.stream().map(SapPurchaseApprovalItem::getId).collect(Collectors.toList()); List<String> collect = itemList.stream().map(SapPurchaseApprovalItem::getId).collect(Collectors.toList());
sapPurchaseApprovalItemApplication.deleteByIds(collect); sapPurchaseApprovalItemApplication.deleteByIds(collect);
purchaseApprovalId = purchaseApproval.getId(); purchaseApprovalId = purchaseApproval.getId();
if ("L".equals(loekz)){
purchaseApproval.setStatusId(BizBillStatus.ABORTED.getId());
baseTask.deleteRunTimeTaskExtensionByBizId(purchaseApproval.getId());
baseTask.updateHistoricTaskInstanceExtensionByBizId(purchaseApproval.getId());
}
} }
this.sapPurchaseApprovalRepository.save(purchaseApproval); this.sapPurchaseApprovalRepository.save(purchaseApproval);
} }
...@@ -560,7 +560,8 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa ...@@ -560,7 +560,8 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
return newSapPurchaseApproval.getId(); return newSapPurchaseApproval.getId();
} }
private String checkOrderByPurchaseNo(String banfn) { @Override
public String checkOrderByPurchaseNo(String banfn) {
String result = ""; String result = "";
try { try {
List<Map<String, String>> mapList = sapDictionaryApplication.getSapDictionary("BANFN", banfn); List<Map<String, String>> mapList = sapDictionaryApplication.getSapDictionary("BANFN", banfn);
......
...@@ -196,5 +196,11 @@ public class SapPurchaseApprovalItem extends AbstractEntity { ...@@ -196,5 +196,11 @@ public class SapPurchaseApprovalItem extends AbstractEntity {
@Column(name = "BUKRS") @Column(name = "BUKRS")
private String bukrs; private String bukrs;
/**
* 删除标识
*/
@Column(name = "LOEKZ")
private String loekz;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -191,6 +191,10 @@ public class SapPurchaseApprovalItemVo { ...@@ -191,6 +191,10 @@ public class SapPurchaseApprovalItemVo {
@JsonProperty("BUKRS") @JsonProperty("BUKRS")
private String bukrs; private String bukrs;
/**
* 删除标识
*/
@JsonProperty("LOEKZ")
private String loekz;
} }
\ No newline at end of file
...@@ -13,6 +13,7 @@ import com.huigou.data.domain.model.CommonDomainConstants; ...@@ -13,6 +13,7 @@ import com.huigou.data.domain.model.CommonDomainConstants;
import com.huigou.data.query.model.QueryDescriptor; import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel; import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.base.bsnMessage.appliction.MannualStartWorkApplication; import com.huigou.topsun.base.bsnMessage.appliction.MannualStartWorkApplication;
import com.huigou.topsun.base.task.BaseTask;
import com.huigou.topsun.common.CommonUtils; import com.huigou.topsun.common.CommonUtils;
import com.huigou.topsun.ep.epApplication.EpApplication; import com.huigou.topsun.ep.epApplication.EpApplication;
import com.huigou.topsun.ep.epApplication.EpVo.EpProductInfoVo; import com.huigou.topsun.ep.epApplication.EpVo.EpProductInfoVo;
...@@ -110,7 +111,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -110,7 +111,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
@Autowired @Autowired
SapMutualEpLogApplication sapMutualEpLogApplication; SapMutualEpLogApplication sapMutualEpLogApplication;
@Autowired @Autowired
private RuntimeTaskExtensionRepository runtimeTaskExtensionRepository; private BaseTask baseTask;
@Autowired @Autowired
private NonProdApplyDeptRepository nonProdApplyDeptRepository; private NonProdApplyDeptRepository nonProdApplyDeptRepository;
...@@ -390,13 +391,8 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -390,13 +391,8 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
purchaseOrderId = purchaseOrder.getId(); purchaseOrderId = purchaseOrder.getId();
if ("L".equals(loekz)){ if ("L".equals(loekz)){
purchaseOrder.setStatusId(BizBillStatus.ABORTED.getId()); purchaseOrder.setStatusId(BizBillStatus.ABORTED.getId());
//删除待办任务 baseTask.deleteRunTimeTaskExtensionByBizId(purchaseOrder.getId());
List<String> kindIds = new ArrayList<>(); baseTask.updateHistoricTaskInstanceExtensionByBizId(purchaseOrder.getId());
kindIds.add("task");
List<RuntimeTaskExtension> extensionList = runtimeTaskExtensionRepository.findCoordinationTaskInstances(purchaseOrder.getId(), "process", kindIds);
if (!CollectionUtils.isEmpty(extensionList)){
runtimeTaskExtensionRepository.delete(extensionList);
}
} }
} }
this.sapPurchaseOrderRepository.save(purchaseOrder); this.sapPurchaseOrderRepository.save(purchaseOrder);
...@@ -483,6 +479,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -483,6 +479,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
SapPurchaseOrder newSapPurchaseOrder=new SapPurchaseOrder(); SapPurchaseOrder newSapPurchaseOrder=new SapPurchaseOrder();
ClassHelper.copyProperties(sapPurchaseOrder,newSapPurchaseOrder); ClassHelper.copyProperties(sapPurchaseOrder,newSapPurchaseOrder);
newSapPurchaseOrder.setId(""); newSapPurchaseOrder.setId("");
newSapPurchaseOrder.setBillCode("");
newSapPurchaseOrder.setRevokeReason(revokeReason);//撤审原因 newSapPurchaseOrder.setRevokeReason(revokeReason);//撤审原因
newSapPurchaseOrder.setRevokeType(revokeType);//撤审类型 newSapPurchaseOrder.setRevokeType(revokeType);//撤审类型
String pId=mannualStartWorkApplication.startWorkflow(newSapPurchaseOrder,PROCESS_DEFINITION_KEY,"sapPurchaseOrder"); String pId=mannualStartWorkApplication.startWorkflow(newSapPurchaseOrder,PROCESS_DEFINITION_KEY,"sapPurchaseOrder");
...@@ -560,7 +557,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -560,7 +557,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
if (StringUtil.isNotBlank(ltext)){ if (StringUtil.isNotBlank(ltext)){
strList.add(ltext); strList.add(ltext);
} }
if (StringUtil.isNotBlank(vbeln)){ if (StringUtil.isNotBlank(vbeln) && strList.size()>0){
headText2 = headText2 + vbeln + ":"+ String.join(";", strList); headText2 = headText2 + vbeln + ":"+ String.join(";", strList);
} }
} }
......
...@@ -349,6 +349,55 @@ public class SuppliersInfo extends FlowBillAbstractEntity { ...@@ -349,6 +349,55 @@ public class SuppliersInfo extends FlowBillAbstractEntity {
@Transient @Transient
private String sId; private String sId;
@Column(name = "contact")
private String contact;
@Column(name = "contact1")
private String contact1;
@Column(name = "contact2")
private String contact2;
@Column(name = "contact3")
private String contact3;
@Column(name = "tel_number1")
private String telNumber1;
@Column(name = "tel_number2")
private String telNumber2;
@Column(name = "tel_number3")
private String telNumber3;
@Column(name = "fax_number1")
private String faxNumber1;
@Column(name = "fax_number2")
private String faxNumber2;
@Column(name = "fax_number3")
private String faxNumber3;
/**
* 电子邮件地址
*/
@Column(name = "smtp_addr1")
private String smtpAddr1;
/**
* 电子邮件地址
*/
@Column(name = "smtp_addr2")
private String smtpAddr2;
/**
* 电子邮件地址
*/
@Column(name = "smtp_addr3")
private String smtpAddr3;
@Override @Override
protected String getCodeRuleId() { protected String getCodeRuleId() {
return "sapSuppliersInfo"; return "sapSuppliersInfo";
......
...@@ -52,7 +52,8 @@ ...@@ -52,7 +52,8 @@
t.MENGE, t.MENGE,
t.MEINS, t.MEINS,
t.MEINS_NAME, t.MEINS_NAME,
DATE_FORMAT(t.EEIND, '%Y-%m-%d') EEIND, t.EEIND,
t.BEDAT,
t.LIFNR, t.LIFNR,
t.LIFNR_NAME, t.LIFNR_NAME,
t.KBETR, t.KBETR,
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
t.banfn, t.banfn,
t.revoke_type, t.revoke_type,
t.revoke_reason, t.revoke_reason,
t.type,
t.message,
it.sap_purchase_id, it.sap_purchase_id,
it.bnfpo, it.bnfpo,
it.pstyp, it.pstyp,
......
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