Commit f97a9611 authored by 1650842865's avatar 1650842865

品质异常报告查询条件完善

parent 4afb0917
......@@ -17,19 +17,30 @@
<form class="hg-form ui-show" method="post" action="" id="queryMainForm">
<div class="hg-form-row">
<x:inputC name="billCode" label="报告编号" labelCol="1"/>
<x:inputC name="startDate" label="呈报开始日期" wrapper="dateTime" labelCol="1" />
<x:inputC name="endDate" label="呈报结束日期" wrapper="dateTime" labelCol="1" />
<x:inputC name="customerName" label="客户名称" labelCol="1"/>
<x:inputC name="customerOrderNo" label="客户单号" labelCol="1"/>
<x:inputC name="deptName" label="创建部门" labelCol="1"/>
<x:inputC name="personMemberName" label="创建人" labelCol="1"/>
<x:inputC name="startDate" label="呈报开始日期" wrapper="date" labelCol="1" />
<x:inputC name="endDate" label="呈报结束日期" wrapper="date" labelCol="1" />
<x:inputC name="fillinDateStart" label="录入开始日期" wrapper="dateTime" labelCol="1" />
<x:inputC name="fillinDateEnd" label="录入结束日期" wrapper="dateTime" labelCol="1" />
<x:selectC name="exceptionType" label="异常类型" labelCol="1" dictionary="exceptionType"/>
<x:selectC name="exceptionReasonType" label="原因分类" labelCol="1" dictionary="exceptionReasonType"/>
<x:inputC name="reasonTypeDetailName" label="异常问题类型" labelCol="1"/>
<x:inputC name="produceNo" label="生产单号/采购" labelCol="1"/>
<x:inputC name="exceptionDateStart" label="异常开始日期" wrapper="dateTime" labelCol="1" />
<x:inputC name="exceptionDateEnd" label="异常结束日期" wrapper="dateTime" labelCol="1" />
<x:inputC name="productCode" label="产品/原料编码" labelCol="1"/>
<x:inputC name="brandName" label="品牌名称" labelCol="1"/>
<x:inputC name="productTypeName" label="产品类别" required="false" labelCol="1" fieldCol="2" wrapper="select"/>
<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"/>
<x:inputC name="productTypeName" label="产品类别" required="false" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="productType"/>
<x:inputC name="problemTimes" label="问题发生次数" labelCol="1"/>
<x:checkboxListC name="needImproveReport" list="needImproveReportList" label="客户是否需要改善报告" labelCol="1" fieldCol="1"/>
<x:checkboxListC name="needGuarantee" list="needGuaranteeList" label="客户是否需要保证书" labelCol="1" fieldCol="1"/>
<x:checkboxListC name="statusKind" label="common.field.status" list="statusKindsList" labelCol="1" fieldCol="3"/>
</div>
<x:searchButtons/>
</form>
......
package com.huigou.topsun.sap.exceptionReport.controller;
import com.huigou.cache.DictUtil;
import com.huigou.context.Operator;
import com.huigou.context.OrgUnit;
import com.huigou.topsun.common.BillStatus;
import com.huigou.topsun.sap.exceptionReport.application.*;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReport;
import com.huigou.topsun.sap.exceptionReport.domain.ExceptionReportResponsible;
......@@ -57,6 +59,9 @@ public class ExceptionReportController extends CommonController {
* @return
*/
public String forwardExceptionReportList(){
this.putAttribute("statusKindsList", BillStatus.getValidMap());
this.putAttribute("needImproveReportList", DictUtil.getDictionary("yesorno"));
this.putAttribute("needGuaranteeList", DictUtil.getDictionary("yesorno"));
return forward("exceptionReportList");
}
......
......@@ -16,7 +16,7 @@ public class ExceptionReportQueryRequest extends QueryAbstractRequest {
private String customerOrderNo;
private String personMemberName;
private String deptName;
private String status;
private String statusKind;
private String startDate;
private String endDate;
private String checkOperatorName;
......@@ -26,4 +26,18 @@ public class ExceptionReportQueryRequest extends QueryAbstractRequest {
private String urgency;
private String productType;
private String fillinDateStart;
private String fillinDateEnd;
private String exceptionType;
private String reasonTypeDetailName;
private String produceNo;
private String exceptionDateStart;
private String exceptionDateEnd;
private String productCode;
private String brandName;
private String productTypeName;
private String problemTimes;
private String needImproveReport;
private String needGuarantee;
}
......@@ -2,11 +2,21 @@
<query-mappings>
<query name="exceptionReport" label="品质异常报告" table="sap_exception_report">
<sql-query>
select t.* from sap_exception_report t
SELECT
t.*,
i.item_produce_no,
i.product_code
FROM
sap_exception_report t
LEFT JOIN (
SELECT i.exception_report_id,
group_concat( i.produce_no SEPARATOR ',' ) AS item_produce_no,
group_concat( i.product_code SEPARATOR ',' ) AS product_code
FROM sap_exception_report_item i GROUP BY i.exception_report_id ) i ON t.id = i.exception_report_id where 1=1
</sql-query>
<condition column="bill_code" name="billCode" type="java.lang.String" symbol="like" alias="t"/>
<condition column="customer_name" name="customerName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="status" name="status" type="java.lang.String" symbol="=" alias="t"/>
<condition column="status" name="statusKind" type="java.lang.String" symbol="in" alias="t"/>
<condition column="customer_order_no" name="customerOrderNo" type="java.lang.String" symbol="like" alias="t"/>
<condition column="dept_name" name="deptName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="person_member_name" name="personMemberName" type="java.lang.String" symbol="like" alias="t"/>
......@@ -18,6 +28,20 @@
<condition column="urgency" name="urgency" type="java.lang.String" symbol="=" alias="t"/>
<condition column="product_type" name="productType" type="java.lang.String" symbol="=" alias="t"/>
<condition column="fillin_date" name="fillinDateStart" type="java.util.Date" symbol="&gt;=" alias="t"/>
<condition column="fillin_date" name="fillinDateEnd" type="java.util.Date" symbol="&lt;=" alias="t"/>
<condition column="exception_date" name="exceptionDateStart" type="java.util.Date" symbol="&gt;=" alias="t"/>
<condition column="exception_date" name="exceptionDateEnd" type="java.util.Date" symbol="&lt;=" alias="t"/>
<condition column="exception_type" name="exceptionType" type="java.lang.String" symbol="=" alias="t"/>
<condition column="reason_type_detail_name" name="reasonTypeDetailName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="item_produce_no" name="produceNo" type="java.lang.String" symbol="like" alias="i"/>
<condition column="product_code" name="productCode" type="java.lang.String" symbol="like" alias="i"/>
<condition column="brandName" name="brandName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="product_type_name" name="productTypeName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="problem_times" name="problemTimes" type="java.lang.String" symbol="=" alias="t"/>
<condition column="need_improve_report" name="needImproveReport" type="java.lang.String" symbol="=" alias="t"/>
<condition column="need_guarantee" name="needGuarantee" type="java.lang.String" symbol="=" alias="t"/>
</query>
<query name="exceptionReportItems" label="品质异常报告明细" table="sap_exception_report_item">
......@@ -150,5 +174,19 @@
<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"/>
<condition column="product_type" name="productType" type="java.lang.String" symbol="=" alias="t"/>
<condition column="fillin_date" name="fillinDateStart" type="java.util.Date" symbol="&gt;=" alias="t"/>
<condition column="fillin_date" name="fillinDateEnd" type="java.util.Date" symbol="&lt;=" alias="t"/>
<condition column="exception_date" name="exceptionDateStart" type="java.util.Date" symbol="&gt;=" alias="t"/>
<condition column="exception_date" name="exceptionDateEnd" type="java.util.Date" symbol="&lt;=" alias="t"/>
<condition column="exception_type" name="exceptionType" type="java.lang.String" symbol="=" alias="t"/>
<condition column="reason_type_detail_name" name="reasonTypeDetailName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="produce_no" name="produceNo" type="java.lang.String" symbol="like" alias="i"/>
<condition column="product_code" name="productCode" type="java.lang.String" symbol="like" alias="i"/>
<condition column="brandName" name="brandName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="product_type_name" name="productTypeName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="problem_times" name="problemTimes" type="java.lang.String" symbol="=" alias="t"/>
<condition column="need_improve_report" name="needImproveReport" type="java.lang.String" symbol="=" alias="t"/>
<condition column="need_guarantee" name="needGuarantee" type="java.lang.String" symbol="=" alias="t"/>
</query>
</query-mappings>
\ No newline at end of file
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