feat: 完善分切下料桁架任务
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package org.nl.common.utils;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
|
||||
/**
|
||||
* @author: lyd
|
||||
@@ -32,4 +35,47 @@ public class TaskUtils {
|
||||
source.setUpdate_optname("ACS");
|
||||
source.setUpdate_time(DateUtil.now());
|
||||
}
|
||||
|
||||
/**
|
||||
* 用0,1,2,3四个的二进制字符表示是下单(双)上单(双)
|
||||
* @param currentUpPlan 要下来的上轴
|
||||
* @param currentDownPlan 要下来的下轴
|
||||
* @param nextUpPlan 要上去的上轴
|
||||
* @param nextDownPlan 要上去的下轴
|
||||
* @return 二进制表示字符串
|
||||
*/
|
||||
public static String binaryConvertExpress(PdmBiSlittingproductionplan currentUpPlan, PdmBiSlittingproductionplan currentDownPlan,PdmBiSlittingproductionplan nextUpPlan,PdmBiSlittingproductionplan nextDownPlan) {
|
||||
String binary = "";
|
||||
if (ObjectUtil.isNotEmpty(currentUpPlan) && ObjectUtil.isNotEmpty(currentDownPlan)) {
|
||||
binary += "1";
|
||||
} else {
|
||||
binary += "0";
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(nextUpPlan) && ObjectUtil.isNotEmpty(nextDownPlan)) {
|
||||
binary += "1";
|
||||
} else {
|
||||
binary += "0";
|
||||
}
|
||||
return binary;
|
||||
}
|
||||
|
||||
/**
|
||||
* 赋值分切计划的修改时间、人等信息
|
||||
* @param plan 分切计划
|
||||
*/
|
||||
public static void updateOptMessageBySlitterPlan(PdmBiSlittingproductionplan plan) {
|
||||
plan.setUpdate_optid(SecurityUtils.getCurrentUserId());
|
||||
plan.setUpdate_optname(SecurityUtils.getCurrentUsername());
|
||||
plan.setUpdate_time(DateUtil.now());
|
||||
}
|
||||
|
||||
/**
|
||||
* 赋值任务的修改时间、人等信息
|
||||
* @param task 任务
|
||||
*/
|
||||
public static void updateOptMessageByTask(SchBaseTask task) {
|
||||
task.setUpdate_optid(SecurityUtils.getCurrentUserId());
|
||||
task.setUpdate_optname(SecurityUtils.getCurrentUsername());
|
||||
task.setUpdate_time(DateUtil.now());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user