Commit 4ea7314e authored by 鲁鑫's avatar 鲁鑫

ECN变更打印调整

parent ed5f93b8
...@@ -39,6 +39,9 @@ ${date?string("yyyy-MM-dd HH:mm:ss")}<#rt/> ...@@ -39,6 +39,9 @@ ${date?string("yyyy-MM-dd HH:mm:ss")}<#rt/>
.font_sm,.font_sm td{ .font_sm,.font_sm td{
font-size:12px; font-size:12px;
} }
table {
page-break-inside: avoid;
}
table.tablePrint{ table.tablePrint{
width:100%; width:100%;
table-layout:fixed; table-layout:fixed;
...@@ -88,6 +91,6 @@ ${date?string("yyyy-MM-dd HH:mm:ss")}<#rt/> ...@@ -88,6 +91,6 @@ ${date?string("yyyy-MM-dd HH:mm:ss")}<#rt/>
@page { @page {
size: 210mm 297mm; size: 210mm 297mm;
margin:5mm 3mm; margin:5mm 3mm;
} }
</style> </style>
\ No newline at end of file
...@@ -99,4 +99,20 @@ ADD COLUMN `follow_matter` varchar(128) NULL COMMENT '跟进事项' AFTER `date` ...@@ -99,4 +99,20 @@ ADD COLUMN `follow_matter` varchar(128) NULL COMMENT '跟进事项' AFTER `date`
--2024-10-11 ECN具体生效日期 --2024-10-11 ECN具体生效日期
ALTER TABLE `topsun_dev`.`ep_change_form` ALTER TABLE `topsun_dev`.`ep_change_form`
ADD COLUMN `effective_date` datetime NULL COMMENT '具体生效日期' AFTER `material_reason_for_change`; ADD COLUMN `effective_date` datetime NULL COMMENT '具体生效日期' AFTER `material_reason_for_change`;
\ No newline at end of file
--2024-10-12 采购订单供应商名称
ALTER TABLE `topsun_dev`.`sap_purchase_order`
ADD COLUMN `NAMEL` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称' AFTER `total_money`;
--2024-10-11 ECN添加评论字段
ALTER TABLE `topsun_dev`.`ep_change_form_impl_item`
ADD COLUMN `comments` varchar(255) NULL COMMENT '评论' AFTER `follow_matter`;
ALTER TABLE `topsun_dev`.`ep_change_form_stock_item`
ADD COLUMN `comments` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '评论' AFTER `executor`;
--2024-10-15 EP销售订单修改/取消增加单价和总价
ALTER TABLE `topsun_dev`.`ep_sale_order_cancel_item`
ADD COLUMN `PRICE` decimal(10, 3) NULL COMMENT '单价' AFTER `PROCESS`,
ADD COLUMN `AMOUNT` decimal(10, 3) NULL COMMENT '总价' AFTER `PRICE`;
\ No newline at end of file
...@@ -242,7 +242,10 @@ function loadGrid() { ...@@ -242,7 +242,10 @@ function loadGrid() {
editor: { editor: {
type: "dateTime" type: "dateTime"
} }
} },
{
display: "COMMENTS评论", name: "comments", width: 200, minWidth: 60, type: "string", align: "left"
},
], ],
dataAction: "server", dataAction: "server",
url: web_app.name + '/epChangeForm/slicedEpChangeFormImplItems.ajax', url: web_app.name + '/epChangeForm/slicedEpChangeFormImplItems.ajax',
...@@ -346,7 +349,10 @@ function loadStockGrid() { ...@@ -346,7 +349,10 @@ function loadStockGrid() {
editor: { editor: {
type: "dateTime" type: "dateTime"
} }
} },
{
display: "COMMENTS评论", name: "comments", width: 200, minWidth: 60, type: "string", align: "left"
},
], ],
dataAction: "server", dataAction: "server",
url: web_app.name + '/epChangeForm/slicedEpChangeFormStockItems.ajax', url: web_app.name + '/epChangeForm/slicedEpChangeFormStockItems.ajax',
......
...@@ -19,6 +19,7 @@ function loadGrid() { ...@@ -19,6 +19,7 @@ function loadGrid() {
exportExcelHandler: function () { exportExcelHandler: function () {
UICtrl.gridExport(gridManager); UICtrl.gridExport(gridManager);
}, },
//updateHandler: doUpdate,
printHandler: { printHandler: {
id: 'print', text: '打印', img:'fa-clipboard', click: function(){ id: 'print', text: '打印', img:'fa-clipboard', click: function(){
printHandler(); printHandler();
...@@ -98,6 +99,18 @@ function doView(id) { ...@@ -98,6 +99,18 @@ function doView(id) {
}); });
} }
function doUpdate() {
var row = DataUtil.getUpdateRow(gridManager);
if (!row) {
return;
}
UICtrl.addTabItem({
tabid: 'epChangeForm'+row.id,
text: "修改变更申请/通知单",
url: web_app.name + '/epChangeForm/showEpChangeFormDetail.job?bizId='+row.id
});
}
function printHandler(){ function printHandler(){
var row = DataUtil.getUpdateRow(gridManager); var row = DataUtil.getUpdateRow(gridManager);
if (!row) { if (!row) {
......
...@@ -133,7 +133,10 @@ function loadGrid() { ...@@ -133,7 +133,10 @@ function loadGrid() {
editor: { editor: {
type: "dateTime" type: "dateTime"
} }
} },
{
display: "COMMENTS评论", name: "comments", width: 200, minWidth: 60, type: "string", align: "left"
},
], ],
dataAction: "server", dataAction: "server",
url: web_app.name + '/epChangeForm/slicedEpChangeFormImplItems.ajax', url: web_app.name + '/epChangeForm/slicedEpChangeFormImplItems.ajax',
...@@ -237,7 +240,10 @@ function loadStockGrid() { ...@@ -237,7 +240,10 @@ function loadStockGrid() {
editor: { editor: {
type: "dateTime" type: "dateTime"
} }
} },
{
display: "COMMENTS评论", name: "comments", width: 200, minWidth: 60, type: "string", align: "left"
},
], ],
dataAction: "server", dataAction: "server",
url: web_app.name + '/epChangeForm/slicedEpChangeFormStockItems.ajax', url: web_app.name + '/epChangeForm/slicedEpChangeFormStockItems.ajax',
......
...@@ -58,6 +58,18 @@ function loadGrid() { ...@@ -58,6 +58,18 @@ function loadGrid() {
type: "text" type: "text"
} }
}, },
{
display: "单价", name: "price", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
type: "text"
}
},
{
display: "总价", name: "amount", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
type: "text"
}
},
{ {
display: "生产单号", name: "produceCode", width: 140, minWidth: 60, type: "string", align: "left", display: "生产单号", name: "produceCode", width: 140, minWidth: 60, type: "string", align: "left",
editor: { editor: {
......
...@@ -34,6 +34,12 @@ function loadGrid() { ...@@ -34,6 +34,12 @@ function loadGrid() {
{ {
display: "单位", name: "vrkme", width: 140, minWidth: 60, type: "string", align: "left", display: "单位", name: "vrkme", width: 140, minWidth: 60, type: "string", align: "left",
}, },
{
display: "单价", name: "price", width: 140, minWidth: 60, type: "string", align: "left",
},
{
display: "总价", name: "amount", width: 140, minWidth: 60, type: "string", align: "left",
},
{ {
display: "生产单号", name: "produceCode", width: 140, minWidth: 60, type: "string", align: "left", display: "生产单号", name: "produceCode", width: 140, minWidth: 60, type: "string", align: "left",
}, },
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title> 品牌报价单</title>
<#include "/print/commonStyleTemplate.ftl" />
<style type="text/css">
td {
font-size: 13px;
}
</style>
</head>
<body>
<div style="text-align: center;font-size: large;font-weight:bold;"> ${companyNameEn?default("")?html}</div>
<div style="text-align: center">${address?default("")?html}</div>
<div style="text-align: center">tel:${tel?default("")?html} fax: ${fax?default("")?html}</div>
<div style="text-align: center">email: ${email?default("")?html}</div>
<div style="text-align: center">————————————————————————————</div>
<div class="billTitle"> 报价单</div>
<table cellspacing="0px" cellpadding="0px" class="tablePrint">
<div style="text-align: left">${fillinDate?default("")?html}</div>
<div style="text-align: left">Attn: ${Attn?default("")?html} </div>
<div style="text-align: left">From: ${From?default("")?html}</div>
<div style="text-align: left">Re: ${Re?default("")?html}</div>
<div style="text-align: left">${bsn?default("")?html}</div>
</table>
<table cellspacing="0px" cellpadding="0px" class="tableBorder">
<colgroup>
<col width='10%'/>
<col width='20%'/>
<col width='15%'/>
<col width='40%'/>
<col width='6%'/>
<col width='9%'/>
</colgroup>
<tr>
<td class="center">Item#(项目)</td>
<td class="center">Product Name(品名)</td>
<td class="center">Image(图片)</td>
<td class="center">Spec(规格)</td>
<td class="center">(Exw)出厂价 Unit Price (US$/pc)</td>
<td class="center">Remark(备注)</td>
</tr>
<#if gridData?? && gridData?size gt 0>
<#list gridData as detail>
<tr>
<td class="center">${detail.sequence?default("")?html}</td>
<td class="center">${detail.productName?default("")?html}</td>
<td class="center">${detail.picture?default("")?html}</td>
<td class="center">${detail.spec?default("")?html}</td>
<td class="center">${detail.price?default("")?html}</td>
<td class="center">${detail.remark?default("")?html}</td>
</tr>
</#list>
<#else>
<tr>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
</tr>
</#if>
</table>
<div class="blank_div"></div>
<div style="text-align: left;font-size: large"> Terms</div>
<div style="text-align: left">${term1?default("")?html}</div>
<div style="text-align: left">${term2?default("")?html}</div>
<div style="text-align: left">${term3?default("")?html}</div>
<div style="text-align: left">${term4?default("")?html}</div>
<div style="text-align: left">${term5?default("")?html}</div>
<div class="blank_div"></div>
<div class="fontBold">审批明细</div>
<#include "/print/taskExecutionPrint.ftl" />
</body>
</html>
...@@ -9,36 +9,38 @@ ...@@ -9,36 +9,38 @@
td { td {
font-size: 13px; font-size: 13px;
} }
@page {
size: A4;
margin: 1.2cm 1cm 0cm;
@top-center {
content: element(header);
}
}
</style> </style>
</head> </head>
<body> <body>
<!-- 页眉部分 -->
<div class="billTitle"> <div style="position: running(header);" id="header">
<span style="position: absolute;margin-left: 50px"> <div class="billTitle" style="font-size: 25px">
<img src='data:image/jpg;base64,${bsnPng}' width="100px"/> 宝绅内部变更申请/通知单</div>
</span> <table cellspacing="0px" cellpadding="0px" class="tablePrint">
宝绅内部变更申请/通知单</div> <colgroup>
<div class="billTitle">Engineering Change Notice</div> <col width="20%"/>
<table cellspacing="0px" cellpadding="0px" class="tablePrint"> <col width="52%"/>
<colgroup> <col width="28%"/>
<col width="34%"/> <col width="28%"/>
<col width="34%"/> </colgroup>
</colgroup> <tr>
<tr> <td class="left">${changeNo?default("")?html}</td>
<td class="left">${changeNo?default("")?html}</td> <td class="right">
<td class="right">变更编号:${billCode?default("")?html}</td> <div style="text-align:right;font-weight:bold;font-size: 25px">Engineering Change Notice</div>
</tr> </td>
</table> <td class="right">变更编号:${billCode?default("")?html}</td>
<div class="title" style="background: #CC8F81;text-align: center">General Information 基本信息</div> </tr>
</table>
</div>
<div class="title" style="background: #CC8F81;text-align: center;margin-top: 100px">General Information 基本信息</div>
<table cellspacing="0px" cellpadding="0px" class="tableBorder"> <table cellspacing="0px" cellpadding="0px" class="tableBorder">
<#--<colgroup>
<col width='16%' />
<col width='17%' />
<col width='17%' />
<col width='17%' />
<col width='17%' />
<col width="16%" />
</colgroup>-->
<colgroup> <colgroup>
<col width='14%' /> <col width='14%' />
<col width='33%' /> <col width='33%' />
...@@ -46,11 +48,8 @@ ...@@ -46,11 +48,8 @@
</colgroup> </colgroup>
<tr> <tr>
<td class="left">DATE日期:<br/><@formatDate date=fillinDate/></td> <td class="left">DATE日期:<br/><@formatDate date=fillinDate/></td>
<#--<td class="center"><@formatDate date=fillinDate/></td>-->
<td class="left">BRAND品牌名称:<br/>${brandName?default("")?html}</td> <td class="left">BRAND品牌名称:<br/>${brandName?default("")?html}</td>
<#--<td class="center">${brandName?default("")?html}</td>-->
<td class="left">CHANGE REQUESTED BY (DEPT/NAME)变更申请部门/姓名:<br/>${deptName?default("")?html}</td> <td class="left">CHANGE REQUESTED BY (DEPT/NAME)变更申请部门/姓名:<br/>${deptName?default("")?html}</td>
<#--<td class="center">${deptName?default("")?html}</td>-->
</tr> </tr>
</table> </table>
<table cellspacing="0px" cellpadding="0px" class="tableBorder"> <table cellspacing="0px" cellpadding="0px" class="tableBorder">
...@@ -61,19 +60,12 @@ ...@@ -61,19 +60,12 @@
<td class="left">REASON FOR CHANGE变更原因:${reasonDesc?default("")?html} <td class="left">REASON FOR CHANGE变更原因:${reasonDesc?default("")?html}
<br/> <br/>
${reasonForChange?replace("nbsp", "&nbsp;&nbsp;&nbsp;&nbsp;")!default("")?html} ${reasonForChange?replace("nbsp", "&nbsp;&nbsp;&nbsp;&nbsp;")!default("")?html}
<br/>
${reasonForChange2?replace("nbsp", "&nbsp;&nbsp;&nbsp;&nbsp;")!default("")?html}
<span style="text-decoration: underline">其他:${otherReasonDesc?default("")?html}</span> <span style="text-decoration: underline">其他:${otherReasonDesc?default("")?html}</span>
</td> </td>
</tr> </tr>
</table> </table>
<#--<table cellspacing="0px" cellpadding="0px" class="tableBorder">-->
<#-- <colgroup>-->
<#-- <col width='100%' />-->
<#-- </colgroup>-->
<#-- <tr>-->
<#-- <td class="left">${reasonForChange?default("")?html}</td>-->
<#-- <td class="left">${otherReasonDesc?default("")?html}</td>-->
<#-- </tr>-->
<#--</table>-->
<table cellspacing="0px" cellpadding="0px" class="tableBorder"> <table cellspacing="0px" cellpadding="0px" class="tableBorder">
<colgroup> <colgroup>
<col width='100%' /> <col width='100%' />
...@@ -148,13 +140,11 @@ ...@@ -148,13 +140,11 @@
</table> </table>
<div class="blank_div"></div> <div class="blank_div"></div>
<#--<div class="fontBold">审批明细</div>-->
<#--<#include "/print/taskExecutionPrint.ftl" />-->
<div class="title" style="background: #CC8F81;text-align: center">Approvals / Checks 确认</div> <div class="title" style="background: #CC8F81;text-align: center">Approvals / Checks 确认</div>
<table cellspacing="0px" cellpadding="0px" class="tableBorder"> <table cellspacing="0px" cellpadding="0px" class="tableBorder">
<colgroup> <colgroup>
<col width='22%' /> <col width='22%' />
<col width='28%' /> <col width='25%' />
<col width='50%' /> <col width='50%' />
</colgroup> </colgroup>
<tr> <tr>
...@@ -180,18 +170,12 @@ ...@@ -180,18 +170,12 @@
</table> </table>
<div class="title" style="background: #CC8F81;text-align: center">Implementation 执行人(版具/模具等)</div> <div class="title" style="background: #CC8F81;text-align: center">Implementation 执行人(版具/模具等)</div>
<table cellspacing="0px" cellpadding="0px" class="tableBorder"> <table cellspacing="0px" cellpadding="0px" class="tableBorder">
<#-- <colgroup>-->
<#-- <col width='25%' />-->
<#-- <col width='25%' />-->
<#-- <col width='25%' />-->
<#-- <col width='25%' />-->
<#-- </colgroup>-->
<colgroup> <colgroup>
<col width='14%' /> <col width='14%' />
<col width='25%' /> <col width='25%' />
<col width='10%' /> <col width='10%' />
<col width='18%' /> <col width='12%' />
<col width='33%' /> <col width='39%' />
</colgroup> </colgroup>
<tr> <tr>
<td class="center" style="background: yellow">部门</td> <td class="center" style="background: yellow">部门</td>
...@@ -208,7 +192,7 @@ ...@@ -208,7 +192,7 @@
<td class="center">${detail.followMatter?default("")?html}</td> <td class="center">${detail.followMatter?default("")?html}</td>
<td class="center">${detail.executor?default("")?html}</td> <td class="center">${detail.executor?default("")?html}</td>
<td class="center">${detail.date?default("")?html}</td> <td class="center">${detail.date?default("")?html}</td>
<td class="center">${detail.comment?default("")?html}</td> <td class="center">${detail.comments?default("")?html}</td>
</tr> </tr>
</#list> </#list>
<#else> <#else>
...@@ -223,24 +207,12 @@ ...@@ -223,24 +207,12 @@
</table> </table>
<div class="title" style="background: #CC8F81;text-align: center">Stock / Inventory 库存</div> <div class="title" style="background: #CC8F81;text-align: center">Stock / Inventory 库存</div>
<table cellspacing="0px" cellpadding="0px" class="tableBorder"> <table cellspacing="0px" cellpadding="0px" class="tableBorder">
<#-- <colgroup>-->
<#-- <col width='25%' />-->
<#-- <col width='25%' />-->
<#-- <col width='25%' />-->
<#-- <col width='25%' />-->
<#-- </colgroup>-->
<#-- <colgroup>-->
<#-- <col width='14%' />-->
<#-- <col width='51%' />-->
<#-- <col width='16%' />-->
<#-- <col width='17%' />-->
<#-- </colgroup>-->
<colgroup> <colgroup>
<col width='14%' /> <col width='14%' />
<col width='25%' /> <col width='25%' />
<col width='10%' /> <col width='10%' />
<col width='18%' /> <col width='12%' />
<col width='33%' /> <col width='39%' />
</colgroup> </colgroup>
<tr> <tr>
<td class="center" style="background: yellow">部门</td> <td class="center" style="background: yellow">部门</td>
...@@ -256,7 +228,7 @@ ...@@ -256,7 +228,7 @@
<td class="center">${detail.description?default("")?html}</td> <td class="center">${detail.description?default("")?html}</td>
<td class="center">${detail.executor?default("")?html}</td> <td class="center">${detail.executor?default("")?html}</td>
<td class="center">${detail.date?default("")?html}</td> <td class="center">${detail.date?default("")?html}</td>
<td class="center">${detail.comment?default("")?html}</td> <td class="center">${detail.comments?default("")?html}</td>
</tr> </tr>
</#list> </#list>
<#else> <#else>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title> 工厂报价单</title>
<#include "/print/commonStyleTemplate.ftl" />
<style type="text/css">
td {
font-size: 13px;
}
</style>
</head>
<body>
<div class="billTitle"> ${companyName?default("")?html}</div>
<div style="text-align: center">${address?default("")?html}</div>
<div style="text-align: center">tel:${tel?default("")?html} fax: ${fax?default("")?html}</div>
<div style="text-align: center">email: ${email?default("")?html}</div>
<div style="text-align: center">————————————————————————————</div>
<div class="billTitle"> 报价单</div>
<table cellspacing="0px" cellpadding="0px" class="tablePrint">
<colgroup>
<col width='50%'/>
<col width="50%"/>
</colgroup>
<tr>
<td class="left">客户名称:${customerManagerId?default("")?html}</td>
<td class="right">报价单号:${quotationNo?default("")?html}</td>
</tr>
</table>
<table cellspacing="0px" cellpadding="0px" class="tablePrint">
<colgroup>
<col width='50%'/>
<col width="50%"/>
</colgroup>
<tr>
<td class="left">联系人:${personMemberName?default("")?html}</td>
<td class="right">报价日期:${fillinDate?default("")?html}</td>
</tr>
</table>
<table cellspacing="0px" cellpadding="0px" class="tableBorder">
<colgroup>
<col width='10%'/>
<col width='20%'/>
<col width='40%'/>
<col width='5%'/>
<col width='10%'/>
<col width='6%'/>
<col width='9%'/>
</colgroup>
<tr>
<td class="center">序号</td>
<td class="center">产品名称</td>
<td class="center">产品名称及规格</td>
<td class="center">单位</td>
<td class="center">币别</td>
<td class="center">单价</td>
<td class="center">备注</td>
</tr>
<#if gridData?? && gridData?size gt 0>
<#list gridData as detail>
<tr>
<td class="center">${detail.sequence?default("")?html}</td>
<td class="center">${detail.productCode?default("")?html}</td>
<td class="center">${detail.productName?default("")?html}</td>
<td class="center">${detail.productUnit?default("")?html}</td>
<td class="center">${detail.currency?default("")?html}</td>
<td class="center">${detail.price?default("")?html}</td>
<td class="center">${detail.remark?default("")?html}</td>
</tr>
</#list>
<#else>
<tr>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
</tr>
</#if>
<tr style="height: 70px">
<td class="center">备注</td>
<td class="left" colspan="7">${quotationRemark?default("")?html}</td>
</tr>
<tr style="height: 70px">
<td class="left" colspan="7">${quotationNote?default("")?html}</td>
</tr>
</table>
<div class="blank_div"></div>
<div class="fontBold">审批明细</div>
<#include "/print/taskExecutionPrint.ftl" />
</body>
</html>
...@@ -130,6 +130,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -130,6 +130,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
if (org.getId().equals(epChangeFormImplItem.getExecutorId())){ if (org.getId().equals(epChangeFormImplItem.getExecutorId())){
epChangeFormImplItem.setConfirm("1"); epChangeFormImplItem.setConfirm("1");
epChangeFormImplItem.setDate(new Date()); epChangeFormImplItem.setDate(new Date());
epChangeFormImplItem.setComments(procUnitHandler.getOpinion());
} }
} }
changeFormImplItemApplication.saveEpChangeFormImplItems(bizId,formImplItemList); changeFormImplItemApplication.saveEpChangeFormImplItems(bizId,formImplItemList);
...@@ -140,6 +141,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -140,6 +141,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
if (org.getId().equals(epChangeFormStockItem.getExecutorId())){ if (org.getId().equals(epChangeFormStockItem.getExecutorId())){
epChangeFormStockItem.setConfirm("1"); epChangeFormStockItem.setConfirm("1");
epChangeFormStockItem.setDate(new Date()); epChangeFormStockItem.setDate(new Date());
epChangeFormStockItem.setComments(procUnitHandler.getOpinion());
} }
} }
changeFormStockItemApplication.saveEpChangeFormStockItems(bizId,stockItemList); changeFormStockItemApplication.saveEpChangeFormStockItems(bizId,stockItemList);
...@@ -274,7 +276,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -274,7 +276,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
List<String> strings = Arrays.asList(split); List<String> strings = Arrays.asList(split);
StringBuilder change = new StringBuilder(); StringBuilder change = new StringBuilder();
Map<String, String> finalReasonForChangeMap = reasonForChangeMap; Map<String, String> finalReasonForChangeMap = reasonForChangeMap;
finalReasonForChangeMap.keySet().forEach(key->{ finalReasonForChangeMap.keySet().stream().limit(3).forEach(key->{
if (strings.contains(key)){ if (strings.contains(key)){
change.append(" √ "); change.append(" √ ");
} }
...@@ -287,6 +289,19 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -287,6 +289,19 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
}); });
map.put("reasonForChange",change.toString()); map.put("reasonForChange",change.toString());
StringBuilder change2 = new StringBuilder();
finalReasonForChangeMap.keySet().stream().skip(0).skip(1).skip(2).forEach(key->{
if (strings.contains(key)){
change2.append(" √ ");
}
if (StringUtil.isNotBlank(reasonForChangeMaterial)){
change2.append(finalReasonForChangeMap.get(key)).append("nbsp");
}
if (StringUtil.isNotBlank(reasonForChangePD)){
change2.append(key).append(" ").append(finalReasonForChangeMap.get(key)).append("nbsp");
}
});
map.put("reasonForChange2",change2.toString());
//处理生效日期类型 //处理生效日期类型
//例如:√ IMMEDIATE 立即变更 RUNNING CHANGE 正常变更(用完后变更) SEASON 换季更改 //例如:√ IMMEDIATE 立即变更 RUNNING CHANGE 正常变更(用完后变更) SEASON 换季更改
Map<String, String> changeEffective = DictUtil.getDictionary("changeEffective"); Map<String, String> changeEffective = DictUtil.getDictionary("changeEffective");
...@@ -331,6 +346,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -331,6 +346,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
itemMap.put("comment",approvalMap.get("opinion")); itemMap.put("comment",approvalMap.get("opinion"));
} }
}); });
itemMap.put("date",DateUtil.getDateFormat((Date) itemMap.get("date"),"yyyy-MM-dd"));
}); });
List<Map<String, Object>> stockItemMaps = (List<Map<String, Object>>) stockItemMap.get("Rows"); List<Map<String, Object>> stockItemMaps = (List<Map<String, Object>>) stockItemMap.get("Rows");
stockItemMaps.forEach(itemMap->{ stockItemMaps.forEach(itemMap->{
...@@ -339,6 +355,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -339,6 +355,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
itemMap.put("comment",approvalMap.get("opinion")); itemMap.put("comment",approvalMap.get("opinion"));
} }
}); });
itemMap.put("date",DateUtil.getDateFormat((Date) itemMap.get("date"),"yyyy-MM-dd"));
}); });
map.put("printTime", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm").format(LocalDateTime.now())); map.put("printTime", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm").format(LocalDateTime.now()));
map.put("implItemMaps", implItemMaps); map.put("implItemMaps", implItemMaps);
......
...@@ -60,4 +60,10 @@ public class EpChangeFormImplItem extends AbstractEntity { ...@@ -60,4 +60,10 @@ public class EpChangeFormImplItem extends AbstractEntity {
*/ */
@Column(name = "follow_matter") @Column(name = "follow_matter")
private String followMatter; private String followMatter;
/**
* 评论
*/
@Column(name = "comments")
private String comments;
} }
...@@ -60,4 +60,10 @@ public class EpChangeFormStockItem extends AbstractEntity { ...@@ -60,4 +60,10 @@ public class EpChangeFormStockItem extends AbstractEntity {
*/ */
@Column(name = "date") @Column(name = "date")
private Date date; private Date date;
/**
* 评论
*/
@Column(name = "comments")
private String comments;
} }
...@@ -45,6 +45,7 @@ import org.springframework.util.Assert; ...@@ -45,6 +45,7 @@ import org.springframework.util.Assert;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -264,6 +265,10 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa ...@@ -264,6 +265,10 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa
epSaleOrderCancelItemVos.forEach(epSaleOrderCancelItemVo -> { epSaleOrderCancelItemVos.forEach(epSaleOrderCancelItemVo -> {
EpSaleOrderCancelItem epSaleOrderCancelItem = new EpSaleOrderCancelItem(); EpSaleOrderCancelItem epSaleOrderCancelItem = new EpSaleOrderCancelItem();
BeanUtil.copyProperties(epSaleOrderCancelItemVo, epSaleOrderCancelItem); BeanUtil.copyProperties(epSaleOrderCancelItemVo, epSaleOrderCancelItem);
BigDecimal price = epSaleOrderCancelItem.getPrice();
BigDecimal kwmeng = epSaleOrderCancelItem.getKwmeng();
BigDecimal multiply = price.multiply(kwmeng);
epSaleOrderCancelItem.setAmount(multiply);
epSaleOrderCancelItems.add(epSaleOrderCancelItem); epSaleOrderCancelItems.add(epSaleOrderCancelItem);
}); });
this.epSaleOrderCancelItemApplication.saveEpSaleOrderCancelItems(epSaleOrderCancel.getId(), epSaleOrderCancelItems); this.epSaleOrderCancelItemApplication.saveEpSaleOrderCancelItems(epSaleOrderCancel.getId(), epSaleOrderCancelItems);
......
package com.huigou.topsun.ep.order.domain; package com.huigou.topsun.ep.order.domain;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huigou.data.domain.model.AbstractEntity; import com.huigou.data.domain.model.AbstractEntity;
import lombok.Data; import lombok.Data;
...@@ -71,4 +72,16 @@ public class EpSaleOrderCancelItem extends AbstractEntity { ...@@ -71,4 +72,16 @@ public class EpSaleOrderCancelItem extends AbstractEntity {
@Column(name = "PROCESS") @Column(name = "PROCESS")
private String process; private String process;
/**
* 单价
*/
@Column(name = "price")
private BigDecimal price;
/**
* 总价
*/
@Column(name = "amount")
private BigDecimal amount;
} }
...@@ -3,7 +3,6 @@ package com.huigou.topsun.ep.order.domain.vo; ...@@ -3,7 +3,6 @@ package com.huigou.topsun.ep.order.domain.vo;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import javax.persistence.Column;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -66,4 +65,11 @@ public class EpSaleOrderCancelItemVo implements Serializable { ...@@ -66,4 +65,11 @@ public class EpSaleOrderCancelItemVo implements Serializable {
*/ */
@JsonProperty("process") @JsonProperty("process")
private String process; private String process;
/**
* 单价
*/
@JsonProperty("price")
private BigDecimal price;
} }
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
SELECT SELECT
CONCAT( t.SUB_PROC_UNIT_NAME, ":", t.HANDLER_NAME ) AS approval_name, CONCAT( t.SUB_PROC_UNIT_NAME, ":", t.HANDLER_NAME ) AS approval_name,
t.HANDLER_NAME, t.HANDLER_NAME,
t.HANDLED_DATE, DATE_FORMAT(t.HANDLED_DATE, '%Y-%m-%d') as HANDLED_DATE,
t.OPINION t.OPINION
FROM FROM
wf_procunithandler t WHERE t.BIZ_ID = ? and t.RESULT = 1 and t.SUB_PROC_UNIT_ID != 'executorId' ORDER BY t.GROUP_ID,t.HANDLED_DATE ASC wf_procunithandler t WHERE t.BIZ_ID = ? and t.RESULT = 1 and t.SUB_PROC_UNIT_ID != 'executorId' ORDER BY t.GROUP_ID,t.HANDLED_DATE ASC
......
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