Commit 33c07956 authored by 刘学辉's avatar 刘学辉

品质异常单调整

parent b5a1b452
......@@ -65,3 +65,5 @@ CREATE TABLE topsun_dev.sap_exception_responsible (
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_general_ci;
--2024-09-19 异常单增加产品类别字段
ALTER TABLE topsun_dev.sap_exception_report ADD product_type varchar(100) NULL COMMENT '产品类别';
......@@ -8,7 +8,7 @@
</head>
<body>
<div class="container-fluid">
<x:billTitle title="品质异常报告(生产)" needStatus="true" needPerson="true"/>
<x:billTitle title="品质异常报告" needStatus="true" needPerson="true"/>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="billType"/>
<x:hidden name="id"/>
......@@ -36,28 +36,49 @@
</div>
</c:if>
<div class="hg-form-row">
<x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/>
<x:inputC name="reportDate" label="呈报日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
<x:inputC name="werksName" required="true" label="工厂" labelCol="1" wrapper="select" fieldCol="2"/>
<x:hidden name="werks"/>
<x:inputC name="reportDate" label="呈报日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
<x:selectC name="urgency" label="紧急程度" labelCol="1" fieldCol="2" required="true" dictionary="urgency"/>
<x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/>
<x:selectC name="exceptionReasonType" label="异常原因分类" labelCol="1" fieldCol="2" required="true" dictionary="exceptionReasonType"/>
<x:inputC name="productType" label="产品类别" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="appealNo" label="客诉编号" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="exceptionDate" label="异常日期" labelCol="1" fieldCol="2" required="false" wrapper="date"/>
</div>
</div>
<div class="hg-form-cols" id="purchaseDiv">
<div class="hg-form-row">
<x:inputC name="customerNo" label="客户编号" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="customerOrderNo" label="客户订单号" labelCol="1" fieldCol="2" wrapper="select" required="true"/>
<x:inputC name="customerName" label="客户名称" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:inputC name="customerNamePur" label="客户名称" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="customerOrderNoPur" label="客户订单号" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="brandName" label="品牌名称" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="problemTimes" label="问题发生次数" labelCol="1" fieldCol="2" required="false"/>
<x:checkbox name="needImproveReport" id="needImproveReport" cssStyle="margin-left:10px;" label="客户是否需要改善报告"/>
<x:checkbox name="needGuarantee" id="needGuarantee" cssStyle="margin-left:10px;" label="客户是否需要保证书"/>
</div>
</div>
<div id="purchasegrid"></div>
</div>
<div class="hg-form-cols" id="produceDiv">
<div class="hg-form-row">
<x:inputC name="customerNo" label="客户编号" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="customerOrderNo" label="生产订单号" labelCol="1" fieldCol="2" wrapper="select" required="false"/>
<x:inputC name="customerName" label="客户名称" labelCol="1" fieldCol="2" required="false" readonly="true"/>
</div>
<x:title title="单号信息" name="group" hideTable="#info" />
<div id="maingrid"></div>
</div>
<div class="hg-form-cols">
<div class="hg-form-row">
<x:textareaC name="exceptionState" required="false" label="异常陈诉" maxLength="120" labelCol="1" fieldCol="11" rows="3"/>
</div>
<div style="padding-top: 15px;">
<x:fileList bizCode="exceptionStateInfo" bizId="attbizId" id="exceptionStateInfoList" title="相关资料" />
</div>
<div class="hg-form-row">
<x:textareaC name="exceptionState" required="false" label="异常陈诉" maxLength="120" labelCol="1" fieldCol="11" rows="3"/>
</div>
<div class="hg-form-row">
<x:textareaC name="exceptionReason" required="false" label="异常原因" maxLength="120" labelCol="1" fieldCol="11" rows="3"/>
</div>
......
......@@ -41,7 +41,7 @@
</div>
<div class="hg-form-row">
<!--x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/-->
<x:inputC name="exceptionDate" label="发现日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
<x:inputC name="exceptionDate" label="异常日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
<x:inputC name="reportDate" label="呈报日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
<x:selectC name="exceptionReasonType" label="异常原因分类" labelCol="1" fieldCol="2" required="true" dictionary="exceptionReasonType"/>
......
......@@ -43,11 +43,11 @@ function initGrid() {
});
gridManager = UICtrl.grid('#maingrid', {
columns: [
{display: "状态", name: "statusTextView", width: "80", align: "left", type: "string"}
{display: "状态", name: "statusTextView", width: "60", align: "left", type: "string"}
, {display: "id", name: "id", width: "100", align: "left", type: "string", hide: true}
, {display: "报告编号", name: "billCode", width: 150, minWidth: 60, type: "string", align: "center"}
, {display: "异常类型", name: "exceptionTypeTextView", width: 100, minWidth: 60, type: "string", align: "center"}
, {display: "单据类型", name: "billType", width: 100, minWidth: 60, type: "string", align: "center",
, {display: "异常类型", name: "exceptionTypeTextView", width: 80, minWidth: 60, type: "string", align: "center"}
, {display: "单据类型", name: "billType", width: 80, minWidth: 60, type: "string", align: "center",
render: function (item) {
if (item.billType=="supplier"){
return "供应商";
......@@ -60,17 +60,22 @@ function initGrid() {
}
}
}
, {display: "呈报日期", name: "reportDate", width: 140, minWidth: 60, type: "date", align: "center"}
, {display: "异常原因分类", name: "exceptionReasonTypeTextView", width: 100, minWidth: 60, type: "string", align: "center"}
, {display: "呈报日期", name: "reportDate", width: 100, minWidth: 60, type: "date", align: "center"}
, {display: "异常日期", name: "exceptionDate", width: 100, minWidth: 60, type: "date", align: "center"}
// , {display: "异常标题", name: "exceptionTitle", width: 200, minWidth: 60, type: "date", align: "center"}
// , {display: "客户编号", name: "customerName", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "客户名称", name: "customerName", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "客户单号", name: "customerOrderNo", width: 180, minWidth: 60, type: "date", align: "center"}
, {display: "紧急程度", name: "urgencyTextView", width: 80, minWidth: 60, type: "date", align: "center"}
, {display: "改善措施", name: "dealMethod", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "异常原因", name: "exceptionReason", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "责任人", name: "checkOperatorName", width: 160, minWidth: 60, type: "date", align: "center"}
, {display: "责任部门", name: "dutyDeptName", width: 120, minWidth: 60, type: "date", align: "center"}
, {display: "责任人", name: "checkOperatorName", width: 100, minWidth: 60, type: "date", align: "center"}
, {display: "处理结果", name: "dealResult", width: 200, minWidth: 60, type: "date", align: "center"}
//, {display: "备注", name: "remark", width: 200, minWidth: 60, type: "date", align: "center"}
, {display: "创建日期", name: "fillinDate", width: 150, minWidth: 60, type: "date", align: "center"}
, {display: "创建日期", name: "fillinDate", width: 150, minWidth: 60, type: "dateTime", align: "center"}
, {display: "创建部门", name: "deptName", width: 120, minWidth: 60, type: "date", align: "center"}
, {display: "创建人", name: "personMemberName", width: 100, minWidth: 60, type: "date", align: "center"}
],
......
......@@ -25,7 +25,9 @@
<x:inputC name="endDate" label="呈报结束日期" wrapper="date" labelCol="1" />
<x:inputC name="checkOperatorName" label="责任人" labelCol="1"/>
<x:inputC name="dutyDeptName" label="责任部门" labelCol="1"/>
<x:selectC name="exceptionReasonType" label="异常原因分类" labelCol="1" dictionary="exceptionReasonType"/>
<x:selectC name="status" label="状态" labelCol="1" fieldCol="2" dictionary="bizBillStatus"/>
<x:selectC name="urgency" label="紧急程度" labelCol="1" fieldCol="2" dictionary="urgency"/>
</div>
<x:searchButtons/>
</form>
......
......@@ -283,7 +283,7 @@
</tr>
</table>
<table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt;text-align: center;font-size: 9.5pt;line-height: 10pt;">
<tr style="text-align: center;font-size:6.5pt;line-height: 10pt;">
<tr style="text-align: center;font-size:6.5pt;line-height: 10pt;height: 200pt;">
<td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; vertical-align:top; width:50pt">
<p style="margin:5pt; orphans:0; widows:0;width:100pt"><span style="font-family:SimSun; font-weight:bolder ">异常描述</span></p>
</td>
......
......@@ -165,6 +165,13 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
if (StringUtils.isBlank(exceptionReport.getDutyDept())){
exceptionReport.setDutyDept("0");
}
if (!"supplier".equals(exceptionReport.getBillType())&&"3".equals(exceptionReport.getExceptionReasonType())){ //客户异常
exceptionReport.setCustomerNo(exceptionReport.getCustomerNoPur());
exceptionReport.setCustomerName(exceptionReport.getCustomerNamePur());
exceptionReport.setCustomerOrderNo(exceptionReport.getCustomerOrderNoPur());
exceptionReport.setBillType("purchase");
}
/* 采购的单据 根据加减签 去更改为责任人
if (exceptionReport.getStatusId()==1&&("purchase".equals(exceptionReport.getBillType())||"outgoing".equals(exceptionReport.getBillType()))
//&&!"auditDept".equals(exceptionReport.getHandleNodeId()) //不是审计部审批的
......@@ -215,6 +222,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
List<ExceptionReportGoods> exceptionReportGoodsList = this.getBizEntities(ExceptionReportGoods.class, "handleGoods");
if ("supplier".equals(exceptionReport.getBillType())){ //供应商 默认类型
exceptionReport.setExceptionType("out");
exceptionReport.setExceptionReasonType("3");
}
if (("supplier".equals(exceptionReport.getBillType()))&&"pay".equals(exceptionReport.getDealWay())
......@@ -426,7 +434,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
}
this.saveExceptionReport(exceptionReport);
//采购异常单根据责任部门是采购部门则生成供应商异常单
if ("produce".equals(exceptionReport.getBillType())
if ("purchase".equals(exceptionReport.getBillType())
//&&StringUtil.isNotBlank(exceptionReport.getDutyDept())
&&!"0".equals(exceptionReport.getDutyDept())) {
Org org = orgApplication.loadOrg(exceptionReport.getDutyDept());
......@@ -438,6 +446,14 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
suppExceptionReport.setExceptionType(exceptionReport.getExceptionType());
suppExceptionReport.setExceptionTitle(exceptionReport.getExceptionTitle());
suppExceptionReport.setExceptionDate(exceptionReport.getExceptionDate());
suppExceptionReport.setCustomerOrderNo(exceptionReport.getCustomerOrderNo());
suppExceptionReport.setCustomerName(exceptionReport.getCustomerName());
suppExceptionReport.setUrgency(exceptionReport.getUrgency());
suppExceptionReport.setExceptionState(exceptionReport.getExceptionState());
suppExceptionReport.setExceptionReason(exceptionReport.getExceptionReason());
suppExceptionReport.setNeedGuarantee(exceptionReport.getNeedGuarantee());
suppExceptionReport.setNeedImproveReport(exceptionReport.getNeedImproveReport());
suppExceptionReport.setWerks(exceptionReport.getWerks());
suppExceptionReport.setWerksName(exceptionReport.getWerksName());
suppExceptionReport.setBrandName(exceptionReport.getBrandName());
......@@ -448,6 +464,26 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
Operator operator = ThreadLocalUtil.getOperator();
suppExceptionReport.setPersonMemberId(operator.getPersonMemberId());
suppExceptionReport.setPersonMemberName(operator.getPersonMemberName());
/* ExceptionReportQueryRequest queryRequest = new ExceptionReportQueryRequest();
queryRequest.setExceptionReportId(bizId);
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "exceptionReportItems");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
queryModel.setPageIndex(1);
queryModel.setPageSize(200);
Map<String,Object> mapItems= this.sqlExecutorDao.executeSlicedQuery(queryModel);
List<ExceptionReportItem> exceptionReportItems=(List<ExceptionReportItem>)mapItems.get("Rows");
queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "exceptionReportDutyPersons");
queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
queryModel.setPageIndex(1);
queryModel.setPageSize(200);
Map<String,Object> mapDutyItems= this.sqlExecutorDao.executeSlicedQuery(queryModel);
List<ExceptionReportDutyPerson> exceptionDutyItems=(List<ExceptionReportDutyPerson>)mapDutyItems.get("Rows");
*/
//创建供应商异常
asyncWriteExecutor.execute(()->
// mannualStartWorkApplication.startWorkflow(suppExceptionReport,PROCESS_DEFINITION_KEY,"exceptionReport")
......@@ -466,7 +502,8 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
exceptionReport.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
Map<String, Object> formData = BeanUtil.beanToMap(exceptionReport);
// formData.put("exceptionReportItems",exceptionItems);
// formData.put("personList",exceptionDutyItems);
//启动流程实例
this.startProcessInstance(PROCESS_DEFINITION_KEY, formData);
......
......@@ -112,8 +112,12 @@ public class ExceptionReportController extends CommonController {
SDO sdo = this.getSDO();
String id = sdo.getBizId();
ExceptionReport exceptionReport = exceptionReportApplication.findById(id);
if ("purchase".equals(exceptionReport.getBillType())||"outgoing".equals(exceptionReport.getBillType())) {
return forward("exceptionReportDetailPurchase", exceptionReport);
exceptionReport.setCustomerNoPur(exceptionReport.getCustomerOrderNo());
exceptionReport.setCustomerNamePur(exceptionReport.getCustomerName());
exceptionReport.setCustomerOrderNoPur(exceptionReport.getCustomerOrderNo());
return forward("exceptionReportDetail", exceptionReport);
} else if ("supplier".equals(exceptionReport.getBillType())){
return forward("exceptionReportDetailSupplier", exceptionReport);
} else {
......
......@@ -6,6 +6,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
......@@ -37,9 +38,15 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column(name = "customer_name")
private String customerName;
@Transient
private String customerNamePur;
@Column(name = "customer_no")
private String customerNo;
@Transient
private String customerNoPur;
@Column(name = "werks")
private String werks;
......@@ -52,6 +59,8 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column(name = "customer_order_no")
private String customerOrderNo;
@Transient
private String customerOrderNoPur;
/**
* 异常陈诉
*/
......@@ -168,7 +177,7 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column(name = "appeal_no")
private String appealNo;
//紧急程度
@Column(name = "urgency")
private String urgency;
......@@ -193,6 +202,9 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column(name = "handle_node_id")
private String handleNodeId;
@Column(name = "product_type")
private String productType;
@Override
protected String getCodeRuleId() {
return "exceptionReport";
......
......@@ -22,4 +22,7 @@ public class ExceptionReportQueryRequest extends QueryAbstractRequest {
private String checkOperatorName;
private String dutyDeptName;
private String billCode;
private String exceptionReasonType;
private String urgency;
}
......@@ -127,7 +127,8 @@ public class SapMaterialApplicationImpl implements SapMaterialApplication {
} else if (StringUtils.isNotBlank(queryRequest.getKunnr())) { //查询订单号
for (Map map : mapList) {
Map newMap = new HashMap();
newMap.put("VBELN", map.get("VBELN"));
//newMap.put("VBELN", map.get("VBELN")); BSTNK
newMap.put("VBELN", map.get("BSTNK"));
newMap.put("KUNNR", map.get("KUNNR"));
newMap.put("NAME1", map.get("NAME1"));
sapOrderVoList.add(newMap);
......
......@@ -14,6 +14,9 @@
<condition column="duty_dept_name" name="dutyDeptName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="report_date" name="startDate" type="java.util.Date" symbol="&gt;=" alias="t"/>
<condition column="report_date" name="endDate" type="java.util.Date" symbol="&lt;=" alias="t"/>
<condition column="exception_reason_type" name="exceptionReasonType" type="java.lang.String" symbol="=" alias="t"/>
<condition column="urgency" name="urgency" type="java.lang.String" symbol="=" alias="t"/>
</query>
<query name="exceptionReportItems" label="品质异常报告明细" table="sap_exception_report_item">
......
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