成品产量报表:新增工单号、批次信息;修复查询报错;新增排序

master
FCD 2 weeks ago
parent dfff674331
commit 394a85fc63

@ -31,6 +31,13 @@ public class MesReportProduction extends BaseEntity {
private String machineName; private String machineName;
@Excel(name = "订单编号") @Excel(name = "订单编号")
private String orderCode; private String orderCode;
@Excel(name = "工单号")
private String workorderCode;
@Excel(name = "批次号")
private String batch;
@Excel(name = "产品编码") @Excel(name = "产品编码")
private String productCode; private String productCode;
@Excel(name = "产品名称") @Excel(name = "产品名称")
@ -183,4 +190,20 @@ public class MesReportProduction extends BaseEntity {
public void setProductDateEnd(String productDateEnd) { public void setProductDateEnd(String productDateEnd) {
this.productDateEnd = productDateEnd; this.productDateEnd = productDateEnd;
} }
public String getWorkorderCode() {
return workorderCode;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public String getBatch() {
return batch;
}
public void setBatch(String batch) {
this.batch = batch;
}
} }

@ -203,6 +203,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sf1.factory_name carName, sf1.factory_name carName,
sf.equipment_code machineCode, sf.equipment_code machineCode,
sf.equipment_name machineName, sf.equipment_name machineName,
mrw.workorder_code workorderCode,
mrw.batch batch,
mrw.product_code productCode, mrw.product_code productCode,
mrw.product_name productName, mrw.product_name productName,
mrw.quantity, mrw.quantity,
@ -214,8 +216,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_factory sf1 on sf.workshop_code = sf1.factory_code <!--车间--> left join sys_factory sf1 on sf.workshop_code = sf1.factory_code <!--车间-->
left join sys_factory sf2 on sf1.parent_id = sf2.factory_id <!--工厂--> left join sys_factory sf2 on sf1.parent_id = sf2.factory_id <!--工厂-->
where mrw.parent_order = '0' and mrw.del_flag = '0' where mrw.parent_order = '0' and mrw.del_flag = '0'
<if test="machineName != null and machineName != ''">and sf.factory_name like concat('%', #{machineName}, '%')</if> <if test="machineName != null and machineName != ''">and sf.equipment_name like concat('%', #{machineName}, '%')</if>
<if test="carName != null and carName != ''">and sf1.factory_name like concat('%', #{carName}, '%')</if> <if test="carName != null and carName != ''">and sf1.factory_name like concat('%', #{carName}, '%')</if>
<if test="workorderCode != null and workorderCode != ''">and mrw.workorder_code like concat('%', #{workorderCode}, '%')</if>
<if test="batch != null and batch != ''">and mrw.batch like concat('%', #{batch}, '%')</if>
<if test="factoryName != null and factoryName != ''">and sf2.factory_name like concat('%', #{factoryName}, '%')</if> <if test="factoryName != null and factoryName != ''">and sf2.factory_name like concat('%', #{factoryName}, '%')</if>
<if test="productCode != null and productCode != ''">and pow.product_code like concat('%', #{productCode}, '%')</if> <if test="productCode != null and productCode != ''">and pow.product_code like concat('%', #{productCode}, '%')</if>
@ -224,6 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productDateStart != null "> and CONVERT(varchar(10),mrw.feedback_time, 120) >= #{productDateStart}</if> <if test="productDateStart != null "> and CONVERT(varchar(10),mrw.feedback_time, 120) >= #{productDateStart}</if>
<if test="productDateEnd != null "> and #{productDateEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120)</if> <if test="productDateEnd != null "> and #{productDateEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120)</if>
ORDER BY sf.equipment_name
</select> </select>
<select id="getReportWork" resultType="com.op.mes.domain.MesReportWork"> <select id="getReportWork" resultType="com.op.mes.domain.MesReportWork">
select select

Loading…
Cancel
Save