Browse Source

fix: 物料字段追加、分拣判断是否能够继续码垛

master
李永德 1 year ago
parent
commit
6fb7a3677d
  1. 22
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/MdBaseMaterial.java
  2. 24
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml
  3. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/vo/AcsWorkOrderVo.java
  4. 15
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java
  5. 152
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java
  6. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/mapper/FJMapper.java
  7. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/mapper/FJMapper.xml
  8. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java
  9. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java
  10. 17
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java
  11. 29
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/Tes.java
  12. 2
      lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml

22
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/MdBaseMaterial.java

@ -104,4 +104,26 @@ public class MdBaseMaterial implements Serializable {
@ApiModelProperty(value = "W") @ApiModelProperty(value = "W")
private String w_thickness; private String w_thickness;
private String matsize;
private BigDecimal standing_time_lower;
private BigDecimal standing_time_upper;
private BigDecimal single_weight_upper;
private BigDecimal single_weight_lower;
private BigDecimal standard_size_height1;
private BigDecimal standard_size_height1_lower;
private BigDecimal standard_size_height1_upper;
private BigDecimal standard_size_height2;
private BigDecimal standard_size_height2_lower;
private BigDecimal standard_size_height2_upper;
private BigDecimal standard_size_height3;
private BigDecimal standard_size_height3_upper;
private BigDecimal standard_size_height3_lower;
private BigDecimal standard_size_height4;
private BigDecimal standard_size_height4_lower;
private BigDecimal standard_size_height4_upper;
private BigDecimal cooling_time_lower;
private String pack_palletspec;
private String pack_method;
private String pack_directsize;
private String draw_address;
} }

24
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml

@ -112,6 +112,30 @@
FORMULA AS raw_material_code, FORMULA AS raw_material_code,
REC_TIM AS ext_time, REC_TIM AS ext_time,
sysdate AS create_time, sysdate AS create_time,
MATSIZE AS matsize,
SLEEP_TIME_NORM AS standing_time,
SLEEP_TIME_LOWER AS standing_time_lower,
SLEEP_TIME_UPPER AS standing_time_upper,
MATCONVERTRATE_LOWER AS single_weight_lower,
MATCONVERTRATE_UPPER AS single_weight_upper,
MATSIZE1_NORM AS standard_size_height1,
MATSIZE1_LOWER AS standard_size_height1_lower,
MATSIZE1_UPPER AS standard_size_height1_upper,
MATSIZE2_NORM AS standard_size_height2,
MATSIZE2_LOWER AS standard_size_height2_lower,
MATSIZE2_UPPER AS standard_size_height2_upper,
MATSIZE3_NORM AS standard_size_height3,
MATSIZE3_LOWER AS standard_size_height3_lower,
MATSIZE3_UPPER AS standard_size_height3_upper,
MATSIZE4_NORM AS standard_size_height4,
MATSIZE4_LOWER AS standard_size_height4_lower,
MATSIZE4_UPPER AS standard_size_height4_upper,
COOL_TIME_NORM AS cooling_time,
COOL_TIME_LOWER AS cooling_time_lower,
PACK_PALLETSPEC AS pack_palletspec,
PACK_METHOD AS pack_method,
PACK_DIRECTSIZE AS pack_directsize,
DRAW_ADDRESS AS draw_address,
'3' AS create_id, '3' AS create_id,
'MES系统' AS create_name 'MES系统' AS create_name
FROM FROM

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/vo/AcsWorkOrderVo.java

@ -22,11 +22,12 @@ public class AcsWorkOrderVo {
private String w; // 宽度 private String w; // 宽度
private String size_error; // 尺寸允许误差 private String size_error; // 尺寸允许误差
private String single_weight; // 单重允许误差 private String single_weight; // 单重允许误差
// private String drawing_address; // 图纸地址 // private String drawing_address; // 图纸地址
private String standard_size_height1; // 标准尺寸1 private String standard_size_height1; // 标准尺寸1
private String standard_size_height2; // 标准尺寸2 private String standard_size_height2; // 标准尺寸2
private String standard_size_height3; // 标准尺寸3 private String standard_size_height3; // 标准尺寸3
private String standard_size_height4; // 标准尺寸4 private String standard_size_height4; // 标准尺寸4
private String standard_weight; // 标准重量 private String standard_weight; // 标准重量
private String detection_error; // 检测误差值 - 不用传 private String detection_error; // 检测误差值 - 不用传
} }

15
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java

@ -12,9 +12,7 @@ import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException; import org.nl.common.exception.BadRequestException;
import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.ext.acs.service.dto.to.acs.IssueAcsRequest;
import org.nl.wms.ext.acs.service.dto.to.wms.AcsResponse; import org.nl.wms.ext.acs.service.dto.to.wms.AcsResponse;
import org.nl.wms.ext.record.service.ISysInteractRecordService;
import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService; import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService;
import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder; import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder;
import org.nl.wms.sch.point.service.ISchBasePointService; import org.nl.wms.sch.point.service.ISchBasePointService;
@ -25,18 +23,14 @@ import org.nl.wms.sch.task.service.dao.SchBaseTask;
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig; import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
import org.nl.wms.sch.task_manage.enums.TaskDirectionEnum; import org.nl.wms.sch.task_manage.enums.TaskDirectionEnum;
import org.nl.wms.sch.task_manage.enums.WorkOrderStatusEnum; import org.nl.wms.sch.task_manage.enums.WorkOrderStatusEnum;
import org.nl.wms.sch.task_manage.task.AcsUtil;
import org.nl.wms.sch.task_manage.task.core.TaskStatus; import org.nl.wms.sch.task_manage.task.core.TaskStatus;
import org.nl.wms.util.TaskUtils; import org.nl.wms.util.TaskUtils;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
/** /**
* @author ldjun * @author ldjun
@ -56,11 +50,7 @@ public abstract class AbstractTask {
@Autowired @Autowired
private IPdmBdWorkorderService workorderService; private IPdmBdWorkorderService workorderService;
@Autowired @Autowired
private ISysInteractRecordService interactRecordService;
@Autowired
private WmsToAcsService wmsToAcsService; private WmsToAcsService wmsToAcsService;
@Autowired
private RedissonClient redissonClient;
/** /**
* 任务创建 * 任务创建
@ -68,6 +58,11 @@ public abstract class AbstractTask {
*/ */
protected abstract void create() throws BadRequestException; protected abstract void create() throws BadRequestException;
/**
* 任务创建
* 只会创建完整的任务创建失败则抛出异常
* @param task
*/
protected void createCompletion(SchBaseTask task){} protected void createCompletion(SchBaseTask task){}

152
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java

