change - 生产执行报表接口

master
yinq 11 months ago
parent c014609706
commit bbec4e6d27

@ -140,6 +140,29 @@ public class ProductPlanInfo extends BaseEntity {
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime; private Date updatedTime;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划开始日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date planBeginTime;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划完成日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date planEndTime;
public Date getPlanBeginTime() {
return planBeginTime;
}
public void setPlanBeginTime(Date planBeginTime) {
this.planBeginTime = planBeginTime;
}
public Date getPlanEndTime() {
return planEndTime;
}
public void setPlanEndTime(Date planEndTime) {
this.planEndTime = planEndTime;
}
public String getStationCode() { public String getStationCode() {
return stationCode; return stationCode;

@ -25,6 +25,8 @@
<result property="createdTime" column="created_time"/> <result property="createdTime" column="created_time"/>
<result property="updatedBy" column="updated_by"/> <result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time"/> <result property="updatedTime" column="updated_time"/>
<result property="planBeginTime" column="planBeginTime"/>
<result property="planEndTime" column="planEndTime"/>
</resultMap> </resultMap>
<sql id="selectProductPlanInfoVo"> <sql id="selectProductPlanInfoVo">
@ -47,10 +49,13 @@
pp.created_by, pp.created_by,
pp.created_time, pp.created_time,
pp.updated_by, pp.updated_by,
pp.updated_time pp.updated_time,
bo.BEGIN_DATE planBeginTime,
bo.END_DATE planEndTime
from product_planinfo pp from product_planinfo pp
left join BASE_PRODUCTLINE st on st.PRODUCT_LINE_CODE = pp.productline_code left join BASE_PRODUCTLINE st on st.PRODUCT_LINE_CODE = pp.productline_code
left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = st.PARENT_ID left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = st.PARENT_ID
left join BASE_ORDERINFO bo on bo.ORDER_CODE = pp.ORDER_CODE
</sql> </sql>
<select id="selectProductPlanInfoList" parameterType="ProductPlanInfo" resultMap="ProductPlanInfoResult"> <select id="selectProductPlanInfoList" parameterType="ProductPlanInfo" resultMap="ProductPlanInfoResult">

@ -37,9 +37,10 @@ public class ProductionReportController extends BaseController {
* *
*/ */
@GetMapping("/productionExecutionReportList") @GetMapping("/productionExecutionReportList")
public AjaxResult productionExecutionReportList(@RequestParam(required = false) Map hashMap) { public TableDataInfo productionExecutionReportList(@RequestParam(required = false) Map hashMap) {
startPage();
List<HashMap<String, Object>> list = productionReportService.productionExecutionReportList(hashMap); List<HashMap<String, Object>> list = productionReportService.productionExecutionReportList(hashMap);
return success(list); return getDataTable(list);
} }
/** /**

@ -37,8 +37,44 @@
</select> </select>
<select id="productionExecutionReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap"> <select id="productionExecutionReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT * SELECT B2.PRODUCT_LINE_CODE,
FROM VIEW_MATERIAL_COMPLETION B2.PRODUCT_LINE_NAME,
VMC.ORDER_CODE,
BP.PRODUCT_LINE_CODE STATION_CODE,
BP.PRODUCT_LINE_NAME STATION_NAME,
VMC.MATERIAL_CODE,
BM.MATERIAL_NAME,
BO.MATERIAL_CODE PRODUCT_CODE,
BO.MATERIAL_NAME PRODUCT_NAME,
COUNT(*) COMP_AMOUNT
FROM VIEW_MATERIAL_COMPLETION VMC
LEFT JOIN BASE_PRODUCTLINE BP ON BP.PRODUCT_LINE_CODE = VMC.STATION_NAME
LEFT JOIN BASE_PRODUCTLINE B2 ON B2.PRODUCT_LINE_CODE = BP.PARENT_ID
LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = VMC.ORDER_CODE
LEFT JOIN BASE_MATERIALINFO BM ON BM.MATERIAL_CODE = VMC.MATERIAL_CODE
<where>
<if test="productLineCode != null and productLineCode != ''">
AND VMC.PRODUCT_LINE_CODE = #{productLineCode}
</if>
<if test="stationCode != null and stationCode != ''">
and VMC.STATION_NAME = #{stationCode}
</if>
<if test="ORDER_CODE != null and ORDER_CODE != ''">
and VMC.ORDER_CODE = #{ORDER_CODE}
</if>
<if test="PRODUCT_CODE != null and PRODUCT_CODE != ''">
and BO.MATERIAL_CODE like concat(#{PRODUCT_CODE}, '%')
</if>
<if test="PRODUCT_NAME != null and PRODUCT_NAME != ''">
and BO.MATERIAL_NAME like concat(concat('%', #{PRODUCT_NAME}), '%')
</if>
<if test="beginBeginTime != null and beginBeginTime != '' and endBeginTime != null and endBeginTime != ''">
AND TO_CHAR(VMC.COMPLETE_DATE, 'YYYY-MM-DD HH24:MI:SS') BETWEEN #{beginBeginTime} AND #{endBeginTime}
</if>
</where>
GROUP BY B2.PRODUCT_LINE_CODE, B2.PRODUCT_LINE_NAME, VMC.ORDER_CODE, BO.MATERIAL_CODE, BP.PRODUCT_LINE_CODE,
BP.PRODUCT_LINE_NAME, VMC.MATERIAL_CODE, BM.MATERIAL_NAME, BO.MATERIAL_NAME
ORDER BY B2.PRODUCT_LINE_CODE, VMC.ORDER_CODE, BP.PRODUCT_LINE_CODE
</select> </select>
<select id="WIPInquiryReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap"> <select id="WIPInquiryReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">

Loading…
Cancel
Save