Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | 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.security.annotation.RequiresPermissions; |
| | | import com.aps.core.domain.ApsPlateOrderPlanDate; |
| | | import com.aps.core.domain.ApsPlateOrderPlanManager; |
| | | import com.aps.core.domain.ApsPlateStandardRequire; |
| | |
| | | /** |
| | | * 查询钣金工单计划 |
| | | */ |
| | | // @RequiresPermissions("ApsPlatOrderPlanManager:list") |
| | | @RequiresPermissions("ApsPlatOrderPlanManager:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ApsPlateOrderPlanManager apsPlateOrderPlanManager) |
| | | { |
| | |
| | | /** |
| | | * 查询钣金工单需求 |
| | | */ |
| | | // @RequiresPermissions("ApsPlatOrderPlanManager:requirement:list") |
| | | @RequiresPermissions("ApsPlatOrderPlanManager:requirement:list") |
| | | @GetMapping("/requirement/list") |
| | | public List<ApsPlateStandardRequire> list(String workOrderNo) |
| | | { |
| | |
| | | return list; |
| | | } |
| | | |
| | | @RequiresPermissions("ApsPlatOrderPlanManager:planDate:edit") |
| | | @PutMapping("/planDate") |
| | | public AjaxResult list(@RequestBody ApsPlateOrderPlanDate apsPlateOrderPlanDate) |
| | | { |
| | |
| | | |
| | | /** 需求追溯ID */ |
| | | @Excel(name = "需求追溯ID") |
| | | private Long requireTraceId; |
| | | private Long requireTrackId; |
| | | |
| | | /** 工单号 */ |
| | | @Excel(name = "工单号") |
| | |
| | | /** 需求计划开工日 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "需求计划开工日", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startDay; |
| | | private Date startDate; |
| | | |
| | | /** 需求计划开完日 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "需求计划开完日", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date completeDay; |
| | | private Date completeDate; |
| | | |
| | | /** 自定义日期 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "自定义日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date customTime; |
| | | } |
| | |
| | | @Excel(name = "工单创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date orderCreateTime; |
| | | |
| | | /** 自定义时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "自定义时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date customTime; |
| | | |
| | | /** 生产基地 */ |
| | | @Excel(name = "生产基地") |
| | | private String productionBase; |
| | |
| | | |
| | | 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; |
| | | |
| | |
| | | private BigDecimal unmatchedDemandAmount; |
| | | |
| | | /** 建议完成日期 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "建议完成日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date suggestedCompletionDate; |
| | | /** 延迟风险标识 */ |
| | | private String hasDelayRisk; |
| | |
| | | import com.aps.core.domain.ApsPlateStandardRequire; |
| | | import com.aps.core.mapper.ApsPlateOrderPlanManagerMapper; |
| | | import com.aps.core.service.IApsPlateOrderPlanManagerService; |
| | | import com.aps.core.service.IApsPlateStandardRequireService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Autowired |
| | | private ApsPlateOrderPlanManagerMapper apsPlateOrderPlanManagerMapper; |
| | | |
| | | @Autowired |
| | | private IApsPlateStandardRequireService apsPlateStandardRequireService; |
| | | |
| | | /** |
| | | * 查询钣金工单计划管理 |
| | | * |
| | |
| | | return apsPlateOrderPlanManagerMapper.selectApsPlanOrderManager(apsPlateOrderPlanManager); |
| | | } |
| | | |
| | | /** |
| | | * 查询钣金工单计划标准需求 |
| | | * |
| | | * @param workOrderNo 工单号 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ApsPlateStandardRequire> selectApsPlanStandardRequire(String workOrderNo) { |
| | | return apsPlateOrderPlanManagerMapper.selectApsPlanStandardRequire(workOrderNo); |
| | | } |
| | | |
| | | /** |
| | | * 批量更新计划时间 |
| | | * |
| | | * @param apsPlateOrderPlanDate |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void updatePlanDate(ApsPlateOrderPlanDate apsPlateOrderPlanDate) { |
| | | if (apsPlateOrderPlanDate.getIsCustom()){ |
| | | if (apsPlateOrderPlanDate.getIsCustom()) { |
| | | apsPlateOrderPlanManagerMapper.updatePlanDateByCustom(apsPlateOrderPlanDate); |
| | | }else{ |
| | | } else { |
| | | List<ApsPlateOrderPlanRequireDate> planRequireDates = apsPlateOrderPlanManagerMapper.selectPlanRequireIds(apsPlateOrderPlanDate.getPlanIds()); |
| | | planRequireDates.forEach(planRequireDate -> { |
| | | planRequireDate.setUpdateBy(SecurityUtils.getUsername()); |
| | | apsPlateOrderPlanManagerMapper.updatePlanDateByBatch(planRequireDate); |
| | | }); |
| | | } |
| | | |
| | | // apsPlateStandardRequireService.generatorPlan(); |
| | | } |
| | | } |
| | |
| | | <result property="hasDelayRisk" column="has_delay_risk" /> |
| | | <result property="startDate" column="start_date" /> |
| | | <result property="completeDate" column="complete_date" /> |
| | | <result property="customTime" column="custom_time" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectApsPlanOrderManager" parameterType="ApsPlateOrderPlanManager" resultMap="ApsPlateOrderPlanManagerResult"> |
| | |
| | | plan.plan_start_day, |
| | | plan.plan_end_day, |
| | | plan.unmatched_quantity, |
| | | plan.custom_time, |
| | | require.has_delay_risk, |
| | | plan.id, |
| | | require.start_date, |
| | | require.complete_date |
| | | from aps_plate_standard_require_bom_order_detail detail |
| | | left join aps_plate_standard_require require on on detail.require_id = require.id |
| | | left join aps_plate_standard_require require on detail.require_id = require.id |
| | | left join aps_plate_plan plan on detail.doc_no = plan.document_number |
| | | <where> |
| | | <if test="workOrderNo != null and workOrderNo != ''"> and detail.doc_no = #{workOrderNo}</if> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsPlateStandardRequireVo"> |
| | | select require.id, |
| | | select distinct require.id, |
| | | require.require_track_id, |
| | | require.bom_line_id, |
| | | require.bom_line_code, |
| | |
| | | min(require.start_date) as start_date, |
| | | min(require.complete_date) as end_date |
| | | from aps_plate_standard_require_bom_order_detail detail |
| | | left join aps_plate_standard_require require on on detail.require_id = require.id |
| | | left join aps_plate_standard_require require on detail.require_id = require.id |
| | | left join aps_plate_plan plan on detail.doc_no = plan.document_number |
| | | where plan.id in |
| | | <foreach collection="planIds" item="planId" open="(" separator="," close=")"> |
| | |
| | | |
| | | <update id="updatePlanDateByCustom" parameterType="ApsPlateOrderPlanDate"> |
| | | update aps_plate_plan set |
| | | plan_end_day = #{planRequireDate.customDate}, |
| | | custom_time = #{planRequireDate.customDate}, |
| | | update_by = #{planRequireDate.updateBy}, |
| | | update_time = now() |
| | | where id in |