@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.sun.org.apache.regexp.internal.RE;
import org.nl.common.exception.BadRequestException; import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.CodeUtil; import org.nl.common.utils.CodeUtil;
import org.nl.config.MapOf; import org.nl.config.MapOf;
@ -80,6 +81,7 @@ public class FJMKTask extends AbstractTask {
.collect(Collectors.toList()); .collect(Collectors.toList());
String requestParam = task.getRequest_param();// 任务的其他数据 String requestParam = task.getRequest_param();// 任务的其他数据
JSONObject jsonObject = JSONObject.parseObject(requestParam); JSONObject jsonObject = JSONObject.parseObject(requestParam);
String workOrderCode = jsonObject.getString("workorder_code"); // 工单
String startPoint = task.getPoint_code1(); String startPoint = task.getPoint_code1();
// 获取起点 回写载具编码 // 获取起点 回写载具编码
SchBasePoint startPointObj = pointService.getById(startPoint); SchBasePoint startPointObj = pointService.getById(startPoint);
@ -103,51 +105,52 @@ public class FJMKTask extends AbstractTask {
for (ApplyDeviceDto applyDeviceDto : list) { for (ApplyDeviceDto applyDeviceDto : list) {
sum += Integer.parseInt(applyDeviceDto.getQty()); sum += Integer.parseInt(applyDeviceDto.getQty());
} }
// todo: 需要提供两个托盘上的数量 // 2 获取剩余量 surplusNumber
// 2.1 获取库存剩余数量 + 2.2 获取在搬运任务 - 组盘绑定状态是带绑定状态、任务类型是创建完成、下发、执行中 // 2.1 获取库存剩余数量 + 2.2 获取在搬运任务 ( 组盘绑定状态是带绑定状态、任务类型是创建完成、下发、执行中 )
int surplusNumber = fjMapper.getInventoryQuantity(); int surplusNumber = fjMapper.getInventoryQuantity();
int total = sum + surplusNumber; // 现有总数 // 3 现有总数 total
// 3 获取木托盘需要多少块 int total = sum + surplusNumber;
int needFullNumber = 255; // todo: 具体未知如何获取 // 4 获取木托盘需要多少块 needFullNumber
JSONObject response = new JSONObject(); PdmBdWorkorder workorder = workorderService.getByCode(workOrderCode);
String responseParam = task.getResponse_param(); String needFullNumberStr = fjMapper.getNeedFullNumber(workorder.getMaterial_id());
if (ObjectUtil.isNotEmpty(responseParam)) { int needFullNumber = TaskUtils.convertMultiply(needFullNumberStr);
response = JSON.parseObject(responseParam);
}
// 大于两托正常,大于1托给1,小于1托给2 // 大于两托正常,大于1托给1,小于1托给2
// 4 校验是否够码满一托/两托 // 5 校验是否够码满一托/两托
// 大于等于2就可以码 // 大于等于2就可以码
/** 覆膜机木托盘位 */ if (total/needFullNumber >= 2) {
SchBasePoint LaminatePoint = findStartPoint(startRegionStr, jsonObject); /** 覆膜机木托盘位 */
if (ObjectUtil.isEmpty(LaminatePoint)) { SchBasePoint LaminatePoint = findStartPoint(startRegionStr, jsonObject);
task.setRemark("覆膜区不可用!"); if (ObjectUtil.isEmpty(LaminatePoint)) {
noticeService.createNotice(task.getRemark(), TASK_CONFIG_CODE + task.getTask_code(), noticeService.createNotice("覆膜区不可用!", TASK_CONFIG_CODE + task.getPoint_code1(),
NoticeTypeEnum.WARN.getCode()); NoticeTypeEnum.WARN.getCode());
taskService.updateById(task); // 消息通知
// 消息通知 throw new BadRequestException("覆膜区不可用!");
continue; }
// 把这个设备位放到任务中
JSONObject response = new JSONObject();
String responseParam = task.getResponse_param();
if (ObjectUtil.isNotEmpty(responseParam)) {
response = JSON.parseObject(responseParam);
}
response.put("fmj_device", LaminatePoint.getPoint_code());
// 生产木托盘编码
// 设置终点并修改创建成功状态
task.setPoint_code3(LaminatePoint.getParent_point_code());
task.setPoint_code4(startPoint);
task.setResponse_param(response.toJSONString());
// 覆膜机对接位上锁
SchBasePoint basePoint = pointService.getById(LaminatePoint.getParent_point_code());
basePoint.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(basePoint);
pointService.updateById(basePoint);
} }
// 把这个设备位放到任务中
response.put("fmj_device", LaminatePoint.getPoint_code());
// 生产木托盘编码
// 设置终点并修改创建成功状态
task.setPoint_code3(LaminatePoint.getParent_point_code());
task.setPoint_code4(startPoint);
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark(""); task.setRemark("");
taskService.updateById(task); taskService.save(task);
// 包装线上锁
packagePoint.setIng_task_code(task.getTask_code()); packagePoint.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(packagePoint); PointUtils.setUpdateByAcs(packagePoint);
pointService.updateById(packagePoint); pointService.updateById(packagePoint);
// 覆膜机对接位
SchBasePoint basePoint = pointService.getById(LaminatePoint.getParent_point_code());
basePoint.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(basePoint);
pointService.updateById(basePoint);
//下发
//this.renotifyAcs(task);
} }
} }
@ -164,6 +167,7 @@ public class FJMKTask extends AbstractTask {
.collect(Collectors.toList()); .collect(Collectors.toList());
String requestParam = task.getRequest_param();// 任务的其他数据 String requestParam = task.getRequest_param();// 任务的其他数据
JSONObject jsonObject = JSONObject.parseObject(requestParam); JSONObject jsonObject = JSONObject.parseObject(requestParam);
String workOrderCode = jsonObject.getString("workorder_code"); // 工单
String startPoint = task.getPoint_code1(); String startPoint = task.getPoint_code1();
// 获取起点 回写载具编码 // 获取起点 回写载具编码
SchBasePoint startPointObj = pointService.getById(startPoint); SchBasePoint startPointObj = pointService.getById(startPoint);
@ -185,51 +189,53 @@ public class FJMKTask extends AbstractTask {
for (ApplyDeviceDto applyDeviceDto : list) { for (ApplyDeviceDto applyDeviceDto : list) {
sum += Integer.parseInt(applyDeviceDto.getQty()); sum += Integer.parseInt(applyDeviceDto.getQty());
} }
// 2.1 获取库存剩余数量 + 2.2 获取在搬运任务 - 组盘绑定状态是带绑定状态、任务类型是创建完成、下发、执行中 // 2 获取剩余量 surplusNumber
// 2.1 获取库存剩余数量 + 2.2 获取在搬运任务 ( 组盘绑定状态是带绑定状态、任务类型是创建完成、下发、执行中 )
int surplusNumber = fjMapper.getInventoryQuantity(); int surplusNumber = fjMapper.getInventoryQuantity();
int total = sum + surplusNumber; // 现有总数 // 3 现有总数 total
// 3 获取木托盘需要多少块 int total = sum + surplusNumber;
int needFullNumber = 255; // todo: 具体未知如何获取 // 4 获取木托盘需要多少块 needFullNumber
JSONObject response = new JSONObject(); PdmBdWorkorder workorder = workorderService.getByCode(workOrderCode);
String responseParam = task.getResponse_param(); String needFullNumberStr = fjMapper.getNeedFullNumber(workorder.getMaterial_id());
if (ObjectUtil.isNotEmpty(responseParam)) { int needFullNumber = TaskUtils.convertMultiply(needFullNumberStr);
response = JSON.parseObject(responseParam); // 大于两托正常,大于1托给1,小于1托给2
} // 5 校验是否够码满一托/两托
// 大于两托正常,大于1托给个1,小于1托给2 // 大于等于2就可以码
// 4 校验是否够码满一托/两托 if (total/needFullNumber >= 2) {
if ((total % needFullNumber) == 0) { /** 覆膜机木托盘位 */
// 不可以叫空木托盘 SchBasePoint LaminatePoint = findStartPoint(startRegionStr, jsonObject);
// response.put("") if (ObjectUtil.isEmpty(LaminatePoint)) {
} else if ((total % needFullNumber) < 2) { noticeService.createNotice("覆膜区不可用!", TASK_CONFIG_CODE + task.getPoint_code1(),
// 不可以叫空木托盘 NoticeTypeEnum.WARN.getCode());
} // 消息通知
// 大于2就可以码 throw new BadRequestException("覆膜区不可用!");
/** 覆膜机木托盘位 */ }
SchBasePoint LaminatePoint = findStartPoint(startRegionStr, jsonObject); // 把这个设备位放到任务中
if (ObjectUtil.isEmpty(LaminatePoint)) { JSONObject response = new JSONObject();
noticeService.createNotice("覆膜区不可用!", TASK_CONFIG_CODE + task.getPoint_code1(), String responseParam = task.getResponse_param();
NoticeTypeEnum.WARN.getCode()); if (ObjectUtil.isNotEmpty(responseParam)) {
// 消息通知 response = JSON.parseObject(responseParam);
throw new BadRequestException("覆膜区不可用!"); }
response.put("fmj_device", LaminatePoint.getPoint_code());
// 生产木托盘编码
// 设置终点并修改创建成功状态
task.setPoint_code3(LaminatePoint.getParent_point_code());
task.setPoint_code4(startPoint);
task.setResponse_param(response.toJSONString());
// 覆膜机对接位上锁
SchBasePoint basePoint = pointService.getById(LaminatePoint.getParent_point_code());
basePoint.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(basePoint);
pointService.updateById(basePoint);
} }
// 把这个设备位放到任务中
response.put("fmj_device", LaminatePoint.getPoint_code());
// 生产木托盘编码
// 设置终点并修改创建成功状态
task.setPoint_code3(LaminatePoint.getParent_point_code());
task.setPoint_code4(startPoint);
task.setTask_status(TaskStatus.CREATED.getCode()); task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark(""); task.setRemark("");
taskService.save(task); taskService.save(task);
// 包装线上锁
packagePoint.setIng_task_code(task.getTask_code()); packagePoint.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(packagePoint); PointUtils.setUpdateByAcs(packagePoint);
pointService.updateById(packagePoint); pointService.updateById(packagePoint);
// 覆膜机对接位
SchBasePoint basePoint = pointService.getById(LaminatePoint.getParent_point_code());
basePoint.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(basePoint);
pointService.updateById(basePoint);
} }
@Override @Override

8
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/mapper/FJMapper.java

@ -18,4 +18,12 @@ public interface FJMapper {
SchBasePoint findPointForFJQK(List<String> regionCode, @Param("fluentPut") JSONObject fluentPut); SchBasePoint findPointForFJQK(List<String> regionCode, @Param("fluentPut") JSONObject fluentPut);
int getInventoryQuantity(); int getInventoryQuantity();
/**
* 获取满托需要多少块
* eg: 2*7*6
* @param materialId
* @return
*/
String getNeedFullNumber(String materialId);
} }

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/mapper/FJMapper.xml

@ -60,4 +60,11 @@
) AND vg.group_bind_material_status = '1' ) AND vg.group_bind_material_status = '1'
) )
</select> </select>
<select id="getNeedFullNumber" resultType="java.lang.String">
SELECT
pack_method
FROM
`md_base_material`
WHERE material_id = #{materialId}
</select>
</mapper> </mapper>

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java

@ -310,7 +310,6 @@ public class HNMLTask extends AbstractTask {
String vehicleCode = TaskUtils.defaultVehicleCode(param.getString("vehicle_code")); String vehicleCode = TaskUtils.defaultVehicleCode(param.getString("vehicle_code"));
String vehicleType = param.getString("vehicle_type"); String vehicleType = param.getString("vehicle_type");
// 泥料物料对应不出物料标识 // 泥料物料对应不出物料标识
// todo: 暂未处理
String packNo = param.getString("material_code"); // 泥料编码: 吨袋号,泥料前 String packNo = param.getString("material_code"); // 泥料编码: 吨袋号,泥料前
String materialCode = packNo.substring(0, 12); String materialCode = packNo.substring(0, 12);
String mixTimes = packNo.substring(18, packNo.length()); // 碾次 String mixTimes = packNo.substring(18, packNo.length()); // 碾次

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZSLTask.java

@ -308,14 +308,14 @@ public class YZSLTask extends AbstractTask {
} }
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) { public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
String startPoint = taskObj.getPoint_code1(); // 获取起点
String endPoint = taskObj.getPoint_code2(); // 获取终点 String endPoint = taskObj.getPoint_code2(); // 获取终点
SchBasePoint startPointObj = pointService.getById(startPoint);
SchBasePoint endPointObj = pointService.getById(endPoint); SchBasePoint endPointObj = pointService.getById(endPoint);
if (ObjectUtil.isNotEmpty(endPointObj)) { if (ObjectUtil.isNotEmpty(endPointObj)) {
// 终点解锁 // 终点解锁
endPointObj.setIng_task_code(""); endPointObj.setIng_task_code("");
// 终点清空
PointUtils.setUpdateByType(endPointObj, taskFinishedType); PointUtils.setUpdateByType(endPointObj, taskFinishedType);
PointUtils.clearPointAndRetainNum(endPointObj);
pointService.updateById(endPointObj); pointService.updateById(endPointObj);
// 组盘表数据改成已绑定 // 组盘表数据改成已绑定
SchBaseVehiclematerialgroup vehiclematerialgroup = vehiclematerialgroupService.getById(taskObj.getGroup_id()); SchBaseVehiclematerialgroup vehiclematerialgroup = vehiclematerialgroupService.getById(taskObj.getGroup_id());
@ -342,9 +342,6 @@ public class YZSLTask extends AbstractTask {
TaskUtils.setWorkOrderUpdateByType(bdWorkorder, taskFinishedType); TaskUtils.setWorkOrderUpdateByType(bdWorkorder, taskFinishedType);
workorderService.updateById(bdWorkorder); workorderService.updateById(bdWorkorder);
} }
// 起点清空
PointUtils.setUpdateByType(startPointObj, taskFinishedType);
PointUtils.clearPointAndRetainNum(startPointObj);
// 任务完成 // 任务完成
taskObj.setTask_status(TaskStatus.FINISHED.getCode()); taskObj.setTask_status(TaskStatus.FINISHED.getCode());
taskObj.setRemark(GeneralDefinition.TASK_FINISH); taskObj.setRemark(GeneralDefinition.TASK_FINISH);

17
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java

@ -175,4 +175,21 @@ public class TaskUtils {
} }
return String.format("%04d", Integer.parseInt(acsVehicleCode)); return String.format("%04d", Integer.parseInt(acsVehicleCode));
} }
/**
* 将输入的字符串相乘得出值
* eg: 2*7*6
* return: 84
* @param needFullNumberStr
* @return
*/
public static int convertMultiply(String needFullNumberStr) {
String[] parts = needFullNumberStr.split("\\*"); // 使用 "*" 来分割字符串
int result = 1; // 初始化结果为1
for (String part : parts) {
int number = Integer.parseInt(part); // 将字符串部分解析为整数
result *= number; // 将解析的整数与结果相乘
}
return result;
}
} }

29
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/Tes.java

@ -0,0 +1,29 @@
package org.nl.wms.util;
import java.io.IOException;
/**
* @Author: lyd
* @Description:
* @Date: 2023/10/8
*/
public class Tes {
public static void main(String[] args) {
String videoFilePath = "video.mp4";
String audioFilePath = "audio.wav";
String ffmpegCommand = "ffmpeg -i " + videoFilePath + " -vn -acodec pcm_s16le -ar 44100 -ac 2 " + audioFilePath;
try {
Process process = Runtime.getRuntime().exec(ffmpegCommand);
int exitCode = process.waitFor();
if (exitCode == 0) {
System.out.println("音频提取完成");
} else {
System.err.println("音频提取失败");
}
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
}

2
lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml

@ -42,7 +42,7 @@ spring:
freemarker: freemarker:
check-template-location: false check-template-location: false
profiles: profiles:
active: dev active: prod
jackson: jackson:
time-zone: GMT+8 time-zone: GMT+8
data: data:

Loading…
Cancel
Save