feat:1.生产报工(增加设备选择和展示)
2.报工增加生产记录参数
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.production.pojo.ProductWorkOrder; |
| | | import com.ruoyi.production.pojo.ProductWorkOrderFile; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | |
| | | @ApiModelProperty(value = "工序") |
| | | private String processName; |
| | | |
| | | private Long processId; |
| | | |
| | | //单位 |
| | | @ApiModelProperty(value = "单位") |
| | | private String unit; |
| | |
| | | private BigDecimal totalInvestment; |
| | | |
| | | private BigDecimal inspectedQuantity; |
| | | |
| | | // 其他数据 |
| | | private String otherData; |
| | | // 工序id |
| | | private Long processId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "租户ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | @ApiModelProperty(value = "设备id") |
| | | private Long deviceId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "报废数量") |
| | | private BigDecimal scrapQty; |
| | | |
| | | @ApiModelProperty(value = "其他数据") |
| | | private String otherData; |
| | | } |
| | |
| | | productionProductMain.setProductProcessRouteItemId(dto.getProductProcessRouteItemId()); |
| | | productionProductMain.setWorkOrderId(dto.getWorkOrderId()); |
| | | productionProductMain.setStatus(0); |
| | | productionProductMain.setDeviceId(dto.getDeviceId()); |
| | | productionProductMainMapper.insert(productionProductMain); |
| | | /*新增报工投入表*/ |
| | | List<ProductStructureDto> productStructureDtos = productStructureMapper.listBybomAndProcess(productProcessRoute.getBomId(), productProcess.getId()); |
| | |
| | | productionProductOutput.setProductModelId(productProcessRouteItem.getProductModelId()); |
| | | productionProductOutput.setQuantity(dto.getQuantity() != null ? dto.getQuantity() : BigDecimal.ZERO); |
| | | productionProductOutput.setScrapQty(dto.getScrapQty() != null ? dto.getScrapQty() : BigDecimal.ZERO); |
| | | productionProductOutput.setOtherData(dto.getOtherData() != null ? dto.getOtherData() : ""); |
| | | productionProductOutputMapper.insert(productionProductOutput); |
| | | //合格数量=报工数量 |
| | | BigDecimal productQty = productionProductOutput.getQuantity(); |
| | |
| | | <select id="pageProductWorkOrder" resultType="com.ruoyi.production.dto.ProductWorkOrderDto"> |
| | | SELECT |
| | | pwo.*, |
| | | pp.id as processId, |
| | | pp.NAME as processName, |
| | | pm.model, |
| | | pm.unit, |
| | |
| | | u.nick_name as nickName, |
| | | p.product_name as productName, |
| | | pp.name as process, |
| | | pp.id as processId, |
| | | pm.model as productModelName, |
| | | ppo.quantity, |
| | | ppo.scrap_qty, |