| | |
| | | import com.aps.common.log.enums.BusinessType; |
| | | import com.aps.core.domain.ApsResourceGroup; |
| | | import com.aps.core.domain.ApsResourceGroupTemp; |
| | | import com.aps.core.param.ApsResourceGroupParam; |
| | | import com.aps.core.service.IApsResourceGroupService; |
| | | import com.aps.core.service.IApsResourceGroupTempService; |
| | | import jakarta.annotation.Resource; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @date 2025-04-10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/ApsResourceGroup") |
| | | @RequestMapping("/apsResourceGroup") |
| | | public class ApsResourceGroupController extends BaseController |
| | | { |
| | | @Resource |
| | |
| | | */ |
| | | /*@RequiresPermissions("ApsResourceGroup:list")*/ |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ApsResourceGroupParam apsResourceGroup) |
| | | public TableDataInfo list(ApsResourceGroup apsResourceGroup) |
| | | { |
| | | //startPage(); |
| | | List<ApsResourceGroup> list = apsResourceGroupService.selectApsResourceGroupList(apsResourceGroup); |
| | |
| | | /*@RequiresPermissions("ApsResourceGroup:ApsResourceGroup:export")*/ |
| | | @Log(title = "èµæºç»", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ApsResourceGroupParam apsResourceGroup) |
| | | public void export(HttpServletResponse response, ApsResourceGroup apsResourceGroup) |
| | | { |
| | | List<ApsResourceGroup> list = apsResourceGroupService.selectApsResourceGroupList(apsResourceGroup); |
| | | ExcelUtil<ApsResourceGroup> util = new ExcelUtil<>(ApsResourceGroup.class); |
| | |
| | | */ |
| | | @PostMapping("/confirmData") |
| | | public AjaxResult confirmData(@RequestBody ApsResourceGroupTemp temp) { |
| | | |
| | | apsResourceGroupService.confirmData(temp.getBatchNumber(),temp.getRequestDate()); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | LocalDateTime localDateTime = LocalDateTime.parse(temp.getParams().get("requestDate").toString(), formatter); |
| | | apsResourceGroupService.confirmData(temp.getBatchNumber(),localDateTime); |
| | | return AjaxResult.success("确认æåï¼"); |
| | | } |
| | | } |
| | |
| | | * @date 2025-04-10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/ApsResourceGroupTemp") |
| | | @RequestMapping("/apsResourceGroupTemp") |
| | | public class ApsResourceGroupTempController extends BaseController |
| | | { |
| | | @Autowired |
| | |
| | | /** å·¥å */ |
| | | // @Excel(name = "å·¥å") |
| | | private String plant; |
| | | |
| | | @Excel(name = "æ åå·¥æ¶") |
| | | private Long standardTime; |
| | | @Excel(name = "å·¥åºæåº") |
| | | private Long processOrder; |
| | | /** å 餿 å¿ï¼0代表åå¨ 2代表å é¤ï¼ */ |
| | | private String delFlag; |
| | | |
| | |
| | | public void setDiscardCount(Long discardCount) { |
| | | this.discardCount = discardCount; |
| | | } |
| | | |
| | | public Long getStandardTime() { |
| | | return standardTime; |
| | | } |
| | | |
| | | public void setStandardTime(Long standardTime) { |
| | | this.standardTime = standardTime; |
| | | } |
| | | |
| | | public Long getProcessOrder() { |
| | | return processOrder; |
| | | } |
| | | |
| | | public void setProcessOrder(Long processOrder) { |
| | | this.processOrder = processOrder; |
| | | } |
| | | } |
| | |
| | | /** å·¥å */ |
| | | @Excel(name = "å·¥å") |
| | | private String plant; |
| | | |
| | | @Excel(name = "æ åå·¥æ¶") |
| | | private Long standardTime; |
| | | @Excel(name = "å·¥åºæåº") |
| | | private Long processOrder; |
| | | /** å 餿 å¿ï¼0代表åå¨ 2代表å é¤ï¼ */ |
| | | private String delFlag; |
| | | |
| | |
| | | public void setDiscardCount(Long discardCount) { |
| | | this.discardCount = discardCount; |
| | | } |
| | | |
| | | public Long getStandardTime() { |
| | | return standardTime; |
| | | } |
| | | |
| | | public void setStandardTime(Long standardTime) { |
| | | this.standardTime = standardTime; |
| | | } |
| | | |
| | | public Long getProcessOrder() { |
| | | return processOrder; |
| | | } |
| | | |
| | | public void setProcessOrder(Long processOrder) { |
| | | this.processOrder = processOrder; |
| | | } |
| | | } |
| | |
| | | package com.aps.core.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.aps.common.core.annotation.Excel; |
| | |
| | | private Long theoryCapacity; |
| | | |
| | | /** æºå éæ±æ¥æ */ |
| | | @Excel(name = "æºå éæ±æ¥æ") |
| | | @Excel(name = "æºå éæ±æ¥æ",width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime requestDate; |
| | | |
| | | /** å 餿 å¿ï¼0代表åå¨ 2代表å é¤ï¼ */ |
| | | private String delFlag; |
| | | |
| | | /** å·¥å */ |
| | | @Excel(name = "å·¥å") |
| | | // @Excel(name = "å·¥å") |
| | | private String plant; |
| | | |
| | | public void setId(String id) |
| | |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsPartPlan; |
| | | import com.aps.core.domain.ApsPartPlanTemp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsPartPlanByIds(String[] ids); |
| | | |
| | | int insertBatch(List<ApsPartPlanTemp> apsPartPlanTemps); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsResourceGroup; |
| | | import com.aps.core.param.ApsResourceGroupParam; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | |
| | | * @param params èµæºç» |
| | | * @return èµæºç»éå |
| | | */ |
| | | public List<ApsResourceGroup> selectApsResourceGroupList(ApsResourceGroupParam params); |
| | | public List<ApsResourceGroup> selectApsResourceGroupList(ApsResourceGroup params); |
| | | |
| | | /** |
| | | * æ°å¢èµæºç» |
| | |
| | | |
| | | import com.aps.core.domain.ApsResourceGroup; |
| | | import com.aps.core.domain.ApsResourceGroupTemp; |
| | | import com.aps.core.param.ApsResourceGroupParam; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | |
| | | * @param apsResourceGroup èµæºç» |
| | | * @return èµæºç»éå |
| | | */ |
| | | List<ApsResourceGroup> selectApsResourceGroupList(ApsResourceGroupParam apsResourceGroup); |
| | | List<ApsResourceGroup> selectApsResourceGroupList(ApsResourceGroup apsResourceGroup); |
| | | |
| | | /** |
| | | * æ°å¢èµæºç» |
| | |
| | | //æ¥è¯¢ä¸´æ¶è¡¨æ°æ® |
| | | List<ApsPartPlanTemp> apsPartPlanTemps=apsPartPlanTempMapper.selectApsPartPlanTempList(apsPartPlanTemp); |
| | | int count=0; |
| | | String[] ids=new String[apsPartPlanTemps.size()]; |
| | | for (int i = 0; i <apsPartPlanTemps.size() ; i++) { |
| | | //è®°å½ä¸´æ¶è¡¨id |
| | | ids[i]=apsPartPlanTemps.get(i).getId(); |
| | | ApsPartPlan apsPartPlan=new ApsPartPlan(); |
| | | BeanUtils.copyProperties(apsPartPlanTemps.get(i), apsPartPlan); |
| | | apsPartPlan.setId(IdUtils.fastUUID()); |
| | | //æå
¥æ£å¼è¡¨ï¼å¹¶è®°å½ |
| | | apsPartPlanMapper.insertApsPartPlan(apsPartPlan); |
| | | count++; |
| | | } |
| | | List<String> aids=apsPartPlanTemps.stream().map(ApsPartPlanTemp::getId).toList(); |
| | | String[] ids=aids.toArray(new String[0]); |
| | | // for (int i = 0; i <apsPartPlanTemps.size() ; i++) { |
| | | // //è®°å½ä¸´æ¶è¡¨id |
| | | // ids[i]=apsPartPlanTemps.get(i).getId(); |
| | | // ApsPartPlan apsPartPlan=new ApsPartPlan(); |
| | | // BeanUtils.copyProperties(apsPartPlanTemps.get(i), apsPartPlan); |
| | | // apsPartPlan.setId(IdUtils.fastUUID()); |
| | | // //æå
¥æ£å¼è¡¨ï¼å¹¶è®°å½ |
| | | // apsPartPlanMapper.insertApsPartPlan(apsPartPlan); |
| | | // count++; |
| | | // } |
| | | count =apsPartPlanMapper.insertBatch(apsPartPlanTemps); |
| | | //æå
¥æ°éä¸ä¸´æ¶è¡¨æ¥è¯¢ä¸ç´åå é¤ä¸´æ¶è¡¨æ°æ® |
| | | if (count==apsPartPlanTemps.size()) { |
| | | apsPartPlanTempMapper.deleteApsPartPlanTempByIds(ids); |
| | |
| | | import com.aps.common.core.utils.uuid.IdUtils; |
| | | import com.aps.core.domain.ApsResourceGroupTemp; |
| | | import com.aps.core.mapper.ApsResourceGroupTempMapper; |
| | | import com.aps.core.param.ApsResourceGroupParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsResourceGroupMapper; |
| | |
| | | * @return èµæºç» |
| | | */ |
| | | @Override |
| | | public List<ApsResourceGroup> selectApsResourceGroupList(ApsResourceGroupParam apsResourceGroup) |
| | | public List<ApsResourceGroup> selectApsResourceGroupList(ApsResourceGroup apsResourceGroup) |
| | | { |
| | | return apsResourceGroupMapper.selectApsResourceGroupList(apsResourceGroup); |
| | | } |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | <insert id="insertBatch" parameterType="java.util.List"> |
| | | insert into aps_part_plan ( |
| | | 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, |
| | | plant |
| | | ) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | (#{item.id},#{item.masterPlanner},#{item.weekDay},#{item.weekCycle} |
| | | ,#{item.mainPartNumber},#{item.mainPartDrawingNumber},#{item.customer} |
| | | ,#{item.businessType},#{item.documentNumber},#{item.requirementType} |
| | | ,#{item.documentStatus},#{item.itemNumber},#{item.drawingNo},#{item.versionNumber} |
| | | ,#{item.productionQuantity},#{item.goodProductsQuantity},#{item.processNumber} |
| | | ,#{item.workCenter},#{item.department},#{item.planStartDay},#{item.planEndDay} |
| | | ,#{item.standbyNumber},#{item.standbyName},#{item.standbyStock},#{item.nextProcessDeparment} |
| | | ,#{item.isSuspended},#{item.isOutsourcing},#{item.account},#{item.advancedMaterials} |
| | | ,#{item.advancedDocumentNumber},#{item.advancedRequirementDay},#{item.isPlanComplete} |
| | | ,#{item.isStockComplete},#{item.hasTurnback},#{item.hasRisk},#{item.plant}) |
| | | </foreach> |
| | | </insert> |
| | | </mapper> |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="standardTime" column="standard_time" /> |
| | | <result property="processOrder" column="process_order" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsProcessRouteVo"> |
| | | select id, item_no, work_order_no, process_number, process_name, process_plan_start_day, process_plan_end_day, not_start_work_count, completed_count, discard_count, integration_day, plant, del_flag, create_by, create_time, update_by, update_time from aps_process_route |
| | | select id, item_no, work_order_no, process_number, process_name, process_plan_start_day, process_plan_end_day, not_start_work_count, completed_count, discard_count, integration_day, plant, del_flag, create_by, create_time, update_by, update_time,standard_time,process_order from aps_process_route |
| | | </sql> |
| | | |
| | | <select id="selectApsProcessRouteList" parameterType="ApsProcessRoute" resultMap="ApsProcessRouteResult"> |
| | |
| | | <if test="notStartWorkCount != null "> and not_start_work_count = #{notStartWorkCount}</if> |
| | | <if test="completedCount != null "> and completed_count = #{completedCount}</if> |
| | | <if test="discardCount != null "> and discard_count = #{discardCount}</if> |
| | | <if test="integrationDay != null "> and integration_day = #{integrationDay}</if> |
| | | <if test="params.beginIntegrationDay != null and params.beginIntegrationDay != '' and params.endIntegrationDay != null and params.endIntegrationDay != ''"> and integration_day between #{params.beginIntegrationDay} and #{params.endIntegrationDay}</if> |
| | | <!-- <if test="integrationDay != null "> and integration_day = #{integrationDay}</if>--> |
| | | <if test="plant != null and plant != ''"> and plant = #{plant}</if> |
| | | </where> |
| | | </select> |
| | |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="standardTime != null">standard_time,</if> |
| | | <if test="processOrder != null">process_order,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="standardTime != null">#{standardTime},</if> |
| | | <if test="processOrder != null">#{processOrder},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="standardTime != null">standard_time = #{standardTime},</if> |
| | | <if test="processOrder != null">process_order = #{processOrder},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="standardTime" column="standard_time" /> |
| | | <result property="processOrder" column="process_order" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsProcessRouteTempVo"> |
| | | select id, item_no, work_order_no, process_number, process_name, process_plan_start_day, process_plan_end_day, not_start_work_count, completed_count, discard_count, integration_day, batch_number, plant, del_flag, create_by, create_time, update_by, update_time from aps_process_route_temp |
| | | select id, item_no, work_order_no, process_number, process_name, process_plan_start_day, process_plan_end_day, not_start_work_count, completed_count, discard_count, integration_day, batch_number, plant, del_flag, create_by, create_time, update_by, update_time,standard_time,process_order from aps_process_route_temp |
| | | </sql> |
| | | |
| | | <select id="selectApsProcessRouteTempList" parameterType="ApsProcessRouteTemp" resultMap="ApsProcessRouteTempResult"> |
| | |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="standardTime != null">standard_time,</if> |
| | | <if test="processOrder != null">process_order,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="standardTime != null">#{standardTime},</if> |
| | | <if test="processOrder != null">#{processOrder},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="standardTime != null">standard_time = #{standardTime},</if> |
| | | <if test="processOrder != null">process_order = #{processOrder},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | select id, resource_group_name, devices_quantity, theory_hours, rest_days, theory_capacity, request_date, del_flag, create_by, create_time, update_by, update_time, plant from aps_resource_group |
| | | </sql> |
| | | |
| | | <select id="selectApsResourceGroupList" parameterType="ApsResourceGroupParam" resultMap="ApsResourceGroupResult"> |
| | | <select id="selectApsResourceGroupList" parameterType="ApsResourceGroup" resultMap="ApsResourceGroupResult"> |
| | | <include refid="selectApsResourceGroupVo"/> |
| | | <where> |
| | | <if test="resourceGroupName != null and resourceGroupName != ''"> and resource_group_name like '%' || #{resourceGroupName|| '%')</if> |
| | | <if test="resourceGroupName != null and resourceGroupName != ''"> and resource_group_name like '%' || #{resourceGroupName}|| '%'</if> |
| | | |
| | | <if test="beginRequestDate != null and beginRequestDate != '' and endRequestDate != null and endRequestDate != ''"> and request_date between #{beginRequestDate} and #{endRequestDate}</if> |
| | | <if test="params.beginRequestDate != null and params.beginRequestDate != '' and params.endRequestDate != null and params.endRequestDate != ''"> and request_date between #{params.beginRequestDate} and #{params.endRequestDate}</if> |
| | | <!--<if test="plant != null and plant != ''"> and plant = #{plant}</if> |
| | | <if test="devicesQuantity != null "> and devices_quantity = #{devicesQuantity}</if> |
| | | <if test="theoryHours != null "> and theory_hours = #{theoryHours}</if> |