Commit 043a4ebd authored by 李驰骋's avatar 李驰骋

排产不限制生产版本、排产任务保存工序序号

parent 5392ff01
......@@ -63,6 +63,11 @@ public class Task {
*/
private String processName;
/**
* 工序序列号
*/
private String idx;
/**
* 工作中心名称
*/
......
......@@ -142,11 +142,6 @@ public class AlgorithmDataSourceImpl implements AlgorithmDataSource {
msg.append(System.lineSeparator());
continue;
}
//生产版本查询
ProProductionSolutionVo productionSolution = proProductionSolutionService.selectProProductionSolutionByProductionSolutionId(firstWorkorder.getProductionSolutionId());
if(productionSolution==null){
throw new ServiceException(MessageUtils.message("pro.schedule.error.not.exist.solution", firstWorkorder.getWorkorderCode()));
}
// 工序分组 生成Job及Task
Job job = new Job(scheduleJobGroup.getWorkorderCode(), Duration.between(schedulingStartedDate, DateUtil.date(scheduleJobGroup.getDemandDate()).toLocalDateTime())) {{
setFixed(false);
......@@ -163,6 +158,7 @@ public class AlgorithmDataSourceImpl implements AlgorithmDataSource {
task.setStandardWorkingTime(Duration.ZERO);
task.setSetupTime(Duration.ZERO);
task.setProcessId(routingItem.getProcessId());
task.setIdx(routingItem.getIdx());
task.setProcessName(routingItem.getProcessName());
task.setOrderQuantity(scheduleJobGroup.getQuantity());
task.setWorkCenterId(routingItem.getWorkstationId());
......
......@@ -142,6 +142,7 @@ public class AlgorithmResultProcessImpl implements AlgorithmResultProcess {
private ProTask convertTask(Job job, Task task) {
ProTask proTask = new ProTask();
proTask.setProcessId(task.getProcessId());
proTask.setIdx(task.getIdx());
proTask.setProcessName(task.getProcessName());
proTask.setQuantity(task.getOrderQuantity());
proTask.setWorkstationId(task.getScheduledEquipment().getWorkCenterId());
......
......@@ -48,6 +48,7 @@
<result property="updateTime" column="update_time"/>
<result property="arrangeCode" column="arrange_code"/>
<result property="isLastProcess" column="is_last_process"/>
<result property="idx" column="idx"/>
</resultMap>
......@@ -391,6 +392,7 @@
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="idx != null">idx,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskCode != null and taskCode != ''">#{taskCode},</if>
......@@ -435,6 +437,7 @@
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="idx != null">#{idx},</if>
</trim>
</insert>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment