change - 在制品查询明细功能、导出

master
yinq 8 months ago
parent e62281134e
commit a5809e2707

@ -65,6 +65,20 @@ public class WIPInquiryReport extends BaseEntity {
@JsonProperty("PRODUCT_NAME") @JsonProperty("PRODUCT_NAME")
private String PRODUCT_NAME; private String PRODUCT_NAME;
/**
*
*/
@Excel(name = "订单数量")
@JsonProperty("ORDER_AMOUNT")
private Long ORDER_AMOUNT;
/**
*
*/
@Excel(name = "完成数量")
@JsonProperty("COMPLETE_AMOUNT")
private Long COMPLETE_AMOUNT;
/** /**
* *
*/ */
@ -72,6 +86,22 @@ public class WIPInquiryReport extends BaseEntity {
@JsonProperty("COMP_AMOUNT") @JsonProperty("COMP_AMOUNT")
private Long COMP_AMOUNT; private Long COMP_AMOUNT;
public Long getORDER_AMOUNT() {
return ORDER_AMOUNT;
}
public void setORDER_AMOUNT(Long ORDER_AMOUNT) {
this.ORDER_AMOUNT = ORDER_AMOUNT;
}
public Long getCOMPLETE_AMOUNT() {
return COMPLETE_AMOUNT;
}
public void setCOMPLETE_AMOUNT(Long COMPLETE_AMOUNT) {
this.COMPLETE_AMOUNT = COMPLETE_AMOUNT;
}
public String getPRODUCT_LINE_CODE() { public String getPRODUCT_LINE_CODE() {
return PRODUCT_LINE_CODE; return PRODUCT_LINE_CODE;
} }

@ -85,6 +85,8 @@
SD.MATERIAL_NAME, SD.MATERIAL_NAME,
BO.MATERIAL_CODE PRODUCT_CODE, BO.MATERIAL_CODE PRODUCT_CODE,
BO.MATERIAL_NAME PRODUCT_NAME, BO.MATERIAL_NAME PRODUCT_NAME,
MAX(BO.ORDER_AMOUNT) ORDER_AMOUNT,
MAX(BO.COMPLETE_AMOUNT) COMPLETE_AMOUNT,
COUNT(*) COMP_AMOUNT COUNT(*) COMP_AMOUNT
FROM ( FROM (
SELECT PB.ORDER_CODE, SELECT PB.ORDER_CODE,
@ -113,7 +115,7 @@
) SD ) SD
LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = SD.ORDER_CODE LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = SD.ORDER_CODE
LEFT JOIN BASE_PRODUCTLINE B2 ON B2.WORK_CENTER_CODE = BO.WORK_CENTER_CODE LEFT JOIN BASE_PRODUCTLINE B2 ON B2.WORK_CENTER_CODE = BO.WORK_CENTER_CODE
<where> WHERE BO.ORDER_AMOUNT != BO.COMPLETE_AMOUNT
<if test="productLineCode != null and productLineCode != ''"> <if test="productLineCode != null and productLineCode != ''">
AND B2.PRODUCT_LINE_CODE = #{productLineCode} AND B2.PRODUCT_LINE_CODE = #{productLineCode}
</if> </if>
@ -126,7 +128,6 @@
<if test="PRODUCT_NAME != null and PRODUCT_NAME != ''"> <if test="PRODUCT_NAME != null and PRODUCT_NAME != ''">
and BO.MATERIAL_NAME like concat(concat('%', #{PRODUCT_NAME}), '%') and BO.MATERIAL_NAME like concat(concat('%', #{PRODUCT_NAME}), '%')
</if> </if>
</where>
GROUP BY B2.PRODUCT_LINE_CODE, B2.PRODUCT_LINE_NAME, SD.ORDER_CODE, SD.MATERIAL_CODE, SD.MATERIAL_NAME, GROUP BY B2.PRODUCT_LINE_CODE, B2.PRODUCT_LINE_NAME, SD.ORDER_CODE, SD.MATERIAL_CODE, SD.MATERIAL_NAME,
BO.MATERIAL_CODE, BO.MATERIAL_NAME BO.MATERIAL_CODE, BO.MATERIAL_NAME
ORDER BY COMP_AMOUNT DESC ORDER BY COMP_AMOUNT DESC
@ -654,7 +655,7 @@
LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = SD.ORDER_CODE LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = SD.ORDER_CODE
LEFT JOIN BASE_PRODUCTLINE B2 ON B2.WORK_CENTER_CODE = BO.WORK_CENTER_CODE LEFT JOIN BASE_PRODUCTLINE B2 ON B2.WORK_CENTER_CODE = BO.WORK_CENTER_CODE
LEFT JOIN BASE_PRODUCTLINE ST ON ST.EXECUTION_SORT = SD.EXECUTION_SORT LEFT JOIN BASE_PRODUCTLINE ST ON ST.EXECUTION_SORT = SD.EXECUTION_SORT
<where> WHERE BO.ORDER_AMOUNT != BO.COMPLETE_AMOUNT
<if test="productLineCode != null and productLineCode != ''"> <if test="productLineCode != null and productLineCode != ''">
AND B2.PRODUCT_LINE_CODE = #{productLineCode} AND B2.PRODUCT_LINE_CODE = #{productLineCode}
</if> </if>
@ -667,7 +668,6 @@
<if test="PRODUCT_NAME != null and PRODUCT_NAME != ''"> <if test="PRODUCT_NAME != null and PRODUCT_NAME != ''">
and BO.MATERIAL_NAME like concat(concat('%', #{PRODUCT_NAME}), '%') and BO.MATERIAL_NAME like concat(concat('%', #{PRODUCT_NAME}), '%')
</if> </if>
</where>
ORDER BY SD.COMPLETE_DATE ORDER BY SD.COMPLETE_DATE
</select> </select>

Loading…
Cancel
Save