白坯生产报表

highway
zhaoxiaolin 1 year ago
parent d3d8ca47bd
commit 41b3459f8b

@ -36,6 +36,10 @@ public class MesProcessReport extends BaseEntity {
private String processCode; private String processCode;
@Excel(name = "工序名称") @Excel(name = "工序名称")
private String processName; private String processName;
@Excel(name = "设备编码")
private String equCode;
@Excel(name = "设备名称")
private String equName;
@Excel(name = "完成数量") @Excel(name = "完成数量")
private BigDecimal quantityFeedback; private BigDecimal quantityFeedback;
@Excel(name = "单位") @Excel(name = "单位")
@ -43,6 +47,22 @@ public class MesProcessReport extends BaseEntity {
private String productDateStart; private String productDateStart;
private String productDateEnd; private String productDateEnd;
public String getEquCode() {
return equCode;
}
public void setEquCode(String equCode) {
this.equCode = equCode;
}
public String getEquName() {
return equName;
}
public void setEquName(String equName) {
this.equName = equName;
}
public String getProductDateStart() { public String getProductDateStart() {
return productDateStart; return productDateStart;
} }

@ -71,21 +71,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(0) totalNum, select count(0) totalNum,
equ.equipment_type_code equTypeCode, equ.equipment_type_code equTypeCode,
equ.equipment_type_name equTypeName equ.equipment_type_name equTypeName
from pro_rfid_process_detail prpd from mes_material_transfer_result mt
left join base_equipment equ on prpd.machine_code = equ.equipment_code left join base_equipment equ on mt.equipmentCode = equ.equipment_code
where CONVERT(varchar(10),prpd.create_time, 120) = #{ymd} where CONVERT(varchar(10),mt.create_time, 120) = #{ymd} and equ.equipment_name is not null
group by equ.equipment_type_code, group by equ.equipment_type_code,
equ.equipment_type_name equ.equipment_type_name
</select> </select>
<select id="getEveryNum" resultType="com.op.system.api.domain.dto.BoardDTO"> <select id="getEveryNum" resultType="com.op.system.api.domain.dto.BoardDTO">
select count(0) totalNum, select count(0) totalNum,
prpd.machine_code equCode, mt.equipmentCode equCode,
equ.equipment_name equName, equ.equipment_name equName,
equ.equipment_type_code equTypeCode equ.equipment_type_code equTypeCode
from pro_rfid_process_detail prpd from mes_material_transfer_result mt
left join base_equipment equ on prpd.machine_code = equ.equipment_code left join base_equipment equ on mt.equipmentCode = equ.equipment_code
where CONVERT(varchar(10),prpd.create_time, 120) = #{ymd} where CONVERT(varchar(10),mt.create_time, 120) = #{ymd} and equ.equipment_name is not null
group by prpd.machine_code, group by mt.equipmentCode,
equ.equipment_name, equ.equipment_name,
equ.equipment_type_code equ.equipment_type_code
</select> </select>

@ -89,48 +89,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select select
pow.product_date productDate, pow.product_date productDate,
pow.order_code orderCode, pow.order_code orderCode,
pow.quantity_split quantity, pow.quantity_split quantity,
pow.product_code productCode, pow.product_code productCode,
pow.product_name productName, pow.product_name productName,
pow.product_spc productSpc, pow.product_spc productSpc,
prpd.workorder_code workorderCode, pow.workorder_code workorderCode,
ps.process_code processCode, ps.process_code processCode,
ps.process_name processName, ps.process_name processName,
count(0) quantityFeedback, count(0) quantityFeedback,
'车' unit '车' unit,
from pro_rfid_process_detail prpd mt.equipmentCode equCode,
left join pro_order_workorder pow on pow.workorder_code = prpd.workorder_code equ.equipment_name equName
left join pro_process ps on ps.process_id = prpd.now_process_id from mes_material_transfer_result mt
left join base_equipment equ on mt.equipmentCode = equ.equipment_code
left join pro_order_workorder pow on pow.workorder_id = mt.OrderCode
left join pro_process ps on ps.process_id = mt.now_process_id
where pow.order_code is not null where pow.order_code is not null
<if test="orderCode != null and orderCode != ''"> <if test="orderCode != null and orderCode != ''">
and pow.order_code like concat('%', #{orderCode}, '%') and pow.order_code like concat('%', #{orderCode}, '%')
</if> </if>
<if test="productCode != null and productCode != ''"> <if test="productCode != null and productCode != ''">
and pow.product_code like concat('%', #{productCode}, '%') and pow.product_code like concat('%', #{productCode}, '%')
</if> </if>
<if test="productName != null and productName != ''"> <if test="productName != null and productName != ''">
and pow.product_name like concat('%', #{productName}, '%') and pow.product_name like concat('%', #{productName}, '%')
</if> </if>
<if test="workorderCode != null and workorderCode != ''"> <if test="workorderCode != null and workorderCode != ''">
and pow.workorder_code like concat('%', #{workorderCode}, '%') and pow.workorder_code like concat('%', #{workorderCode}, '%')
</if> </if>
<if test="productSpc != null and productSpc != ''"> <if test="equName != null and equName != ''">
and pow.product_spc like concat('%', #{productSpc}, '%') and equ.equipment_name like concat('%', #{equName}, '%')
</if> </if>
<if test="productDateStart != null "> and CONVERT(varchar(10),prpd.create_time, 120) >= #{productDateStart}</if> <if test="productDateStart != null "> and CONVERT(varchar(10),mt.create_time, 120) >= #{productDateStart}</if>
<if test="productDateEnd != null "> and #{productDateEnd} >= CONVERT(varchar(10),prpd.create_time, 120)</if> <if test="productDateEnd != null "> and #{productDateEnd} >= CONVERT(varchar(10),mt.create_time, 120)</if>
group by group by
pow.order_code, pow.order_code,
pow.product_date, pow.product_date,
pow.product_code, pow.product_code,
pow.product_name, pow.product_name,
pow.product_spc, pow.product_spc,
pow.quantity_split, pow.quantity_split,
prpd.workorder_code, pow.workorder_code,
prpd.now_process_id, mt.now_process_id,
ps.process_name, ps.process_name,
ps.process_code ps.process_code,
order by pow.product_date desc,prpd.workorder_code mt.equipmentCode,
equ.equipment_name
order by pow.product_date desc,pow.workorder_code
</select> </select>
<select id="getProductionList" resultType="com.op.mes.domain.MesReportProduction"> <select id="getProductionList" resultType="com.op.mes.domain.MesReportProduction">
select sf2.factory_code factoryCode, select sf2.factory_code factoryCode,

@ -134,7 +134,7 @@ public class ProOrderController extends BaseController {
* @return * @return
*/ */
@PostMapping("/subSplitOrder") @PostMapping("/subSplitOrder")
@RequiresPermissions("mes:pro:order:add") //@RequiresPermissions("mes:pro:order:add")
@Log(title = "提交拆分订单", businessType = BusinessType.INSERT) @Log(title = "提交拆分订单", businessType = BusinessType.INSERT)
public AjaxResult subSplitOrder(@RequestBody SplitOrderDTO splitOrderDTO) { public AjaxResult subSplitOrder(@RequestBody SplitOrderDTO splitOrderDTO) {
return proOrderService.subSplitOrder(splitOrderDTO); return proOrderService.subSplitOrder(splitOrderDTO);

Loading…
Cancel
Save