Merge remote-tracking branch 'origin/dev_衡阳_鹏创电子' into dev_衡阳_鹏创电子
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | alter table quality_inspect |
| | | add defective_quantity decimal(18, 2) null comment 'ä¸è¯æ°é', |
| | | add defective_reason varchar(255) default '' not null comment 'ä¸è¯åå '; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.dto.ProductProcessRouteItemDto; |
| | | import com.ruoyi.production.dto.ProductionProductMainDto; |
| | | import com.ruoyi.production.dto.SalesLedgerProductionAccountingDto; |
| | | import com.ruoyi.production.service.ProductionProductMainService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("productionProductMain") |
| | | @RequestMapping("/productionProductMain") |
| | | @RestController |
| | | @Api(value = "ç产æ¥å·¥") |
| | | public class ProductionProductMainController { |
| | |
| | | * @param productionProductMainDto |
| | | * @return |
| | | */ |
| | | @GetMapping("listPage") |
| | | @GetMapping("/listPage") |
| | | public R page(Page<ProductionProductMainDto> page, ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.listPageProductionProductMainDto(page, productionProductMainDto)); |
| | | } |
| | |
| | | * @param productionProductMainDto |
| | | * @return |
| | | */ |
| | | @PostMapping("addProductMain") |
| | | @PostMapping("/addProductMain") |
| | | public R addProductMain(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.addProductMain(productionProductMainDto)); |
| | | } |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | |
| | | private BigDecimal workHours; |
| | | private BigDecimal wages; |
| | | |
| | | // å
¶ä»æ°æ® |
| | | private String otherData; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¥åºæ°é") |
| | | private BigDecimal scrapQty; |
| | | |
| | | @ApiModelProperty(value = "å
¶ä»æ°æ®") |
| | | private String otherData; |
| | | } |
| | |
| | | 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().subtract(productionProductOutput.getScrapQty()); |
| | |
| | | qualityInspect.setProcess(process); |
| | | qualityInspect.setInspectState(0); |
| | | qualityInspect.setInspectType(inspectType); |
| | | qualityInspect.setDefectiveQuantity(productionProductOutput.getScrapQty()); |
| | | qualityInspect.setProductMainId(productionProductMain.getId()); |
| | | qualityInspect.setProductModelId(productModel.getId()); |
| | | qualityInspectMapper.insert(qualityInspect); |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åæææ£éª/è¿ç¨æ£éª/åºåæ£éª |
| | | * åæææ£éª/è¿ç¨æ£éª/æåæ£éª |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/quality/qualityInspect") |
| | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * è´¨é管ç--åææ/è¿ç¨/åºåæ£éª |
| | | * è´¨é管ç--åææ/è¿ç¨/æåæ£éª |
| | | * quality_inspect |
| | | */ |
| | | @TableName(value = "quality_inspect") |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * ç±»å«(0:åæææ£éª;1:è¿ç¨æ£éª;2:åºåæ£éª) |
| | | * ç±»å«(0:åæææ£éª;1:è¿ç¨æ£éª;2:æåæ£éª) |
| | | */ |
| | | @Excel(name = "ç±»å«",readConverterExp = "0=åæææ£éª,1=è¿ç¨æ£éª,2=åºåæ£éª") |
| | | @Excel(name = "ç±»å«",readConverterExp = "0=åæææ£éª,1=è¿ç¨æ£éª,2=æåæ£éª") |
| | | @NotBlank(message = "ç±»å«ä¸è½ä¸ºç©º!!") |
| | | private Integer inspectType; |
| | | |
| | |
| | | private String supplier; |
| | | |
| | | /** |
| | | * 客æ·åç§°(è¿ç¨æ£éª/åºåæ£éª) |
| | | * 客æ·åç§°(è¿ç¨æ£éª/æåæ£éª) |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | private String customer; |
| | |
| | | private BigDecimal quantity; |
| | | |
| | | /** |
| | | * ä¸è¯æ°é |
| | | */ |
| | | @Excel(name = "ä¸è¯æ°é") |
| | | private BigDecimal defectiveQuantity; |
| | | |
| | | /** |
| | | * ä¸è¯åå |
| | | */ |
| | | @Excel(name = "ä¸è¯åå ") |
| | | private String defectiveReason; |
| | | |
| | | /** |
| | | * æ£æµåä½ |
| | | */ |
| | | @Excel(name = "æ£æµåä½") |
| | |
| | | @ApiModelProperty("ç¶æ") |
| | | private String state; |
| | | |
| | | @ApiModelProperty("ç±»å«(0:åæææ£éª;1:è¿ç¨æ£éª;2:åºåæ£éª)") |
| | | @ApiModelProperty("ç±»å«(0:åæææ£éª;1:è¿ç¨æ£éª;2:æåæ£éª)") |
| | | private Integer inspectType; |
| | | |
| | | @ApiModelProperty("å·¥åºid") |
| | |
| | | |
| | | |
| | | /** |
| | | * ç±»å«(0:åæææ£éª;1:è¿ç¨æ£éª;2:åºåæ£éª) |
| | | * ç±»å«(0:åæææ£éª;1:è¿ç¨æ£éª;2:æåæ£éª) |
| | | */ |
| | | @NotBlank(message = "ç±»å«ä¸è½ä¸ºç©º!!!") |
| | | @Excel(name = "ç±»å«",readConverterExp = "0=åæææ£éª,1=è¿ç¨æ£éª,2=åºåæ£éª") |
| | | @Excel(name = "ç±»å«",readConverterExp = "0=åæææ£éª,1=è¿ç¨æ£éª,2=æåæ£éª") |
| | | private Integer inspectType; |
| | | |
| | | /** |
| | |
| | | @Excel(name = "å¤çæ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date dealTime; |
| | | |
| | | |
| | | @Excel(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | |
| | | @ApiModelProperty("æ¯å¦ä¸åæ ¼å¤çèªå·±æ°å¢") |
| | | @TableField(exist = false) |
| | | private Boolean method; |
| | | |
| | | @ApiModelProperty("å·¥åº") |
| | | @TableField(exist = false) |
| | | private String process; |
| | | } |
| | |
| | | inspectType = "è¿ç¨æ£éª"; |
| | | break; |
| | | case 2: |
| | | inspectType = "åºåæ£éª"; |
| | | inspectType = "æåæ£éª"; |
| | | break; |
| | | } |
| | | List<QualityInspectParam> paramList = qualityInspectParamService.list(Wrappers.<QualityInspectParam>lambdaQuery().eq(QualityInspectParam::getInspectId, inspect.getId())); |
| | |
| | | util.exportExcel(response, qualityInspects, "è¿ç¨æ£éªå¯¼åº"); |
| | | break; |
| | | case 2: |
| | | util.exportExcel(response, qualityInspects, "åºåæ£éªå¯¼åº"); |
| | | util.exportExcel(response, qualityInspects, "æåæ£éªå¯¼åº"); |
| | | break; |
| | | } |
| | | |
| | |
| | | pm.model as productModelName, |
| | | ppo.quantity, |
| | | ppo.scrap_qty, |
| | | ppo.other_data, |
| | | pm.unit, |
| | | sl.sales_contract_no salesContractNo |
| | | from |
| | |
| | | <result property="quantity" column="quantity"/> |
| | | <result property="tenantId" column="tenant_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="otherData" column="other_data"/> |
| | | </resultMap> |
| | | |
| | | <select id="listPageProductionProductOutputDto" resultType="com.ruoyi.production.dto.ProductionProductOutputDto"> |
| | |
| | | qu.deal_result, |
| | | qu.deal_name, |
| | | qu.deal_time, |
| | | qi.process, |
| | | CASE |
| | | WHEN qu.model = pm.id THEN pm.model |
| | | ELSE qu.model |
| | |
| | | END AS method |
| | | FROM quality_unqualified qu |
| | | LEFT JOIN product_model pm ON qu.model = pm.id |
| | | LEFT JOIN quality_inspect qi ON qu.inspect_id = qi.id |
| | | where |
| | | 1=1 |
| | | and qu.id = #{id} |