Commit 4afb0917 authored by 1650842865's avatar 1650842865

品质异常报告导出主表及明细

parent 171e7d25
......@@ -43,8 +43,8 @@
<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="reasonTypeDetailName" label="异常问题类型" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:hidden name="reasonTypeDetail"/>
<x:hidden name="reasonTypeName"/>
<x:inputC name="reasonTypeDetail" label="异常问题类型代码" labelCol="1" fieldCol="2" readonly="true" />
<x:inputC name="reasonTypeName" label="异常问题一级分类" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="productTypeName" label="产品类别" required="false" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="productType"/>
<!--x:inputC name="appealNo" label="客诉编号" labelCol="1" fieldCol="2" required="false"/-->
......
......@@ -19,6 +19,7 @@ public interface ExceptionReportApplication {
String PROCESS_DEFINITION_KEY = "exceptionReportProc";
Map<String,Object> slicedExceptionReportList(ExceptionReportQueryRequest queryRequest);
Map<String,Object> slicedExceptionReportExportList(ExceptionReportQueryRequest queryRequest);
ExceptionReport findById(String id);
......
......@@ -124,7 +124,16 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
// queryModel.addCriteria(" and t.report_date <=:endDate");
// queryModel.putParam("endDate", queryRequest.getEndDate());
// }
queryModel.addCriteria(" order by bill_code desc ");
queryModel.putDictionary("status", BizBillStatus.getMap());
queryModel.putDictionary("needImproveReport",DictUtil.getDictionary("yesorno"));
queryModel.putDictionary("needGuarantee",DictUtil.getDictionary("yesorno"));
return this.sqlExecutorDao.executeSlicedQuery(queryModel);
}
@Override
public Map<String, Object> slicedExceptionReportExportList(ExceptionReportQueryRequest queryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "exceptionReportExport");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
queryModel.putDictionary("status", BizBillStatus.getMap());
return this.sqlExecutorDao.executeSlicedQuery(queryModel);
}
......
......@@ -67,7 +67,12 @@ public class ExceptionReportController extends CommonController {
public String slicedExceptionReportList(){
SDO sdo = this.getSDO();
ExceptionReportQueryRequest queryRequest = sdo.toQueryRequest(ExceptionReportQueryRequest.class);
Map<String, Object> map = exceptionReportApplication.slicedExceptionReportList(queryRequest);
Map<String, Object> map = new HashMap<>();
if (ObjectUtils.isEmpty(sdo.getProperty("exportHead"))) {
map = exceptionReportApplication.slicedExceptionReportList(queryRequest);
}else {
map = exceptionReportApplication.slicedExceptionReportExportList(queryRequest);
}
return toResult(map);
}
......
......@@ -53,4 +53,102 @@
</sql-query>
<condition column="exception_report_id" name="exceptionReportId" type="java.lang.String" symbol="like" alias="t"/>
</query>
<query name="exceptionReportExport" label="品质异常报告" table="sap_exception_report">
<sql-query>
SELECT
t.fillin_date,
t.bill_code,
t.person_member_name,
t.exception_type,
t.report_date,
t.werks,
t.werks_name,
t.customer_no,
t.customer_name,
t.customer_order_no,
t.exception_state,
t.exception_reason,
t.deal_method,
t.duty_dept,
t.duty_dept_name,
t.check_operator,
t.check_operator_name,
t.deal_result,
t.manager,
t.deputy_manager,
t.general_manager,
t.remark,
t.attbiz_id,
t.pay_money,
t.lose_money,
t.bill_type,
t.exception_title,
t.exception_reason_type,
t.appeal_no,
t.urgency,
t.exception_date,
t.problem_times,
t.brand_name,
t.need_improve_report,
t.need_guarantee,
t.matnr,
t.maktx,
t.deal_way,
t.sap_bill_no,
t.handle_node_id,
t.handle_node_name,
t.product_type,
t.source_bill_code,
t.product_type_name,
<!--t.produce_no,-->
t.reason_type_name,
t.reason_type_detail,
t.reason_type_detail_name,
i.produce_no,
<!--i.product_type,-->
i.product_code,
i.product_name,
i.unit,
i.unit_name,
i.currency,
i.currency_name,
i.price,
i.number,
i.money,
i.rmb_money,
i.send_date,
i.reason_type,
i.exception_number,
i.exchange_rate,
i.freight,
i.stop_wait_material,
i.rework,
i.startup_fee,
p.person_no,
p.person_name,
p.dept_name,
p.duty_rate,
p.person_duty_rate,
p.duty_money,
p.duty_remark
FROM sap_exception_report t
LEFT JOIN sap_exception_report_item i ON t.id = i.exception_report_id
LEFT JOIN sap_exception_duty_person p ON t.id = p.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="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"/>
<condition column="check_operator_name" name="checkOperatorName" type="java.lang.String" symbol="like" alias="t"/>
<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"/>
<condition column="product_type" name="productType" 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