¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.controller.mainPlan; |
| | | |
| | | import com.aps.common.core.utils.poi.ExcelUtil; |
| | | import com.aps.common.core.web.controller.BaseController; |
| | | import com.aps.common.core.web.domain.AjaxResult; |
| | | import com.aps.common.core.web.page.TableDataInfo; |
| | | import com.aps.common.log.annotation.Log; |
| | | import com.aps.common.log.enums.BusinessType; |
| | | import com.aps.common.security.annotation.RequiresPermissions; |
| | | import com.aps.core.domain.ApsPlateStandardRequireError; |
| | | import com.aps.core.service.IApsPlateStandardRequireErrorService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é£éæ åéæ±å¼å¸¸ä¿¡æ¯Controller |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-08 |
| | | */ |
| | | |
| | | @Tag(name = "é£éæ åéæ±å¼å¸¸ä¿¡æ¯", description = "é£éæ åéæ±å¼å¸¸ä¿¡æ¯æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/ApsPlateStandardRequireError") |
| | | public class ApsPlateStandardRequireErrorController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IApsPlateStandardRequireErrorService apsPlateStandardRequireErrorService; |
| | | |
| | | /** |
| | | * æ¥è¯¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯å表 |
| | | */ |
| | | |
| | | @Operation(summary = "æ¥è¯¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯å表", description = "å页æ¥è¯¢") |
| | | @RequiresPermissions("ApsPlateStandardRequireError:ApsPlateStandardRequireError:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ApsPlateStandardRequireError apsPlateStandardRequireError) |
| | | { |
| | | startPage(); |
| | | List<ApsPlateStandardRequireError> list = apsPlateStandardRequireErrorService.selectApsPlateStandardRequireErrorList(apsPlateStandardRequireError); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºé£éæ åéæ±å¼å¸¸ä¿¡æ¯å表 |
| | | */ |
| | | @Operation(summary = "导åºé£éæ åéæ±å¼å¸¸ä¿¡æ¯å表", description = "导åº") |
| | | @RequiresPermissions("ApsPlateStandardRequireError:ApsPlateStandardRequireError:export") |
| | | @Log(title = "é£éæ åéæ±å¼å¸¸ä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ApsPlateStandardRequireError apsPlateStandardRequireError) |
| | | { |
| | | List<ApsPlateStandardRequireError> list = apsPlateStandardRequireErrorService.selectApsPlateStandardRequireErrorList(apsPlateStandardRequireError); |
| | | ExcelUtil<ApsPlateStandardRequireError> util = new ExcelUtil<ApsPlateStandardRequireError>(ApsPlateStandardRequireError.class); |
| | | util.exportExcel(response, list, "é£éæ åéæ±å¼å¸¸ä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åé£éæ åéæ±å¼å¸¸ä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @Operation(summary = "è·åé£éæ åéæ±å¼å¸¸ä¿¡æ¯è¯¦ç»ä¿¡æ¯", description = "æ ¹æ®idè·å") |
| | | @RequiresPermissions("ApsPlateStandardRequireError:ApsPlateStandardRequireError:query") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(apsPlateStandardRequireErrorService.selectApsPlateStandardRequireErrorById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | */ |
| | | @Operation(summary = "æ°å¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯", description = "å个æ°å¢") |
| | | @RequiresPermissions("ApsPlateStandardRequireError:ApsPlateStandardRequireError:add") |
| | | @Log(title = "é£éæ åéæ±å¼å¸¸ä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ApsPlateStandardRequireError apsPlateStandardRequireError) |
| | | { |
| | | return toAjax(apsPlateStandardRequireErrorService.insertApsPlateStandardRequireError(apsPlateStandardRequireError)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | */ |
| | | @Operation(summary = "ä¿®æ¹é£éæ åéæ±å¼å¸¸ä¿¡æ¯", description = "å个修æ¹") |
| | | @RequiresPermissions("ApsPlateStandardRequireError:ApsPlateStandardRequireError:edit") |
| | | @Log(title = "é£éæ åéæ±å¼å¸¸ä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ApsPlateStandardRequireError apsPlateStandardRequireError) |
| | | { |
| | | return toAjax(apsPlateStandardRequireErrorService.updateApsPlateStandardRequireError(apsPlateStandardRequireError)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | */ |
| | | @Operation(summary = "å é¤é£éæ åéæ±å¼å¸¸ä¿¡æ¯", description = "æ¹éå é¤") |
| | | @RequiresPermissions("ApsPlateStandardRequireError:ApsPlateStandardRequireError:remove") |
| | | @Log(title = "é£éæ åéæ±å¼å¸¸ä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(apsPlateStandardRequireErrorService.deleteApsPlateStandardRequireErrorByIds(ids)); |
| | | } |
| | | } |
| | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @Builder |
| | | public class ApsBom extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @Builder |
| | | public class ApsBomHeader extends BaseEntity |
| | | { |
| | | @Serial |
| | |
| | | @Excel(name = "å·æ°æ¥æ") |
| | | private String refreshDate; |
| | | |
| | | /**å©ä½åºå*/ |
| | | private BigDecimal remainderStock; |
| | | |
| | | |
| | | /**ä¿®æ¹çæ¬*/ |
| | | private Integer version; |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | |
| | | return refreshDate; |
| | | } |
| | | |
| | | public BigDecimal getRemainderStock() { |
| | | return remainderStock; |
| | | } |
| | | |
| | | public void setRemainderStock(BigDecimal remainderStock) { |
| | | this.remainderStock = remainderStock; |
| | | } |
| | | |
| | | public Integer getVersion() { |
| | | return version; |
| | | } |
| | | |
| | | public void setVersion(Integer version) { |
| | | this.version = version; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | import java.io.Serial; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | |
| | | * é£é计å管ç对象 aps_plate_plan |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-04-08 |
| | | * @date 2025-04-08 |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | public class ApsPlatePlan extends BaseEntity |
| | | { |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | |
| | | |
| | | /** æªå¹é
çç产æ°é*/ |
| | | private BigDecimal unmatchedQuantity; |
| | | /** ä¸ä¸å½å±*/ |
| | | private String professionalAffiliation; |
| | | |
| | | /** éæ±è¿½æº¯ID*/ |
| | | private String requireId; |
| | | |
| | | private Integer version; |
| | | /* |
| | | public String getOpStatus() { |
| | | return opStatus; |
| | | } |
| | |
| | | |
| | | public void setPlant(String plant) { |
| | | this.plant = plant; |
| | | } |
| | | }*/ |
| | | } |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serial; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * é£éå·¥åæ åéæ±å¯¹è±¡ aps_plate_standard_require |
| | |
| | | |
| | | /** BOMç¨é */ |
| | | @Excel(name = "BOMç¨é") |
| | | private String bomUseAmount; |
| | | private BigDecimal bomUseAmount; |
| | | |
| | | /** å·¥èºè·¯çº¿ID */ |
| | | @Excel(name = "å·¥èºè·¯çº¿ID") |
| | |
| | | |
| | | /** åéæ±é */ |
| | | @Excel(name = "åéæ±é") |
| | | private String netRequirement; |
| | | private BigDecimal netRequirement; |
| | | |
| | | /** 计åå¼å·¥æ¥ */ |
| | | @Excel(name = "计åå¼å·¥æ¥") |
| | | private String startDate; |
| | | private Date startDate; |
| | | |
| | | /** 计åå®å·¥æ¥ */ |
| | | @Excel(name = "计åå®å·¥æ¥") |
| | | private String completeDate; |
| | | private Date completeDate; |
| | | |
| | | /** éæ±æ¥æ */ |
| | | @Excel(name = "éæ±æ¥æ") |
| | | private String demandDate; |
| | | private Date demandDate; |
| | | |
| | | /** éç¨å·¥å */ |
| | | @Excel(name = "éç¨å·¥å") |
| | |
| | | package com.aps.core.domain; |
| | | |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @Builder |
| | | public class ApsPlateStandardRequireBatch extends BaseEntity |
| | | { |
| | | @Serial |
| | |
| | | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serial; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * ApsPlateStandardRequireBomOrderDetail对象 aps_plate_standard_require_bom_order_detail |
| | |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @Builder |
| | | public class ApsPlateStandardRequireBomOrderDetail extends BaseEntity |
| | | { |
| | | @Serial |
| | |
| | | |
| | | /** éæ±è¿½æº¯ID */ |
| | | @Excel(name = "éæ±è¿½æº¯ID") |
| | | |
| | | private String requireId; |
| | | |
| | | /** bom_line_id */ |
| | | @Excel(name = "bom_line_id") |
| | | |
| | | private String bomLineId; |
| | | |
| | | /** æå· */ |
| | | @Excel(name = "æå·") |
| | | |
| | | private String bomLineCode; |
| | | |
| | | /** 订åå· */ |
| | | @Excel(name = "订åå·") |
| | | |
| | | private String docNo; |
| | | |
| | | /** æ£ååæ°é */ |
| | | @Excel(name = "æ£ååæ°é") |
| | | |
| | | private String beforeProdAmount; |
| | | private BigDecimal beforeProdAmount; |
| | | |
| | | /** å¹é
æ°é */ |
| | | @Excel(name = "å¹é
æ°é") |
| | | |
| | | private String deductionAmount; |
| | | private BigDecimal deductionAmount; |
| | | |
| | | /** æ£ååæ°é */ |
| | | @Excel(name = "æ£ååæ°é") |
| | | |
| | | private String afterProdAmount; |
| | | private BigDecimal afterProdAmount; |
| | | |
| | | |
| | | private String orgCode; |
| | |
| | | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serial; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * ApsPlateStandardRequireBomStockDetail对象 aps_plate_standard_require_bom_stock_detail |
| | |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @Builder |
| | | public class ApsPlateStandardRequireBomStockDetail extends BaseEntity |
| | | { |
| | | @Serial |
| | |
| | | |
| | | /** æ£åååºåé */ |
| | | @Excel(name = "æ£åååºåé") |
| | | private String beforeStockAmount; |
| | | private BigDecimal beforeStockAmount; |
| | | |
| | | /** æ£ååºåé */ |
| | | @Excel(name = "æ£ååºåé") |
| | | private String deductionAmount; |
| | | private BigDecimal deductionAmount; |
| | | |
| | | /** æ£åååºåé */ |
| | | @Excel(name = "æ£åååºåé") |
| | | private String afterStockAmount; |
| | | private BigDecimal afterStockAmount; |
| | | |
| | | private String orgCode; |
| | | private String batchNumber; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.domain; |
| | | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serial; |
| | | |
| | | /** |
| | | * é£éæ åéæ±å¼å¸¸ä¿¡æ¯å¯¹è±¡ aps_plate_standard_require_error |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-08 |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @Schema(description = "é£éæ åéæ±å¼å¸¸ä¿¡æ¯å®ä½ç±»") |
| | | public class ApsPlateStandardRequireError extends BaseEntity |
| | | { |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | private Long id; |
| | | |
| | | /** æ¹æ¬¡å· */ |
| | | @Excel(name = "æ¹æ¬¡å·") |
| | | @Schema(description = "æ¹æ¬¡å·") |
| | | private String batchNumber; |
| | | |
| | | /** éæ±Idå· */ |
| | | @Excel(name = "éæ±Idå·") |
| | | @Schema(description = "éæ±Idå·") |
| | | private String requireId; |
| | | |
| | | /** å·¥åå· */ |
| | | @Excel(name = "å·¥åå·") |
| | | @Schema(description = "å·¥åå·") |
| | | private String docNum; |
| | | |
| | | /** æå· */ |
| | | @Excel(name = "æå·") |
| | | @Schema(description = "æå·") |
| | | private String itemNum; |
| | | |
| | | /** éç¨å·¥å */ |
| | | @Excel(name = "éç¨å·¥å") |
| | | @Schema(description = "éç¨å·¥å") |
| | | private String orgCode; |
| | | |
| | | /** å¼å¸¸ä¿¡æ¯ */ |
| | | @Excel(name = "å¼å¸¸ä¿¡æ¯") |
| | | @Schema(description = "å¼å¸¸ä¿¡æ¯") |
| | | private String message; |
| | | |
| | | /** æ¯å¦å é¤ï¼0ææ 1å é¤ */ |
| | | @Schema(description = "æ¯å¦å é¤ï¼0ææ 1å é¤") |
| | | private String delFlag; |
| | | |
| | | } |
| | |
| | | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serial; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * æ åå·¥èºè·¯çº¿Line对象 aps_standard_process_route_line |
| | |
| | | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @Builder |
| | | public class ApsStandardProcessRouteLine extends BaseEntity |
| | | { |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** $column.columnComment */ |
| | | |
| | | private Long id; |
| | | |
| | | /** å·¥èºè·¯çº¿ID */ |
| | | @Excel(name = "å·¥èºè·¯çº¿ID") |
| | | |
| | | private String routeId; |
| | | |
| | | /** å·¥åºåºå· */ |
| | | @Excel(name = "å·¥åºåºå·") |
| | | |
| | | private String routeNum; |
| | | |
| | | /** å·¥åºåç§° */ |
| | |
| | | |
| | | /** è®¾è®¡äº§è½ */ |
| | | @Excel(name = "设计产è½") |
| | | private String designCapacity; |
| | | private BigDecimal designCapacity; |
| | | |
| | | /** æ¯å¦å é¤ï¼0ææ 1å é¤ */ |
| | | private Long delFlag; |
| | | |
| | | private BigDecimal routeTime; |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsBom; |
| | | import jakarta.annotation.Resource; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | |
| | | @Mapper |
| | | public interface ApsBomMapper |
| | | { |
| | | |
| | | /** |
| | | * æ¥è¯¢BOMæ°æ®ç®¡ç |
| | | * |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsBomByIds(Long[] ids); |
| | | /** |
| | | * éè¿å·¥ååBOMHeaderIdæ¥è¯¢BOMLineæ°æ® |
| | | * */ |
| | | List< ApsBom> selectApsBomLineList(String orgCode,String bomHeaderId); |
| | | } |
| | |
| | | package com.aps.core.mapper; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsMaterialStorageManagement; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsMaterialStorageManagementByIds(String[] ids); |
| | | |
| | | |
| | | int updateMaterialStorageByVersion(BigDecimal remainderStock, Integer version); |
| | | } |
| | |
| | | public int insertPlatePlanFromTempByBatchNumber(String batchNumber); |
| | | |
| | | int removeAllPlatePlans(); |
| | | |
| | | List<ApsPlatePlan> selectPlatePlanByPlantMajor(String plant,String professionalAffiliation); |
| | | |
| | | /** |
| | | * è·åæªå¹é
çå计å |
| | | * */ |
| | | ApsPlatePlan selectUnMatchPlateSubPlan(String plant); |
| | | |
| | | /** |
| | | * æ´æ°åè®¡åæªå¹é
æ°é |
| | | * */ |
| | | int updatePlanUnMatchQtyByVersion(ApsPlatePlan plan); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsPlateStandardRequireError; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * é£éæ åéæ±å¼å¸¸ä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-08 |
| | | */ |
| | | @Mapper |
| | | public interface ApsPlateStandardRequireErrorMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param id é£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¸»é® |
| | | * @return é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | */ |
| | | public ApsPlateStandardRequireError selectApsPlateStandardRequireErrorById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯å表 |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return é£éæ åéæ±å¼å¸¸ä¿¡æ¯éå |
| | | */ |
| | | public List<ApsPlateStandardRequireError> selectApsPlateStandardRequireErrorList(ApsPlateStandardRequireError apsPlateStandardRequireError); |
| | | |
| | | /** |
| | | * æ°å¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertApsPlateStandardRequireError(ApsPlateStandardRequireError apsPlateStandardRequireError); |
| | | |
| | | /** |
| | | * ä¿®æ¹é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateApsPlateStandardRequireError(ApsPlateStandardRequireError apsPlateStandardRequireError); |
| | | |
| | | /** |
| | | * å é¤é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param id é£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsPlateStandardRequireErrorById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsPlateStandardRequireErrorByIds(Long[] ids); |
| | | } |
| | |
| | | * æ åå·¥èºè·¯çº¿HeaderMapperæ¥å£ |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-06 |
| | | * @date 2025-05-06 |
| | | */ |
| | | @Mapper |
| | | public interface ApsStandardProcessRouteHeaderMapper |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsStandardProcessRouteHeaderByIds(Long[] ids); |
| | | |
| | | /** |
| | | * æ ¹æ®å·¥åãç©æå·æ¥è¯¢å·¥èºè·¯çº¿ |
| | | * */ |
| | | List<ApsStandardProcessRouteHeader> queryStandardProcessRouteHeaderByPlantAndItemCode(String orgCode, String itemCode); |
| | | } |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsBomById(Long id); |
| | | |
| | | List<ApsBom> selectApsBomLineList(String plant, String itemNumber); |
| | | } |
| | |
| | | package com.aps.core.service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlateStandardRequire; |
| | | import com.aps.core.domain.ApsPlateStandardRequireBomOrderDetail; |
| | | |
| | | /** |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsPlateStandardRequireBomOrderDetailById(Long id); |
| | | |
| | | void savePlastPlanAndBomOrderDetail(ApsPlateStandardRequire require, ApsPlatePlan platePlan, BigDecimal subtract, BigDecimal stock, BigDecimal netRequirement); |
| | | } |
| | |
| | | package com.aps.core.service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import com.aps.core.domain.ApsBom; |
| | | import com.aps.core.domain.ApsMaterialStorageManagement; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlateStandardRequireBomStockDetail; |
| | | |
| | | /** |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsPlateStandardRequireBomStockDetailById(Long id); |
| | | |
| | | void saveStorageAndDetail(ApsMaterialStorageManagement itemStorage, ApsPlatePlan plan, ApsBom bomLine, String batchNum, BigDecimal deductionAmount, BigDecimal afterStockAmount); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.service; |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsPlateStandardRequireError; |
| | | |
| | | /** |
| | | * é£éæ åéæ±å¼å¸¸ä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-08 |
| | | */ |
| | | public interface IApsPlateStandardRequireErrorService |
| | | { |
| | | /** |
| | | * æ¥è¯¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param id é£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¸»é® |
| | | * @return é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | */ |
| | | public ApsPlateStandardRequireError selectApsPlateStandardRequireErrorById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯å表 |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return é£éæ åéæ±å¼å¸¸ä¿¡æ¯éå |
| | | */ |
| | | public List<ApsPlateStandardRequireError> selectApsPlateStandardRequireErrorList(ApsPlateStandardRequireError apsPlateStandardRequireError); |
| | | |
| | | /** |
| | | * æ°å¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertApsPlateStandardRequireError(ApsPlateStandardRequireError apsPlateStandardRequireError); |
| | | |
| | | /** |
| | | * ä¿®æ¹é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateApsPlateStandardRequireError(ApsPlateStandardRequireError apsPlateStandardRequireError); |
| | | |
| | | /** |
| | | * æ¹éå é¤é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çé£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsPlateStandardRequireErrorByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤é£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id é£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsPlateStandardRequireErrorById(Long id); |
| | | } |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.core.domain.ApsBomHeader; |
| | | import com.aps.core.mapper.ApsBomHeaderMapper; |
| | | import jakarta.annotation.Resource; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsBomMapper; |
| | |
| | | @Autowired |
| | | private ApsBomMapper apsBomMapper; |
| | | |
| | | @Resource |
| | | private ApsBomHeaderMapper bomHeaderMapper; |
| | | /** |
| | | * æ¥è¯¢BOMæ°æ®ç®¡ç |
| | | * |
| | |
| | | @Override |
| | | public List<ApsBom> selectApsBomList(ApsBom apsBom) |
| | | { |
| | | |
| | | return apsBomMapper.selectApsBomList(apsBom); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éè¿æå·ãå·¥åæ¥è¯¢BOMLineæ°æ®å表 |
| | | * */ |
| | | @Override |
| | | public List<ApsBom> selectApsBomLineList(String plant, String itemNumber) |
| | | { |
| | | List<ApsBom> bomLineList =new ArrayList<>(); |
| | | ApsBomHeader headerParam = ApsBomHeader.builder().itemCode(itemNumber).orgCode(plant).build(); |
| | | Optional<ApsBomHeader> first = bomHeaderMapper.selectApsBomHeaderList(headerParam).stream().findFirst(); |
| | | if (first.isPresent()){ |
| | | ApsBomHeader apsBomHeader = first.get(); |
| | | bomLineList = apsBomMapper.selectApsBomLineList(plant, apsBomHeader.getBomHeaderId()); |
| | | } |
| | | return bomLineList; |
| | | } |
| | | } |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlateStandardRequire; |
| | | import com.aps.core.mapper.ApsPlatePlanMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsPlateStandardRequireBomOrderDetailMapper; |
| | |
| | | { |
| | | @Autowired |
| | | private ApsPlateStandardRequireBomOrderDetailMapper apsPlateStandardRequireBomOrderDetailMapper; |
| | | |
| | | @Autowired |
| | | private ApsPlatePlanMapper apsPlatePlanMapper; |
| | | /** |
| | | * æ¥è¯¢ApsPlateStandardRequireBomOrderDetail |
| | | * |
| | |
| | | { |
| | | return apsPlateStandardRequireBomOrderDetailMapper.deleteApsPlateStandardRequireBomOrderDetailById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void savePlastPlanAndBomOrderDetail(ApsPlateStandardRequire require, ApsPlatePlan platePlan, BigDecimal subtract, BigDecimal stock, BigDecimal netRequirement) { |
| | | platePlan.setUnmatchedQuantity(subtract); |
| | | apsPlatePlanMapper.updatePlanUnMatchQtyByVersion(platePlan); |
| | | /* è®°å½å·¥åä¸åéæ±çå¹é
å
³ç³»*/ |
| | | ApsPlateStandardRequireBomOrderDetail bomOrderDetail = ApsPlateStandardRequireBomOrderDetail.builder() |
| | | .id(IdUtil.getSnowflakeNextId()) |
| | | .requireId(require.getRequireId()) |
| | | .bomLineId(require.getBomLineId()) |
| | | .bomLineCode(require.getBomLineCode()) |
| | | .docNo(platePlan.getDocumentNumber()) |
| | | .beforeProdAmount(stock) |
| | | .deductionAmount(netRequirement) |
| | | .afterProdAmount(subtract).build(); |
| | | apsPlateStandardRequireBomOrderDetailMapper.insertApsPlateStandardRequireBomOrderDetail(bomOrderDetail); |
| | | } |
| | | } |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.common.security.utils.SecurityUtils; |
| | | import com.aps.core.domain.*; |
| | | import com.aps.core.mapper.ApsMaterialStorageManagementMapper; |
| | | import jakarta.annotation.Resource; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsPlateStandardRequireBomStockDetailMapper; |
| | | import com.aps.core.domain.ApsPlateStandardRequireBomStockDetail; |
| | | import com.aps.core.service.IApsPlateStandardRequireBomStockDetailService; |
| | | |
| | | /** |
| | |
| | | { |
| | | @Autowired |
| | | private ApsPlateStandardRequireBomStockDetailMapper apsPlateStandardRequireBomStockDetailMapper; |
| | | @Resource |
| | | ApsMaterialStorageManagementMapper itemStorageMapper; |
| | | |
| | | @Resource |
| | | ApsPlateStandardRequireBomStockDetailMapper plateBomStockDetailMapper; |
| | | /** |
| | | * æ¥è¯¢ApsPlateStandardRequireBomStockDetail |
| | | * |
| | |
| | | { |
| | | return apsPlateStandardRequireBomStockDetailMapper.deleteApsPlateStandardRequireBomStockDetailById(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 计ç®ç©æå©ä½åºå å¹¶ä¿åç©æå©ä½åºåæç»ã |
| | | * */ |
| | | @Override |
| | | public void saveStorageAndDetail(ApsMaterialStorageManagement itemStorage, ApsPlatePlan plan, ApsBom bomLine, String batchNum, BigDecimal deductionAmount, BigDecimal afterStockAmount){ |
| | | /*æ´æ°ç©æå©ä½åºå*/ |
| | | itemStorageMapper.updateMaterialStorageByVersion(afterStockAmount,itemStorage.getVersion()); |
| | | /*è®°å½æ£åæç»*/ |
| | | ApsPlateStandardRequireBomStockDetail bomStockDetail = ApsPlateStandardRequireBomStockDetail.builder() |
| | | .id(IdUtil.getSnowflakeNextId()) |
| | | .requireId(plan.getRequireId()) |
| | | .bomLineId(bomLine.getBomLineId()) |
| | | .bomLineCode(bomLine.getItemCode()) |
| | | .beforeStockAmount(itemStorage.getRemainderStock()) |
| | | .deductionAmount(deductionAmount) |
| | | .afterStockAmount(afterStockAmount) |
| | | .batchNumber(batchNum) |
| | | .orgCode(itemStorage.getApplicableFactories()) |
| | | .delFlag("0") |
| | | .build(); |
| | | bomStockDetail.setCreateBy(SecurityUtils.getUsername()); |
| | | bomStockDetail.setCreateTime(DateUtils.getNowDate()); |
| | | |
| | | plateBomStockDetailMapper.insertApsPlateStandardRequireBomStockDetail(bomStockDetail); |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsPlateStandardRequireErrorMapper; |
| | | import com.aps.core.domain.ApsPlateStandardRequireError; |
| | | import com.aps.core.service.IApsPlateStandardRequireErrorService; |
| | | |
| | | /** |
| | | * é£éæ åéæ±å¼å¸¸ä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-08 |
| | | */ |
| | | @Service |
| | | public class ApsPlateStandardRequireErrorServiceImpl implements IApsPlateStandardRequireErrorService |
| | | { |
| | | @Autowired |
| | | private ApsPlateStandardRequireErrorMapper apsPlateStandardRequireErrorMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param id é£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¸»é® |
| | | * @return é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public ApsPlateStandardRequireError selectApsPlateStandardRequireErrorById(Long id) |
| | | { |
| | | return apsPlateStandardRequireErrorMapper.selectApsPlateStandardRequireErrorById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯å表 |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<ApsPlateStandardRequireError> selectApsPlateStandardRequireErrorList(ApsPlateStandardRequireError apsPlateStandardRequireError) |
| | | { |
| | | return apsPlateStandardRequireErrorMapper.selectApsPlateStandardRequireErrorList(apsPlateStandardRequireError); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertApsPlateStandardRequireError(ApsPlateStandardRequireError apsPlateStandardRequireError) |
| | | { |
| | | apsPlateStandardRequireError.setCreateTime(DateUtils.getNowDate()); |
| | | return apsPlateStandardRequireErrorMapper.insertApsPlateStandardRequireError(apsPlateStandardRequireError); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param apsPlateStandardRequireError é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateApsPlateStandardRequireError(ApsPlateStandardRequireError apsPlateStandardRequireError) |
| | | { |
| | | apsPlateStandardRequireError.setUpdateTime(DateUtils.getNowDate()); |
| | | return apsPlateStandardRequireErrorMapper.updateApsPlateStandardRequireError(apsPlateStandardRequireError); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤é£éæ åéæ±å¼å¸¸ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çé£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteApsPlateStandardRequireErrorByIds(Long[] ids) |
| | | { |
| | | return apsPlateStandardRequireErrorMapper.deleteApsPlateStandardRequireErrorByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id é£éæ åéæ±å¼å¸¸ä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteApsPlateStandardRequireErrorById(Long id) |
| | | { |
| | | return apsPlateStandardRequireErrorMapper.deleteApsPlateStandardRequireErrorById(id); |
| | | } |
| | | } |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.common.security.utils.DictUtils; |
| | | import com.aps.common.security.utils.SecurityUtils; |
| | | import com.aps.core.domain.*; |
| | | import com.aps.core.mapper.*; |
| | | import com.aps.core.service.IApsBomService; |
| | | import com.aps.core.service.IApsPlateStandardRequireBomOrderDetailService; |
| | | import com.aps.core.service.IApsPlateStandardRequireBomStockDetailService; |
| | | import com.aps.system.api.domain.SysDictData; |
| | | import jakarta.annotation.Resource; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsPlateStandardRequireMapper; |
| | | import com.aps.core.domain.ApsPlateStandardRequire; |
| | | import com.aps.core.service.IApsPlateStandardRequireService; |
| | | |
| | | /** |
| | |
| | | { |
| | | @Autowired |
| | | private ApsPlateStandardRequireMapper apsPlateStandardRequireMapper; |
| | | |
| | | @Resource |
| | | private ApsPlateStandardRequireBatchMapper requireBatchMapper; |
| | | |
| | | @Resource |
| | | ApsPlatePlanMapper platePlanMapper; |
| | | |
| | | @Resource |
| | | ApsBomHeaderMapper bomHeaderMapper; |
| | | @Resource |
| | | IApsBomService bomLineService; |
| | | |
| | | @Resource |
| | | ApsMaterialStorageManagementMapper itemStorageMapper; |
| | | |
| | | @Resource |
| | | ApsPlateStandardRequireBomStockDetailMapper plateBomStockDetailMapper; |
| | | |
| | | @Resource |
| | | IApsPlateStandardRequireBomStockDetailService bomStockDetailService; |
| | | @Resource |
| | | ApsStandardProcessRouteHeaderMapper standardProcessRouteHeaderMapper; |
| | | |
| | | @Resource |
| | | ApsStandardProcessRouteLineMapper ApsStandardProcessRouteLineMapper; |
| | | |
| | | @Resource |
| | | ApsPlateStandardRequireBomOrderDetailMapper plateBomOrderDetailMapper; |
| | | |
| | | @Autowired |
| | | private ApsPlatePlanMapper apsPlatePlanMapper; |
| | | |
| | | @Resource |
| | | IApsPlateStandardRequireBomOrderDetailService bomOrderDetailService; |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢é£éå·¥åæ åéæ± |
| | |
| | | { |
| | | return apsPlateStandardRequireMapper.deleteApsPlateStandardRequireById(id); |
| | | } |
| | | |
| | | private void generatorPlan(){ |
| | | |
| | | /*å®ä¹å·¥å为åé */ |
| | | String plantCode="FORTUNA"; |
| | | /*å®ä¹ä¸»åç±»å为é£é主å*/ |
| | | String mainOrderType = "é£é主件"; |
| | | /*å®ä¹ååç±»å为é£éåå*/ |
| | | String subOrderType = "é£éåä»¶"; |
| | | /*çææ°æ¹æ¬¡å·*/ |
| | | String batchNum=getBatch(); |
| | | /*è·åé£é主åä¿¡æ¯*/ |
| | | List<ApsPlatePlan> mainPlans = platePlanMapper.selectPlatePlanByPlantMajor(plantCode,mainOrderType); |
| | | List<ApsPlateStandardRequire> requiresList=new ArrayList<>(); |
| | | for (ApsPlatePlan mainPlan : mainPlans) { |
| | | String itemNumber = mainPlan.getItemNumber(); |
| | | /*æ ¹æ®æå· è·åBOM Header */ |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | private void getBomRequires(String plant, ApsBom bomLine, String batchNum, Date upLevelStartDate, ApsPlatePlan plan, List<ApsPlateStandardRequire> allRequires, Long level){ |
| | | |
| | | String itemNumber = bomLine.getItemCode(); |
| | | String productivityModel_combined_batch="åæ¹"; |
| | | String productivityModel_monopolize="ç¬å "; |
| | | Optional<ApsStandardProcessRouteHeader> firstProcessRoute = standardProcessRouteHeaderMapper.queryStandardProcessRouteHeaderByPlantAndItemCode(plant, itemNumber).stream().findFirst(); |
| | | if (firstProcessRoute.isPresent()) { |
| | | /*è·åå·¥èºè·¯çº¿Headerä¿¡æ¯*/ |
| | | ApsStandardProcessRouteHeader routeHeader = firstProcessRoute.get(); |
| | | /*æå»ºéæ±ä¿¡æ¯*/ |
| | | ApsPlateStandardRequire require = new ApsPlateStandardRequire(); |
| | | require.setId(IdUtil.getSnowflakeNextId()); |
| | | require.setRequireId(plan.getId()); |
| | | require.setBatchNumber(batchNum); |
| | | require.setOrgCode(plant); |
| | | require.setBomLineCode(itemNumber); |
| | | require.setBomLineLevel(level); |
| | | require.setBomUseAmount(bomLine.getNum()); |
| | | require.setCreateTime(DateUtils.getNowDate()); |
| | | require.setCreateBy(SecurityUtils.getUsername()); |
| | | /*计ç®éæ±æ°é*/ |
| | | if (level == 0) { |
| | | require.setBomUseAmount(BigDecimal.ONE); |
| | | require.setCompleteDate(plan.getPlanEndDay()); |
| | | require.setDemandDate(plan.getPlanEndDay()); |
| | | } else { |
| | | require.setBomUseAmount(bomLine.getNum().multiply(plan.getProductionQuantity())); |
| | | } |
| | | /*æ¥æ¾åºåï¼è®¡ç®åéæ±ï¼ä¿åå©ä½åºåï¼ä¿ååºåæ£åæç»*/ |
| | | BigDecimal remainderStock = BigDecimal.ZERO; |
| | | Optional<ApsMaterialStorageManagement> itemStorage = getItemStorage(plant, itemNumber); |
| | | if (itemStorage.isPresent()) { |
| | | ApsMaterialStorageManagement storage = itemStorage.get(); |
| | | /*å©ä½åºå*/ |
| | | remainderStock = storage.getRemainderStock(); |
| | | /*计ç®åéæ± é»è®¤=éæ±æ°é*/ |
| | | if (remainderStock.compareTo(BigDecimal.ZERO) == 0) { |
| | | require.setNetRequirement(require.getBomUseAmount()); |
| | | } |
| | | if (remainderStock.compareTo(BigDecimal.ZERO) > 0) { |
| | | BigDecimal subtract = require.getBomUseAmount().subtract(remainderStock); |
| | | BigDecimal deductionAmount = BigDecimal.ZERO; |
| | | BigDecimal afterStockAmount = BigDecimal.ZERO; |
| | | if (subtract.compareTo(BigDecimal.ZERO) >= 0) { |
| | | deductionAmount = remainderStock; |
| | | afterStockAmount = BigDecimal.ZERO; |
| | | require.setNetRequirement(subtract); |
| | | } else { |
| | | deductionAmount = require.getBomUseAmount(); |
| | | afterStockAmount = remainderStock.subtract(deductionAmount); |
| | | require.setNetRequirement(BigDecimal.ZERO); |
| | | } |
| | | bomStockDetailService.saveStorageAndDetail(storage, plan, bomLine, batchNum, deductionAmount, afterStockAmount); |
| | | } |
| | | } |
| | | /*åéæ±*/ |
| | | BigDecimal netRequirement = require.getNetRequirement(); |
| | | /*å·¥èºè·¯çº¿æ»éæ±*/ |
| | | BigDecimal totalRouteTime = getRouteLineTotalTime(routeHeader, productivityModel_monopolize, netRequirement); |
| | | long millisecond = 60*60*1000L; |
| | | long totalRouteMillisecond = totalRouteTime.multiply(BigDecimal.valueOf(millisecond)).longValue(); |
| | | /*宿æ¶é´ï¼level=0 æ¶é»è®¤ä¸ºå·¥åç计åå®ææ¥æ*/ |
| | | Date completeDate= plan.getPlanEndDay(); |
| | | /*é¢ç天æ°*/ |
| | | Long reservedDay = getReservedDays(); |
| | | if(level>0){ |
| | | /* å½åéæ±å®ææ¥æä¸ºä¸é¶å±éæ±çå¼å§æ¶é´ - é¢ç天æ°(转æ¢ä¸ºæ¯«ç§)*/ |
| | | long reservedMillisecond = reservedDay *24* millisecond; |
| | | completeDate.setTime(upLevelStartDate.getTime()-reservedMillisecond); |
| | | } |
| | | /*è®¾ç½®å®ææ¥æ*/ |
| | | require.setCompleteDate(completeDate); |
| | | require.setDemandDate(require.getCompleteDate()); |
| | | /*设置å¼å§æ¶é´*/ |
| | | Date startDay = new Date(); |
| | | startDay.setTime(completeDate.getTime() - totalRouteMillisecond); |
| | | require.setStartDate(startDay); |
| | | require.setMatchState("å·²å¹é
"); |
| | | require.setMatchMode("åºåå¹é
"); |
| | | if(require.getNetRequirement().compareTo(BigDecimal.ZERO)>0){ |
| | | require.setMatchState("å¾
å¹é
"); |
| | | require.setMatchMode("å·¥åå¹é
"); |
| | | } |
| | | require.setHasDelayRisk("æ é£é©"); |
| | | |
| | | allRequires.add(require); |
| | | /*å½åBomèç¹å¤ç宿åï¼å¤çä¸çº§BOM*/ |
| | | List<ApsBom> bomLineList = bomLineService.selectApsBomLineList(plant, itemNumber); |
| | | if(!bomLineList.isEmpty()){ |
| | | bomLineList.forEach(line -> { |
| | | getBomRequires(plant, line, batchNum, require.getStartDate(), plan, allRequires, level+1); |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | throw new RuntimeException("æªæ¾å°æ åå·¥èºè·¯çº¿"); |
| | | } |
| | | } |
| | | |
| | | private BigDecimal getRouteLineTotalTime(ApsStandardProcessRouteHeader routeHeader, String productivityModel_monopolize, BigDecimal netRequirement) { |
| | | ApsStandardProcessRouteLine routeLineParam = ApsStandardProcessRouteLine.builder() |
| | | .routeId(routeHeader.getRouteId()) |
| | | .build(); |
| | | List<ApsStandardProcessRouteLine> apsStandardProcessRouteLines = ApsStandardProcessRouteLineMapper.selectApsStandardProcessRouteLineList(routeLineParam); |
| | | /*å·¥èºè·¯çº¿Line æ»å·¥æ¶*/ |
| | | BigDecimal totalRouteTime = BigDecimal.ZERO; |
| | | apsStandardProcessRouteLines.forEach(line -> { |
| | | line.setRouteTime(line.getDesignCapacity()); |
| | | if (line.getProductivityModel().equals(productivityModel_monopolize)) { |
| | | line.setRouteTime(line.getDesignCapacity().multiply(netRequirement)); |
| | | } |
| | | totalRouteTime.add(line.getRouteTime()); |
| | | }); |
| | | return totalRouteTime; |
| | | } |
| | | |
| | | /** |
| | | * çææ°æ¹æ¬¡å· |
| | | * */ |
| | | private String getBatch() { |
| | | String batchNum = System.currentTimeMillis() + ""; |
| | | ApsPlateStandardRequireBatch batchBuilder = ApsPlateStandardRequireBatch.builder() |
| | | .id(IdUtil.getSnowflakeNextId()) |
| | | .batchNumber(batchNum) |
| | | .delFlag("0").build(); |
| | | batchBuilder.setCreateBy(SecurityUtils.getUsername()); |
| | | batchBuilder.setCreateTime(DateUtils.getNowDate()); |
| | | requireBatchMapper.insertApsPlateStandardRequireBatch(batchBuilder); |
| | | return batchNum; |
| | | } |
| | | /** |
| | | * è·åç©æåºåä¿¡æ¯ |
| | | * */ |
| | | private Optional<ApsMaterialStorageManagement> getItemStorage(String plant, String itemNumber) { |
| | | ApsMaterialStorageManagement storageParam = new ApsMaterialStorageManagement(); |
| | | storageParam.setItemNumber(itemNumber); |
| | | storageParam.setApplicableFactories(plant); |
| | | Optional<ApsMaterialStorageManagement> firstStorage = itemStorageMapper.selectApsMaterialStorageManagementList(storageParam).stream() |
| | | .findFirst(); |
| | | |
| | | return firstStorage; |
| | | } |
| | | |
| | | /** |
| | | * è·åé£é计å é¢çå¤©æ° |
| | | * */ |
| | | private Long getReservedDays(){ |
| | | Long days=0L; |
| | | List<SysDictData> dictDataList = DictUtils.getDictCache("aps_is_suspended"); |
| | | if (dictDataList != null) { |
| | | Long.getLong(dictDataList.get(0).getDictValue()); |
| | | } |
| | | return days; |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨åä»¶å·¥åå¹é
éæ±ä¸çåéæ± |
| | | * */ |
| | | private void matchRequireAndSubPlan(ApsPlateStandardRequire require) { |
| | | BigDecimal netRequirement = require.getNetRequirement(); |
| | | if (netRequirement.compareTo(BigDecimal.ZERO) > 0) { |
| | | ApsPlatePlan platePlan = apsPlatePlanMapper.selectUnMatchPlateSubPlan(require.getOrgCode()); |
| | | /*åä»¶å·¥åçæªå¹é
æ°é ä½ä¸ºå½åçåºå*/ |
| | | BigDecimal stock = platePlan.getUnmatchedQuantity(); |
| | | if (netRequirement.compareTo(stock) < 0) { |
| | | /* åºåæ°é å¤§äº åéæ±æ°é*/ |
| | | /* åéæ±æ°é=0 ï¼åä»¶å·¥åæªå¹é
æ°é= åºå-åéæ±*/ |
| | | netRequirement = BigDecimal.ZERO; |
| | | require.setNetRequirement(netRequirement); |
| | | BigDecimal subtract = stock.subtract(netRequirement); |
| | | bomOrderDetailService.savePlastPlanAndBomOrderDetail(require, platePlan, subtract, stock, netRequirement); |
| | | /*å鿱已ç»è¢«æ»¡è¶³ï¼ä¸éè¦ç»§ç»å¹é
*/ |
| | | |
| | | } else if (netRequirement.compareTo(stock) == 0) { |
| | | /*åéæ±æ°é == åºåæ°é*/ |
| | | netRequirement = BigDecimal.ZERO; |
| | | require.setNetRequirement(netRequirement); |
| | | BigDecimal subtract = BigDecimal.ZERO; |
| | | bomOrderDetailService.savePlastPlanAndBomOrderDetail(require, platePlan, subtract, stock, netRequirement); |
| | | /*å鿱已ç»è¢«æ»¡è¶³ï¼ä¸éè¦ç»§ç»å¹é
*/ |
| | | } |
| | | if (netRequirement.compareTo(stock) > 0) { |
| | | while (platePlan != null && netRequirement.compareTo(BigDecimal.ZERO) > 0) { |
| | | /*鿱大äºåºå*/ |
| | | /*åéæ± 被é¨å满足 */ |
| | | BigDecimal rest = netRequirement.subtract(stock); |
| | | require.setNetRequirement(rest); |
| | | require.setMatchState("å¹é
ä¸"); |
| | | /*å·¥å æªå¹é
æ°é为0 å
¨é¨ç¨äºå¹é
éæ±*/ |
| | | bomOrderDetailService.savePlastPlanAndBomOrderDetail(require, platePlan, BigDecimal.ZERO, stock, netRequirement); |
| | | /*åéæ±æªè¢«æ»¡è¶³ï¼éè¦ç»§ç»å¹é
*/ |
| | | platePlan = apsPlatePlanMapper.selectUnMatchPlateSubPlan(require.getOrgCode()); |
| | | netRequirement = rest; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <resultMap type="ApsBom" id="ApsBomLineResult"> |
| | | <result property="bomLineId" column="bom_line_id" /> |
| | | <result property="itemCode" column="item_code" /> |
| | | <result property="itemName" column="item_name" /> |
| | | <result property="num" column="num" /> |
| | | </resultMap> |
| | | <sql id="selectApsBomLineVo"> |
| | | select bom_line_id, item_code, item_name, num |
| | | from aps_bom_line |
| | | </sql> |
| | | |
| | | <select id="selectApsBomLineList" parameterType="ApsBom" resultMap="ApsBomLineResult"> |
| | | <include refid="selectApsBomLineVo"/> |
| | | <where> |
| | | <if test="bomHeaderId != null and bomHeaderId != ''"> and bom_header_id = #{bomHeaderId}</if> |
| | | <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> |
| | | and del_flag='0' |
| | | </where> |
| | | order by bom_header_id,bom_line_id |
| | | </select> |
| | | </mapper> |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="version" column="version" /> |
| | | <result property="remainderStock" column="remainder_stock" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsMaterialStorageManagementVo"> |
| | | select id, item_number, num, applicable_factories, integration_date, refresh_date, create_by, create_time, update_by, update_time from aps_material_storage_management |
| | | select id, item_number, num, applicable_factories, integration_date, refresh_date, create_by, |
| | | create_time, update_by, update_time ,remainderStock,version |
| | | from aps_material_storage_management |
| | | </sql> |
| | | |
| | | <select id="selectApsMaterialStorageManagementList" parameterType="ApsMaterialStorageManagement" resultMap="ApsMaterialStorageManagementResult"> |
| | | <include refid="selectApsMaterialStorageManagementVo"/> |
| | | <where> |
| | | <if test="itemNumber != null and itemNumber != ''"> and item_number = #{itemNumber}</if> |
| | | <if test="applicableFactories != null and applicableFactories != ''"> and applicable_factories = #{applicableFactories}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | <update id="updateMaterialStorageByVersion" parameterType="ApsMaterialStorageManagement"> |
| | | update aps_material_storage_management |
| | | set remainder_stock=#{remainderStock},version=version+1 |
| | | where id=#{id} and version=#{version} |
| | | </update> |
| | | </mapper> |
| | |
| | | <result property="stdOp" column="std_op" /> |
| | | <result property="opStatus" column="op_status" /> |
| | | <result property="nextOpName" column="next_op_name" /> |
| | | <result property="plant" column="plant" /> |
| | | <result property="unmatchedQuantity" column="unmatched_quantity" /> |
| | | <result property="professionalAffiliation" column="professional_affiliation" /> |
| | | <result property="requireId" column="require_id" /> |
| | | <result property="version" column="version" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsPartPlanVo"> |
| | | select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk, std_op, op_status, next_op_name from aps_part_plan |
| | | select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, |
| | | customer, business_type, document_number, requirement_type, document_status, item_number, |
| | | drawing_no, version_number, production_quantity, good_products_quantity, process_number, |
| | | work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, |
| | | next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, |
| | | advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, |
| | | has_turnback, has_risk, std_op, op_status, next_op_name , |
| | | plant, unmatched_quantity, professional_affiliation, require_id, version, unmatchedQuantity |
| | | from aps_part_plan |
| | | </sql> |
| | | |
| | | <select id="selectApsPartPlanList" parameterType="com.aps.core.domain.ApsPartPlan" resultMap="ApsPartPlanResult"> |
| | |
| | | <result property="opStatus" column="op_status" /> |
| | | <result property="nextOpName" column="next_op_name" /> |
| | | <result property="unmatchedQuantity" column="unmatched_quantity" /> |
| | | <result property="professionalAffiliation" column="professional_affiliation" /> |
| | | <result property="requireId" column="require_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsPlatePlanVo"> |
| | |
| | | work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, |
| | | standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, |
| | | advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, |
| | | has_turnback, has_risk, std_op, op_status, next_op_name ,unmatched_quantity |
| | | has_turnback, has_risk, std_op, op_status, next_op_name ,unmatched_quantity,professional_affiliation |
| | | from aps_plate_plan |
| | | </sql> |
| | | |
| | |
| | | update aps_plate_plan set del_flag='1' where del_flag ='0' |
| | | </update> |
| | | |
| | | <select id="selectPlatePlanByPlantMajor" parameterType="ApsPlatePlan" resultMap="ApsPlatePlanResult"> |
| | | select id,document_number,main_part_number,item_number,plant,professional_affiliation,production_quantity,require_id |
| | | from aps_plate_plan |
| | | <where> |
| | | <if test="plant != null "> and plant = #{plant}</if> |
| | | <if test="professionalAffiliation != null "> and professional_affiliation = #{professionalAffiliation}</if> |
| | | and del_flag='0' |
| | | </where> |
| | | order by document_number asc,id asc |
| | | </select> |
| | | |
| | | <select id="selectUnMatchPlateSubPlan" parameterType="ApsPlatePlan" resultMap="ApsPlatePlanResult"> |
| | | select id,document_number,main_part_number,item_number,plant,professional_affiliation,production_quantity, |
| | | ,unmatched_quantity |
| | | from aps_plate_plan |
| | | where del_flag='0' and professional_affiliation !='0' and unmatched_quantity > 0 |
| | | <if test="plant != null and plan !='' "> and plant = #{plant}</if> |
| | | order by document_number asc,id asc |
| | | limit 1 |
| | | </select> |
| | | |
| | | |
| | | <update id="updatePlanUnMatchQtyByVersion" parameterType="ApsPlatePlan"> |
| | | update aps_plate_plan |
| | | set unmatched_quantity=#{unmatched_quantity},version=version+1 |
| | | where id=#{id} and version=#{version} |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.aps.core.mapper.ApsPlateStandardRequireErrorMapper"> |
| | | |
| | | <resultMap type="ApsPlateStandardRequireError" id="ApsPlateStandardRequireErrorResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="batchNumber" column="batch_number" /> |
| | | <result property="requireId" column="require_id" /> |
| | | <result property="docNum" column="doc_num" /> |
| | | <result property="itemNum" column="item_num" /> |
| | | <result property="orgCode" column="org_code" /> |
| | | <result property="message" column="message" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsPlateStandardRequireErrorVo"> |
| | | select id, batch_number, require_id, doc_num, item_num, org_code, message, del_flag, create_by, create_time, update_by, update_time from aps_plate_standard_require_error |
| | | </sql> |
| | | |
| | | <select id="selectApsPlateStandardRequireErrorList" parameterType="ApsPlateStandardRequireError" resultMap="ApsPlateStandardRequireErrorResult"> |
| | | <include refid="selectApsPlateStandardRequireErrorVo"/> |
| | | <where> |
| | | <if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if> |
| | | <if test="requireId != null and requireId != ''"> and require_id = #{requireId}</if> |
| | | <if test="docNum != null and docNum != ''"> and doc_num = #{docNum}</if> |
| | | <if test="itemNum != null and itemNum != ''"> and item_num = #{itemNum}</if> |
| | | <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> |
| | | <if test="message != null and message != ''"> and message = #{message}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectApsPlateStandardRequireErrorById" parameterType="Long" resultMap="ApsPlateStandardRequireErrorResult"> |
| | | <include refid="selectApsPlateStandardRequireErrorVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertApsPlateStandardRequireError" parameterType="ApsPlateStandardRequireError"> |
| | | insert into aps_plate_standard_require_error |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="batchNumber != null">batch_number,</if> |
| | | <if test="requireId != null">require_id,</if> |
| | | <if test="docNum != null">doc_num,</if> |
| | | <if test="itemNum != null">item_num,</if> |
| | | <if test="orgCode != null">org_code,</if> |
| | | <if test="message != null">message,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="batchNumber != null">#{batchNumber},</if> |
| | | <if test="requireId != null">#{requireId},</if> |
| | | <if test="docNum != null">#{docNum},</if> |
| | | <if test="itemNum != null">#{itemNum},</if> |
| | | <if test="orgCode != null">#{orgCode},</if> |
| | | <if test="message != null">#{message},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsPlateStandardRequireError" parameterType="ApsPlateStandardRequireError"> |
| | | update aps_plate_standard_require_error |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="batchNumber != null">batch_number = #{batchNumber},</if> |
| | | <if test="requireId != null">require_id = #{requireId},</if> |
| | | <if test="docNum != null">doc_num = #{docNum},</if> |
| | | <if test="itemNum != null">item_num = #{itemNum},</if> |
| | | <if test="orgCode != null">org_code = #{orgCode},</if> |
| | | <if test="message != null">message = #{message},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteApsPlateStandardRequireErrorById" parameterType="Long"> |
| | | delete from aps_plate_standard_require_error where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteApsPlateStandardRequireErrorByIds" parameterType="String"> |
| | | delete from aps_plate_standard_require_error where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsStandardProcessRouteHeaderVo"> |
| | | select id, route_id, version, start_date, end_date, org_code, del_flag, create_by, create_time, update_by, update_time, item_code, drawing_number, process_all_time from aps_standard_process_route_header |
| | | select id, route_id, version, start_date, end_date, org_code, del_flag, create_by, |
| | | create_time, update_by, update_time, item_code, drawing_number, process_all_time |
| | | from aps_standard_process_route_header |
| | | </sql> |
| | | |
| | | <select id="selectApsStandardProcessRouteHeaderList" parameterType="ApsStandardProcessRouteHeader" resultMap="ApsStandardProcessRouteHeaderResult"> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="queryStandardProcessRouteHeaderByPlantAndItemCode" parameterType="String" resultMap="ApsStandardProcessRouteHeaderResult"> |
| | | <include refid="selectApsStandardProcessRouteHeaderVo"/> |
| | | <where> |
| | | <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> |
| | | <if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode} </if> |
| | | and del_flag = '0' |
| | | </where> |
| | | </select> |
| | | </mapper> |