| | |
| | | import com.aps.common.log.enums.BusinessType; |
| | | import com.aps.common.security.annotation.RequiresPermissions; |
| | | import com.aps.common.security.utils.DictUtils; |
| | | import com.aps.core.domain.ApsGasPipingPlan; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlatePlanTemp; |
| | | import com.aps.core.domain.export.ApsPlatePlanExport; |
| | | import com.aps.core.service.IApsPlatePlanService; |
| | | import com.aps.core.service.IApsPlatePlanTempService; |
| | | import com.aps.system.api.domain.SysDictData; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | |
| | | List<ApsPlatePlanTemp> list = apsPlatePlanTempService.selectApsPlatePlanTempList(apsPlatePlanTemp); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * é£éåä½å·¥åæ¥è¡¨ |
| | | * @param apsPlatePlan |
| | | * @return |
| | | */ |
| | | @RequiresPermissions("Aps:apsPlatePlan:redundantOrderList") |
| | | @GetMapping("/redundantOrderList") |
| | | public TableDataInfo redundantOrderList(ApsPlatePlan apsPlatePlan) { |
| | | startPage(); |
| | | List<ApsPlatePlan> list = apsPlatePlanService.selectPlateRedundantOrderList(apsPlatePlan); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * é£éåä½å·¥åæ¥è¡¨å¯¼åº |
| | | * @param apsPlatePlan |
| | | * @return |
| | | */ |
| | | @RequiresPermissions("Aps:apsPlatePlan:redundantOrderListExport") |
| | | @Log(title = "é£éåä½å·¥åæ¥è¡¨", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/redundantOrderListExport") |
| | | public void redundantOrderListExport(HttpServletResponse response, ApsPlatePlan apsPlatePlan) { |
| | | List<ApsPlatePlan> planList = apsPlatePlanService.selectApsPlatePlanList(apsPlatePlan); |
| | | List<ApsPlatePlanExport> planListExport = new ArrayList<>(); |
| | | for (ApsPlatePlan plan : planList) { |
| | | ApsPlatePlanExport planExport = new ApsPlatePlanExport(); |
| | | BeanUtils.copyProperties(plan, planExport); |
| | | planListExport.add(planExport); |
| | | } |
| | | ExcelUtil<ApsPlatePlanExport> util = new ExcelUtil<ApsPlatePlanExport>(ApsPlatePlanExport.class); |
| | | util.exportExcel(response, planListExport, "é£éåä½å·¥åæ¥è¡¨æ°æ®"); |
| | | } |
| | | |
| | | } |
| | |
| | | @Excel(name = "ä¸ä¸å·¥åºåç§°") |
| | | private String nextOpName; |
| | | |
| | | /** å·¥åå建æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "å·¥åå建æ¶é´", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date orderCreateTime; |
| | | |
| | | /** ç产åºå° */ |
| | | @Excel(name = "ç产åºå°") |
| | | private String productionBase; |
| | | |
| | | /** æªå¹é
çç产æ°é*/ |
| | | private BigDecimal unmatchedQuantity; |
| | | |
| | | public Date getOrderCreateTime() { |
| | | return orderCreateTime; |
| | | } |
| | | |
| | | public void setOrderCreateTime(Date orderCreateTime) { |
| | | this.orderCreateTime = orderCreateTime; |
| | | } |
| | | |
| | | public String getProductionBase() { |
| | | return productionBase; |
| | | } |
| | | |
| | | public void setProductionBase(String productionBase) { |
| | | this.productionBase = productionBase; |
| | | } |
| | | |
| | | public BigDecimal getUnmatchedQuantity() { |
| | | return unmatchedQuantity; |
| | | } |
| | | |
| | | public void setUnmatchedQuantity(BigDecimal unmatchedQuantity) { |
| | | this.unmatchedQuantity = unmatchedQuantity; |
| | | } |
| | | |
| | | public String getOpStatus() { |
| | | return opStatus; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.domain.export; |
| | | |
| | | 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 java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * é£é计å管ç对象 aps_plate_plan |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-04-08 |
| | | */ |
| | | @Data |
| | | public class ApsPlatePlanExport extends BaseEntity |
| | | { |
| | | |
| | | /** åæ®å· */ |
| | | @Excel(name = "å·¥åå·", sort = 1) |
| | | private String documentNumber; |
| | | |
| | | /** åä»¶æå· */ |
| | | @Excel(name = "åä»¶æå·", sort = 2) |
| | | private String itemNumber; |
| | | |
| | | /** ç产æ°é */ |
| | | @Excel(name = "ç产æ°é", sort = 3) |
| | | private BigDecimal productionQuantity; |
| | | |
| | | /** æªå¹é
çç产æ°é*/ |
| | | @Excel(name = "æªå¹é
çç产æ°é", sort = 4) |
| | | private BigDecimal unmatchedQuantity; |
| | | |
| | | /** éç¨å·¥å */ |
| | | @Excel(name = "éç¨å·¥å", sort = 5) |
| | | private String plant; |
| | | |
| | | /** ç产åºå° */ |
| | | @Excel(name = "ç产åºå°", sort = 6) |
| | | private String productionBase; |
| | | |
| | | /** 计åå¼å·¥æ¥ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "计åå¼å·¥æ¥", width = 30, dateFormat = "yyyy-MM-dd", sort = 7) |
| | | private Date planStartDay; |
| | | |
| | | /** 计åå®å·¥æ¥ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "计åå®å·¥æ¥", width = 30, dateFormat = "yyyy-MM-dd", sort = 8) |
| | | private Date planEndDay; |
| | | |
| | | /** å·¥åå建æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "å·¥åå建æ¶é´", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 9) |
| | | private Date orderCreateTime; |
| | | |
| | | } |
| | |
| | | package com.aps.core.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é£é计å管çMapperæ¥å£ |
| | |
| | | public int insertPlatePlanFromTempByBatchNumber(String batchNumber); |
| | | |
| | | int removeAllPlatePlans(); |
| | | |
| | | /** |
| | | * é£éåä½å·¥åæ¥è¡¨ |
| | | * @param apsPlatePlan |
| | | * @return |
| | | */ |
| | | public List<ApsPlatePlan> selectPlateRedundantOrderList(ApsPlatePlan apsPlatePlan); |
| | | } |
| | |
| | | package com.aps.core.service; |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlatePlanTemp; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é£é计å管çServiceæ¥å£ |
| | |
| | | * @throws Exception |
| | | */ |
| | | String importData(List<ApsPlatePlanTemp> tempList) throws Exception; |
| | | |
| | | /** |
| | | * é£éåä½å·¥åæ¥è¡¨ |
| | | * @param apsPlatePlan |
| | | * @return |
| | | */ |
| | | public List<ApsPlatePlan> selectPlateRedundantOrderList(ApsPlatePlan apsPlatePlan); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * é£éåä½å·¥åæ¥è¡¨ |
| | | * @param apsPlatePlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ApsPlatePlan> selectPlateRedundantOrderList(ApsPlatePlan apsPlatePlan) { |
| | | return apsPlatePlanMapper.selectPlateRedundantOrderList(apsPlatePlan); |
| | | } |
| | | } |
| | |
| | | <result property="opStatus" column="op_status" /> |
| | | <result property="nextOpName" column="next_op_name" /> |
| | | <result property="unmatchedQuantity" column="unmatched_quantity" /> |
| | | <result property="productionBase" column="production_base" /> |
| | | <result property="orderCreateTime" column="order_create_time" /> |
| | | </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, production_base, order_create_time |
| | | from aps_plate_plan |
| | | </sql> |
| | | |
| | |
| | | update aps_plate_plan set del_flag='1' where del_flag ='0' |
| | | </update> |
| | | |
| | | <select id="selectPlateRedundantOrderList" parameterType="ApsPlatePlan" resultMap="ApsPlatePlanResult"> |
| | | select document_number, item_number, production_quantity, unmatched_quantity, plant, production_base, plan_start_day, plan_end_day, order_create_time |
| | | from aps_plate_plan where unmatched_quantity>0 and professional_affiliation!='0' |
| | | <if test="documentNumber != null and documentNumber != ''"> |
| | | and document_number like '%' || #{documentNumber} || '%' |
| | | </if> |
| | | <if test="itemNumber != null and itemNumber != ''"> |
| | | and item_number like '%' || #{itemNumber} || '%' |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |