From 0e9840310f81296b19434ded4223938554b9123f Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Wed, 18 Oct 2023 10:19:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=8B=E6=8C=81=EF=BC=9A=E5=8E=8B?= =?UTF-8?q?=E6=9C=BA=E6=90=AC=E8=BF=90=E3=80=81=E8=B4=A7=E6=9E=B6=E7=9B=98?= =?UTF-8?q?=E7=82=B9=E3=80=81=E5=87=BA=E7=AA=91=E5=8F=96=E5=8F=8C=E5=B1=82?= =?UTF-8?q?=E8=BE=93=E9=80=81=E7=BA=BF=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nl/config/lucene/LogMessageConstant.java | 2 +- .../nl/wms/pda/controller/PdaController.java | 29 +++++++ .../org/nl/wms/pda/service/PdaService.java | 8 ++ .../pda/service/dao/dto/CommonQueryDto.java | 13 +++ .../service/dao/dto/ManualResidueInDto.java | 4 + .../wms/pda/service/dao/dto/PressMoveDto.java | 25 ++++++ .../wms/pda/service/dao/dto/ShelfSaveDto.java | 17 ++++ .../wms/pda/service/dao/mapper/PdaMapper.java | 25 +++++- .../wms/pda/service/dao/mapper/PdaMapper.xml | 31 +++++++ .../pda/service/dao/vo/MaterialInfoVo.java | 17 ++++ .../wms/pda/service/impl/PdaServiceImpl.java | 85 ++++++++++++++++++- .../nl/wms/sch/task_manage/AbstractTask.java | 2 +- .../task_manage/task/tasks/yao/GZYQLTask.java | 9 +- .../main/java/org/nl/wms/util/TaskUtils.java | 14 +++ .../src/main/resources/config/application.yml | 2 +- 15 files changed, 269 insertions(+), 14 deletions(-) create mode 100644 lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/CommonQueryDto.java create mode 100644 lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/PressMoveDto.java create mode 100644 lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/ShelfSaveDto.java create mode 100644 lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/MaterialInfoVo.java diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java index 68ca638..e1a03e7 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java @@ -42,6 +42,6 @@ public class LogMessageConstant { public final static String BACKGROUND_YELLOW = "\u001B[43m"; /** 索引路径 */ - public final static String INDEX_DIR = "D:\\lucene\\index"; + public final static String INDEX_DIR = "E:\\lucene\\index"; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java index fe87d98..1607ed9 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java @@ -232,4 +232,33 @@ public class PdaController { public ResponseEntity bindingVehicle(@Validated @RequestBody VehicleBindingDto vehicleBindingDto){ return new ResponseEntity<>(pdaService.bindingVehicle(vehicleBindingDto), HttpStatus.OK); } + + @PostMapping("/pressSendMaterial/pressTask") + @Log("压机送料-动作") + @ApiOperation("压机送料-动作") + public ResponseEntitypressTask(@Validated @RequestBody PressMoveDto pressMoveDto){ + return new ResponseEntity<>(pdaService.pressTask(pressMoveDto), HttpStatus.OK); + } + + @PostMapping("/pressSendMaterial/pressPointList") + @Log("压机送料-下拉框") + @ApiOperation("压机送料-下拉框") + public ResponseEntitypressPointList(){ + return new ResponseEntity<>(pdaService.pressPointList(), HttpStatus.OK); + } + + @PostMapping("/shelf/materialQuery") + @Log("货架盘点-物料查询") + @ApiOperation("货架盘点-物料查询") + public ResponseEntitymaterialQuery(@Validated @RequestBody CommonQueryDto commonQueryDto){ + return new ResponseEntity<>(pdaService.materialQuery(commonQueryDto), HttpStatus.OK); + } + + @PostMapping("/shelf/updateData") + @Log("货架盘点-物料查询") + @ApiOperation("货架盘点-物料查询") + public ResponseEntityupdateData(@Validated @RequestBody ShelfSaveDto shelfSaveDto){ + return new ResponseEntity<>(pdaService.updateData(shelfSaveDto), HttpStatus.OK); + } + } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java index 11b8bfe..495e782 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java @@ -57,4 +57,12 @@ public interface PdaService { List packingTaskShow(); PdaResponseVo bindingVehicle(VehicleBindingDto vehicleBindingDto); + + PdaResponseVo pressTask(PressMoveDto pressMoveDto); + + List materialQuery(CommonQueryDto commonQueryDto); + + PdaResponseVo updateData(ShelfSaveDto shelfSaveDto); + + List pressPointList(); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/CommonQueryDto.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/CommonQueryDto.java new file mode 100644 index 0000000..1c6c2d5 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/CommonQueryDto.java @@ -0,0 +1,13 @@ +package org.nl.wms.pda.service.dao.dto; + +import lombok.Data; + +/** + * @Author: lyd + * @Description: 通用实体 + * @Date: 2023/10/16 + */ +@Data +public class CommonQueryDto { + private String material_code; +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/ManualResidueInDto.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/ManualResidueInDto.java index 399c6cd..440c929 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/ManualResidueInDto.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/ManualResidueInDto.java @@ -11,4 +11,8 @@ import lombok.Data; public class ManualResidueInDto { private String vehicle_code; private String qty; + /** + * 剩余数量 + */ + private String surplus_quantity; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/PressMoveDto.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/PressMoveDto.java new file mode 100644 index 0000000..50670af --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/PressMoveDto.java @@ -0,0 +1,25 @@ +package org.nl.wms.pda.service.dao.dto; + +import lombok.Data; + +/** + * @Author: lyd + * @Description: 压机搬运dto + * @Date: 2023/10/16 + */ +@Data +public class PressMoveDto { + /** + * 设备编码:对接位 + */ + private String device_code; + /** + * 载具编码 + */ + private String vehicle_code; + /** + * 数量 + */ + private String qty; + +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/ShelfSaveDto.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/ShelfSaveDto.java new file mode 100644 index 0000000..6c479ee --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/dto/ShelfSaveDto.java @@ -0,0 +1,17 @@ +package org.nl.wms.pda.service.dao.dto; + +import lombok.Data; + +/** + * @Author: lyd + * @Description: 货架组盘信息dto + * @Date: 2023/10/16 + */ +@Data +public class ShelfSaveDto { + private String point_code; + private String point_status; + private String vehicle_code; + private String material_qty; + private String material_id; +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.java index 35ecf3b..e88bb0d 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.java @@ -1,9 +1,7 @@ package org.nl.wms.pda.service.dao.mapper; -import org.nl.wms.pda.service.dao.vo.DropdownListVo; -import org.nl.wms.pda.service.dao.vo.ManualWorkOrderVo; -import org.nl.wms.pda.service.dao.vo.StandTimeShowVo; -import org.nl.wms.pda.service.dao.vo.TaskShowVo; +import org.nl.wms.pda.service.dao.dto.CommonQueryDto; +import org.nl.wms.pda.service.dao.vo.*; import org.nl.wms.sch.point.service.dao.SchBasePoint; import java.util.List; @@ -54,4 +52,23 @@ public interface PdaMapper { * @return */ List getRunningTaskByEnd(String point_code, String task_config); + + /** + * 获取所有点位 + * @return + */ + List getAllPoint(); + + /** + * 查询物料 + * @param commonQueryDto + * @return + */ + List materialQuery(CommonQueryDto commonQueryDto); + + /** + * 压机对接为 + * @return + */ + List getAllPressPoint(); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml index ae2e97f..1e3c45d 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml @@ -118,4 +118,35 @@ LEFT JOIN sch_base_point p4 ON p4.point_code = t.point_code4 WHERE task_status IN ('1','2','3','4') AND t.point_code2 = #{point_code} AND t.config_code = #{task_config} + + + diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/MaterialInfoVo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/MaterialInfoVo.java new file mode 100644 index 0000000..4681e20 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/MaterialInfoVo.java @@ -0,0 +1,17 @@ +package org.nl.wms.pda.service.dao.vo; + +import lombok.Data; + +/** + * @Author: lyd + * @Description: 物料信息VO + * @Date: 2023/10/16 + */ +@Data +public class MaterialInfoVo { + private String material_id; + private String material_code; + private String material_name; + private String material_spec; + private String material_model; +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java index e631ef0..57d40da 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java @@ -29,10 +29,13 @@ import org.nl.wms.sch.task.service.ISchBaseTaskService; import org.nl.wms.sch.task_manage.GeneralDefinition; import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum; import org.nl.wms.sch.task_manage.enums.GroupStatusEnum; +import org.nl.wms.sch.task_manage.enums.PointStatusEnum; import org.nl.wms.sch.task_manage.enums.WorkOrderStatusEnum; +import org.nl.wms.util.PointUtils; import org.nl.wms.util.TaskUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; @@ -64,7 +67,7 @@ public class PdaServiceImpl implements PdaService { @Override public List getDeviceInfo() { // 暂定压机区域 - return pdaMapper.getDeviceInfo(); + return pdaMapper.getAllPoint(); } @Override @@ -225,6 +228,7 @@ public class PdaServiceImpl implements PdaService { SchBasePoint rgcdw01 = pointService.getById("RGCDW01"); param.put("vehicle_code", rgcdw01.getVehicle_code()); param.put("vehicle_type", GeneralDefinition.STEEL_TRAY); + param.put("user_id", "1"); taskService.apply(param); return PdaResponseVo.pdaResultOk("空盘入库请求成功"); } @@ -241,6 +245,7 @@ public class PdaServiceImpl implements PdaService { JSONObject param = new JSONObject(); param.put("device_code", "RGMDW01"); param.put("config_code", "FJQKTask"); + param.put("user_id", "1"); taskService.apply(param); return PdaResponseVo.pdaResultOk("呼叫木托盘请求成功"); } @@ -257,6 +262,7 @@ public class PdaServiceImpl implements PdaService { JSONObject param = new JSONObject(); param.put("device_code", "RGCDW01"); param.put("config_code", "FJQLTask"); + param.put("user_id", "1"); taskService.apply(param); return PdaResponseVo.pdaResultOk("呼叫物料请求成功"); } @@ -276,6 +282,7 @@ public class PdaServiceImpl implements PdaService { param.put("qty", manualResidueInDto.getQty()); param.put("vehicle_code", manualResidueInDto.getVehicle_code()); param.put("vehicle_qty", "1"); + param.put("user_id", "1"); taskService.apply(param); return PdaResponseVo.pdaResultOk("剩料入库请求成功"); } @@ -295,6 +302,7 @@ public class PdaServiceImpl implements PdaService { param.put("qty", manualResidueInDto.getQty()); param.put("vehicle_code", manualResidueInDto.getVehicle_code()); param.put("vehicle_qty", "1"); + param.put("user_id", "1"); taskService.apply(param); return PdaResponseVo.pdaResultOk("包装入库请求成功"); } @@ -325,4 +333,79 @@ public class PdaServiceImpl implements PdaService { vehicleBindingService.save(vehicleBinding); return PdaResponseVo.pdaResultOk("载具绑定成功!"); } + + @Override + public PdaResponseVo pressTask(PressMoveDto pressMoveDto) { + JSONObject param = (JSONObject) JSONObject.toJSON(pressMoveDto); + param.put("user_id", "1"); + param.put("config_code", "YZMLTask"); + taskService.apply(param); + return PdaResponseVo.pdaResultOk("压机入库请求成功"); + } + + @Override + public List materialQuery(CommonQueryDto commonQueryDto) { + return pdaMapper.materialQuery(commonQueryDto); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public PdaResponseVo updateData(ShelfSaveDto shelfSaveDto) { + // 货位号填充HCHJ+*** + String pointCode = "HCHJ" + String.format("%03d", Integer.parseInt(shelfSaveDto.getPoint_code())); + // 获取点位 + shelfSaveDto.setPoint_code(pointCode); + SchBasePoint basePoint = pointService.getById(shelfSaveDto.getPoint_code()); + basePoint.setPoint_status(shelfSaveDto.getPoint_status()); + PointUtils.setUpdateByPC(basePoint); + if (shelfSaveDto.getPoint_status().equals(PointStatusEnum.EMPTY_POINT.getCode())) { + // 空位 + PointUtils.clearPoint(basePoint); + return PdaResponseVo.pdaResultOk("货位情况成功"); + } else if (shelfSaveDto.getPoint_status().equals(PointStatusEnum.FULL_POINT.getCode())){ + // 设置物料 + toSaveGroupMaterial(shelfSaveDto);// 保存组盘 + basePoint.setVehicle_code(shelfSaveDto.getVehicle_code()); + basePoint.setVehicle_type(GeneralDefinition.STEEL_TRAY); + basePoint.setVehicle_qty(1); + } + pointService.updateById(basePoint); + return PdaResponseVo.pdaResultOk("组盘成功"); + } + + @Override + public List pressPointList() { + return pdaMapper.getAllPressPoint(); + } + + /** + * 保存组盘信息 + * @param shelfSaveDto + */ + private void toSaveGroupMaterial(ShelfSaveDto shelfSaveDto) { + MdBaseMaterial material = materialService.getById(shelfSaveDto.getMaterial_id()); + SchBasePoint basePoint = pointService.getById(shelfSaveDto.getPoint_code()); + if (ObjectUtil.isEmpty(material)) { + throw new BadRequestException("物料信息不存在"); + } + SchBaseVehiclematerialgroup group = new SchBaseVehiclematerialgroup(); + group.setGroup_id(IdUtil.getSnowflake(1,1).nextIdStr()); + group.setMaterial_qty(Integer.valueOf(shelfSaveDto.getMaterial_qty())); + group.setMaterial_id(shelfSaveDto.getMaterial_id()); + group.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue()); + group.setVehicle_code(shelfSaveDto.getVehicle_code()); + group.setVehicle_type(GeneralDefinition.STEEL_TRAY); + group.setPoint_code(basePoint.getPoint_code()); // 对接位 + group.setPoint_name(basePoint.getPoint_name()); + group.setSource_vehicle_code(basePoint.getPoint_code()); + group.setMove_way(basePoint.getPoint_code()); + group.setPcsn(DateUtil.format(DateUtil.date(), "yyyyMMdd")); + group.setGroup_status(GroupStatusEnum.IN_STORAGE.getType()); // 暂时不维护。 + group.setIs_delete(false); + group.setIs_full(true); + group.setCreate_id(SecurityUtils.getCurrentUserId()); + group.setCreate_name(SecurityUtils.getCurrentNickName()); + group.setCreate_time(DateUtil.now()); + vehiclematerialgroupService.save(group); + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java index ec75663..54749be 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java @@ -297,7 +297,7 @@ public abstract class AbstractTask { // 设置组盘 - 需要的话由子类自行实现 task.setGroup_id(this.setGroupPlate(param)); task.setRequest_param(JSONObject.toJSONString(param)); - TaskUtils.setCreateByAcs(task); // 设置创建人信息 + TaskUtils.setCreateByAcsOrPda(task, param); // 设置创建人信息 // 3、判断是否直接找点下发 if (taskConfig.getIs_immediate_create()) { this.createCompletion(task); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java index a8dc5de..02b22a8 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/GZYQLTask.java @@ -132,11 +132,6 @@ public class GZYQLTask extends AbstractTask { */ private SchBasePoint findStartPoint(List startRegionStr, JSONObject jsonObject) { // 无需工单 - // 判断是使用desc还是asc - int countUp = yzMapper.countConveyorLine(startRegionStr.get(0), GeneralDefinition.UPPER_CONVEYOR_LINE, - PointStatusEnum.EMPTY_VEHICLE.getCode()); - int countLower = yzMapper.countConveyorLine(startRegionStr.get(0), GeneralDefinition.LOWER_CONVEYOR_LINE, - PointStatusEnum.EMPTY_VEHICLE.getCode()); // 默认认为缓存线有东西 LambdaQueryWrapper lam = new LambdaQueryWrapper<>(); lam.in(SchBasePoint::getRegion_code, startRegionStr) @@ -146,7 +141,8 @@ public class GZYQLTask extends AbstractTask { .eq(SchBasePoint::getIng_task_code, "")) .eq(SchBasePoint::getPoint_status, PointStatusEnum.EMPTY_VEHICLE.getCode()) .eq(SchBasePoint::getIs_used, true) - .orderBy(true, countUp > countLower, SchBasePoint::getPoint_code);; + .ne(SchBasePoint::getVehicle_qty, 5) + .orderByDesc(SchBasePoint::getVehicle_qty); // 每次都将载具数量+1,每次拿最大的 List schBasePoints = pointService.list(lam); return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null; } @@ -205,6 +201,7 @@ public class GZYQLTask extends AbstractTask { if (ObjectUtil.isNotEmpty(startPointObj)) { startPointObj.setIng_task_code(""); PointUtils.setUpdateByType(startPointObj, taskFinishedType); + PointUtils.clearPointAndRetainNum(startPointObj); pointService.updateById(startPointObj); } // 任务完成 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java index 7e9de35..67678d0 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/TaskUtils.java @@ -2,6 +2,7 @@ package org.nl.wms.util; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.extern.slf4j.Slf4j; import org.nl.common.utils.SecurityUtils; @@ -29,6 +30,19 @@ public class TaskUtils { taskObj.setCreate_name(GeneralDefinition.ACS_NAME); taskObj.setCreate_time(DateUtil.now()); } + public static void setCreateByPda(SchBaseTask taskObj) { + taskObj.setCreate_id(SecurityUtils.getCurrentUserId()); + taskObj.setCreate_name(SecurityUtils.getCurrentNickName()); + taskObj.setCreate_time(DateUtil.now()); + } + public static void setCreateByAcsOrPda(SchBaseTask taskObj, JSONObject param) { + // 如果是人工创建,会带个用户过来 + if (ObjectUtil.isNotEmpty(param.getString("user_id"))) { + setCreateByPda(taskObj); + } else { + setCreateByAcs(taskObj); + } + } public static void setUpdateByAcs(SchBaseTask taskObj) { taskObj.setUpdate_id(GeneralDefinition.ACS_ID); diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml index 7e2aa7b..a37104c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml +++ b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml @@ -42,7 +42,7 @@ spring: freemarker: check-template-location: false profiles: - active: dev + active: prod jackson: time-zone: GMT+8 data: