Browse Source

add: 分拣工单根据库存选择物料功能

master
李永德 1 year ago
parent
commit
6a3ed777fa
  1. 0
      lms/nladmin-system/logPath_IS_UNDEFINED/XgAgvDeviceDriver/DEVICECODE_IS_UNDEFINED/2023-09-09.0.log
  2. 0
      lms/nladmin-system/logPath_IS_UNDEFINED/XgAgvDeviceDriver/DEVICECODE_IS_UNDEFINED/2023-09-13.0.log
  3. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LogMessageConstant.java
  4. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/IMdBaseMaterialService.java
  5. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java
  6. 30
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml
  7. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dto/MdBaseMaterialQuery.java
  8. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/impl/MdBaseMaterialServiceImpl.java
  9. 13
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/controller/PdmBdWorkorderController.java
  10. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java
  11. 281
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQZRKTask.java
  12. 2
      lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml
  13. 10
      lms/nladmin-ui/src/views/wms/pdm/workerorder/pdmBdWorkorder.js
  14. 27
      lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue

0
lms/nladmin-system/logPath_IS_UNDEFINED/XgAgvDeviceDriver/DEVICECODE_IS_UNDEFINED/2023-09-09.0.log

0
lms/nladmin-system/logPath_IS_UNDEFINED/XgAgvDeviceDriver/DEVICECODE_IS_UNDEFINED/2023-09-13.0.log

2
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 = "E:\\lucene\\index";
public final static String INDEX_DIR = "D:\\lucene\\index";
}

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/IMdBaseMaterialService.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.nl.common.domain.query.PageQuery;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
import org.nl.wms.database.material.service.dto.MdBaseMaterialQuery;
import java.util.Map;
import java.util.Set;
@ -43,4 +44,6 @@ public interface IMdBaseMaterialService extends IService<MdBaseMaterial> {
void deleteAll(Set<String> ids);
MdBaseMaterial findByCode(String materialCode);
IPage<MdBaseMaterial> queryByInventory(MdBaseMaterialQuery whereJson, PageQuery page);
}

9
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java

@ -1,7 +1,9 @@
package org.nl.wms.database.material.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
import org.nl.wms.database.material.service.dto.MdBaseMaterialQuery;
/**
* @author lyd
@ -9,4 +11,11 @@ import org.nl.wms.database.material.service.dao.MdBaseMaterial;
**/
public interface MdBaseMaterialMapper extends BaseMapper<MdBaseMaterial> {
/**
* 根据库存获取物料信息
* @param pages
* @param whereJson
* @return
*/
IPage<MdBaseMaterial> queryByInventory(IPage<MdBaseMaterial> pages, MdBaseMaterialQuery query);
}

30
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml

@ -2,4 +2,34 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.nl.wms.database.material.service.dao.mapper.MdBaseMaterialMapper">
<select id="queryByInventory" resultType="org.nl.wms.database.material.service.dao.MdBaseMaterial">
WITH CTE AS (
SELECT
mm.*,
vg.group_bind_material_status,
p.region_code,
p.point_status,
ROW_NUMBER() OVER (PARTITION BY mm.material_id ORDER BY mm.material_id) AS row_num
FROM
`md_base_material` mm
LEFT JOIN sch_base_vehiclematerialgroup vg ON vg.material_id = mm.material_id
LEFT JOIN sch_base_point p ON p.vehicle_code = vg.vehicle_code AND p.vehicle_type = vg.vehicle_type
WHERE vg.group_bind_material_status = '2' AND p.region_code = 'GTPHC' AND p.point_status = '3'
<if test="query.blurry != null">
AND (mm.material_code LIKE '%${query.blurry}%' OR mm.material_name LIKE '%${query.blurry}%')
</if>
)
SELECT
CTE.material_id,
CTE.material_code,
CTE.material_name,
CTE.material_spec,
CTE.half_material_code,
CTE.raw_material_code,
CTE.standing_time,
CTE.update_name,
CTE.update_time
FROM CTE
WHERE row_num = 1
</select>
</mapper>

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dto/MdBaseMaterialQuery.java

@ -1,12 +1,14 @@
package org.nl.wms.database.material.service.dto;
import org.nl.common.domain.query.BaseQuery;
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
import lombok.Data;
import java.io.Serializable;
/**
* @author lyd
* @date 2023-05-05
**/
public class MdBaseMaterialQuery extends BaseQuery<MdBaseMaterial> {
@Data
public class MdBaseMaterialQuery implements Serializable {
private String blurry;
}

8
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/impl/MdBaseMaterialServiceImpl.java

@ -16,6 +16,7 @@ import org.nl.common.utils.SecurityUtils;
import org.nl.wms.database.material.service.IMdBaseMaterialService;
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
import org.nl.wms.database.material.service.dao.mapper.MdBaseMaterialMapper;
import org.nl.wms.database.material.service.dto.MdBaseMaterialQuery;
import org.nl.wms.ext.mes.service.dao.mapper.MesRequestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -104,4 +105,11 @@ public class MdBaseMaterialServiceImpl extends ServiceImpl<MdBaseMaterialMapper,
return mdBaseMaterials.size() > 0 ? mdBaseMaterials.get(0) : null;
}
@Override
public IPage<MdBaseMaterial> queryByInventory(MdBaseMaterialQuery whereJson, PageQuery page) {
IPage<MdBaseMaterial> pages = new Page<>(page.getPage() + 1, page.getSize());
pages = mdBaseMaterialMapper.queryByInventory(pages, whereJson);
return pages;
}
}

13
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/controller/PdmBdWorkorderController.java

@ -1,12 +1,13 @@
package org.nl.wms.pdm.workorder.controller;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.base.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.logging.annotation.Log;
import org.nl.wms.database.material.service.IMdBaseMaterialService;
import org.nl.wms.database.material.service.dto.MdBaseMaterialQuery;
import org.nl.wms.ext.mes.service.WmsToMesService;
import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService;
import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder;
@ -33,6 +34,8 @@ public class PdmBdWorkorderController {
private IPdmBdWorkorderService pdmBdWorkorderService;
@Autowired
private WmsToMesService wmsToMesService;
@Autowired
private IMdBaseMaterialService mdBaseMaterialService;
@GetMapping
@Log("查询工单管理")
@ -42,6 +45,14 @@ public class PdmBdWorkorderController {
return new ResponseEntity<>(TableDataInfo.build(pdmBdWorkorderService.queryAll(query,page)),HttpStatus.OK);
}
@GetMapping("/materials")
@Log("查询物料基础信息")
@ApiOperation("查询物料基础信息")
//@SaCheckPermission("@el.check('mdBaseMaterial:list')")
public ResponseEntity<Object> queryMaterials(MdBaseMaterialQuery whereJson, PageQuery page){
return new ResponseEntity<>(TableDataInfo.build(mdBaseMaterialService.queryByInventory(whereJson,page)),HttpStatus.OK);
}
@PostMapping
@Log("新增工单管理")
@ApiOperation("新增工单管理")

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

@ -197,8 +197,11 @@ public class FJMKTask extends AbstractTask {
// 4 获取木托盘需要多少块 needFullNumber
PdmBdWorkorder workorder = workorderService.getByCode(workOrderCode);
String needFullNumberStr = fjMapper.getNeedFullNumber(workorder.getMaterial_id());
if (ObjectUtil.isEmpty(needFullNumberStr)) {
// todo: 同步物料数据
}
int needFullNumber = TaskUtils.convertMultiply(needFullNumberStr);
// 大于两托正常,大于1托给1,小于1托给2
// todo: 大于两托正常,大于1托给1,小于1托给2
// 5 校验是否够码满一托/两托
// 大于等于2就可以码
if (total/needFullNumber >= 2) {
@ -217,7 +220,6 @@ public class FJMKTask extends AbstractTask {
response = JSON.parseObject(responseParam);
}
response.put("fmj_device", LaminatePoint.getPoint_code());
// 生产木托盘编码
// 设置终点并修改创建成功状态
task.setPoint_code3(LaminatePoint.getParent_point_code());
task.setPoint_code4(startPoint);

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

@ -0,0 +1,281 @@
package org.nl.wms.sch.task_manage.task.tasks.fj;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.nl.common.exception.BadRequestException;
import org.nl.system.service.notice.ISysNoticeService;
import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService;
import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.task.service.ISchBaseTaskService;
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
import org.nl.wms.sch.task.service.dao.SchBaseTask;
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
import org.nl.wms.sch.task_manage.AbstractTask;
import org.nl.wms.sch.task_manage.GeneralDefinition;
import org.nl.wms.sch.task_manage.enums.*;
import org.nl.wms.sch.task_manage.task.TaskType;
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
import org.nl.wms.util.PointUtils;
import org.nl.wms.util.TaskUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author: lyd
* @Description: rgv - 分拣强制入库任务 - 2点
* @Date: 2023/6/21
*/
@Component
@TaskType("FJQZRKTask")
public class FJQZRKTask extends AbstractTask {
private static String TASK_CONFIG_CODE = "FJQZRKTask";
@Autowired
private ISchBasePointService pointService;
@Autowired
private ISchBaseTaskService taskService;
@Autowired
private ISchBaseTaskconfigService taskConfigService;
@Autowired
private ISysNoticeService noticeService;
@Autowired
private IPdmBdWorkorderService workorderService;
@Autowired
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService;
@Override
protected void create() throws BadRequestException {
// 最后一坨不需要呼叫空盘
// 获取任务
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
// 配置信息
SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>()
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));
for (SchBaseTask task : tasks) {
TaskUtils.setUpdateByAcs(task);
List<String> nextRegionStr = Arrays.stream(taskConfig.getNext_region_str().split(",")).collect(Collectors.toList());
// 找终点
SchBasePoint point = findNextPoint(nextRegionStr);
if (ObjectUtil.isEmpty(point)) {
task.setRemark("未找到所需点位!");
taskService.updateById(task);
// 消息通知
noticeService.createNotice(task.getRemark(), TASK_CONFIG_CODE + task.getTask_code(),
NoticeTypeEnum.WARN.getCode());
continue;
}
// 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code());
task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark("");
taskService.updateById(task);
point.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(point);
pointService.updateById(point);
//下发
//this.renotifyAcs(task);
}
}
@Override
@Transactional
protected void createCompletion(SchBaseTask task) {
// 配置信息
SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>()
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));
TaskUtils.setUpdateByAcs(task);
List<String> nextRegionStr = Arrays.stream(taskConfig.getNext_region_str().split(",")).collect(Collectors.toList());
// 找终点
SchBasePoint point = findNextPoint(nextRegionStr);
if (ObjectUtil.isEmpty(point)) {
// 消息通知
noticeService.createNotice("找不到可用的包装位!", TASK_CONFIG_CODE + task.getPoint_code1(),
NoticeTypeEnum.WARN.getCode());
throw new BadRequestException("找不到可用的包装位!");
}
// 设置终点并修改创建成功状态
task.setPoint_code2(point.getPoint_code());
task.setTask_status(TaskStatus.CREATED.getCode());
task.setRemark("");
taskService.save(task);
point.setIng_task_code(task.getTask_code());
PointUtils.setUpdateByAcs(point);
pointService.updateById(point);
}
/**
* 到对应的区域中获取放置点
* @param nextRegionStr
* @return
*/
private SchBasePoint findNextPoint(List<String> nextRegionStr) {
LambdaQueryWrapper<SchBasePoint> lam = new LambdaQueryWrapper<>();
lam.in(SchBasePoint::getRegion_code, nextRegionStr)
.and(la -> la.isNull(SchBasePoint::getIng_task_code) // 当前执行的任务为空或者NULL,有数据表示锁住
.or()
.eq(SchBasePoint::getIng_task_code, ""))
.eq(SchBasePoint::getPoint_type, GeneralDefinition.DOCKING_POINT)
.eq(SchBasePoint::getIs_used, true);
List<SchBasePoint> schBasePoints = pointService.list(lam);
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
}
@Override
public String setGroupPlate(JSONObject param) {
// 强制入库组盘
// 组盘,返回组盘标识,设置待绑定,搬运结束就设置已绑定
String deviceCode = param.getString("device_code");
JSONObject stackParameters = param.getJSONObject("palletize");
String vehicleCode = param.getString("vehicle_code");
// 砖块数量
Integer qty = param.getInteger("qty");
SchBasePoint basePoint = pointService.getById(deviceCode);
PdmBdWorkorder workorderObject = workorderService.getDeviceProductionTask(basePoint.getParent_point_code());
String vehicleType = workorderObject.getVehicle_type();
// 找到相同组盘信息就直接返回id,避免任务取消组盘信息还存在,重复插入
SchBaseVehiclematerialgroup groupEntity = new SchBaseVehiclematerialgroup();
groupEntity.setGroup_id(IdUtil.getSnowflake(1, 1).nextIdStr());
SchBaseVehiclematerialgroup groupObject = vehiclematerialgroupService.getGroupInfo(vehicleCode, vehicleType,
GroupBindMaterialStatusEnum.BOUND.getValue(), workorderObject.getMaterial_id());
if (groupObject != null) {
groupEntity = groupObject;
}
// 要把数据存到组盘表
groupEntity.setMaterial_id(ObjectUtil.isNotEmpty(workorderObject)
? workorderObject.getMaterial_id()
: "");
groupEntity.setStanding_time(ObjectUtil.isNotEmpty(workorderObject)
? workorderObject.getStanding_time()
: 0);
groupEntity.setWorkorder_code(ObjectUtil.isNotEmpty(workorderObject)
? workorderObject.getWorkorder_code()
: "");
groupEntity.setCreate_id(GeneralDefinition.ACS_ID);
groupEntity.setCreate_name(GeneralDefinition.ACS_NAME);
groupEntity.setCreate_time(DateUtil.now());
groupEntity.setVehicle_code(vehicleCode);
groupEntity.setVehicle_type(vehicleType);
groupEntity.setMaterial_qty(qty);
groupEntity.setExt_data(JSONObject.toJSONString(stackParameters)); // 垛型参数
groupEntity.setPoint_code(basePoint.getPoint_code()); // 对接位
groupEntity.setPoint_name(basePoint.getPoint_name());
groupEntity.setSource_vehicle_code(basePoint.getPoint_code());
groupEntity.setMove_way(basePoint.getPoint_code());
groupEntity.setPcsn(DateUtil.format(DateUtil.date(), "yyyyMMdd")); // todo: ???
groupEntity.setInstorage_time(DateUtil.now());
groupEntity.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue()); // 绑定
groupEntity.setGroup_status(GroupStatusEnum.IN_STORAGE.getType()); // 暂时不维护。
groupEntity.setIs_delete(false);
vehiclematerialgroupService.saveOrUpdate(groupEntity);
// 将所有当前位置的砖块设置组盘标识
// baseBrickInfoService.setGroupByCurrentAllBrick(deviceCode, groupEntity.getGroup_id());
// 返回组盘id记录任务中
return groupEntity.getGroup_id();
}
@Override
protected void updateStatus(String task_code, TaskStatus status) {
// 校验任务
SchBaseTask taskObj = taskService.getByCode(task_code);
if (taskObj.getTask_status().equals(TaskStatus.FINISHED.getCode())) {
throw new BadRequestException("该任务已完成!");
}
if (taskObj.getTask_status().equals(TaskStatus.CANCELED.getCode())) {
throw new BadRequestException("该任务已取消!");
}
// 根据传来的类型去对任务进行操作
if (status.equals(TaskStatus.EXECUTING)) { // 执行中
taskObj.setTask_status(TaskStatus.EXECUTING.getCode());
taskObj.setRemark("执行中");
TaskUtils.setUpdateByAcs(taskObj);
taskService.updateById(taskObj);
}
if (status.equals(TaskStatus.FINISHED)) { // 完成
this.finishTask(taskObj, TaskFinishedTypeEnum.AUTO_ACS);
}
if (status.equals(TaskStatus.CANCELED)) { // 取消
this.cancelTask(taskObj, TaskFinishedTypeEnum.AUTO_ACS);
}
}
@Override
public void forceFinish(String task_code) {
SchBaseTask taskObj = taskService.getByCode(task_code);
if (ObjectUtil.isEmpty(taskObj)) {
throw new BadRequestException("该任务不存在");
}
this.finishTask(taskObj, TaskFinishedTypeEnum.MANUAL_PC);
}
@Override
public void cancel(String task_code) {
SchBaseTask taskObj = taskService.getByCode(task_code);
if (ObjectUtil.isEmpty(taskObj)) {
throw new BadRequestException("该任务不存在");
}
this.cancelTask(taskObj, TaskFinishedTypeEnum.MANUAL_PC);
}
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
// 获取参数
String endPoint = taskObj.getPoint_code2(); // 获取终点
String startPoint = taskObj.getPoint_code1(); // 获取终点
SchBasePoint startPointObj = pointService.getById(startPoint);
SchBasePoint endPointObj = pointService.getById(endPoint);
// 设置载具类型、点位状态、释放点位
if (ObjectUtil.isNotEmpty(endPoint)) {
endPointObj.setIng_task_code("");
PointUtils.setUpdateByType(endPointObj, taskFinishedType);
pointService.updateById(endPointObj);
// 组盘设置已经解绑
SchBaseVehiclematerialgroup vehicleMaterialGroupObj =
vehiclematerialgroupService.getById(taskObj.getGroup_id());
vehicleMaterialGroupObj.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
vehicleMaterialGroupObj.setPoint_code(endPointObj.getPoint_code()); // 当前位置
vehicleMaterialGroupObj.setPoint_name(endPointObj.getPoint_name());
vehicleMaterialGroupObj.setMove_way(vehicleMaterialGroupObj.getMove_way() + " -> " + endPointObj.getPoint_code());
TaskUtils.setGroupUpdateByType(vehicleMaterialGroupObj, taskFinishedType);
vehiclematerialgroupService.updateById(vehicleMaterialGroupObj);
}
PointUtils.setUpdateByType(startPointObj, taskFinishedType);
PointUtils.clearPoint(startPointObj);
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
taskObj.setRemark(GeneralDefinition.TASK_FINISH);
taskObj.setFinished_type(taskFinishedType.getCode());
TaskUtils.setUpdateByType(taskObj, taskFinishedType);
taskService.updateById(taskObj);
}
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
// 获取参数
String endPoint = taskObj.getPoint_code2(); // 获取终点
SchBasePoint endPointObj = pointService.getById(endPoint);
// 释放点位
if (ObjectUtil.isNotEmpty(endPoint)) {
endPointObj.setIng_task_code("");
PointUtils.setUpdateByType(endPointObj, taskFinishedType);
pointService.updateById(endPointObj);
}
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
taskObj.setFinished_type(taskFinishedType.getCode());
TaskUtils.setUpdateByType(taskObj, taskFinishedType);
taskService.updateById(taskObj);
}
}

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

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

10
lms/nladmin-ui/src/views/wms/pdm/workerorder/pdmBdWorkorder.js

@ -41,4 +41,12 @@ export function orderSynchronize(data) {
})
}
export default { add, edit, del, submits, orderSynchronize }
export function queryMaterials(data) {
return request({
url: 'api/pdmBdWorkorder/materials',
method: 'get',
data
})
}
export default { add, edit, del, submits, orderSynchronize, queryMaterials }

27
lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue

@ -13,7 +13,6 @@
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="物料名称">
<el-input
@ -24,12 +23,8 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="是否启用">
<el-switch
v-model="query.is_used"
:active-value="true"
:inactive-value="false"
/>
<el-form-item :label="queryInfo">
<el-button icon="el-icon-sort" circle @click="queryMaterials"></el-button>
</el-form-item>
<rrOperation />
</el-form>
@ -74,7 +69,7 @@
</template>
<script>
import crudWorkOrder from '@/views/wms/pdm/workerorder/pdmBdWorkorder'
import CRUD, { header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
@ -113,7 +108,9 @@ export default {
return {
dialogVisible: false,
tableRadio: null,
tableData: []
tableData: [],
queryInfo: '物料顺序',
queryFlag: false
}
},
watch: {
@ -129,6 +126,18 @@ export default {
},
open() {
},
queryMaterials() {
this.queryFlag = !this.queryFlag
if (this.queryFlag) {
this.queryInfo = '库存顺序'
this.crud.url = 'api/pdmBdWorkorder/materials'
this.crud.toQuery()
} else {
this.queryInfo = '物料顺序'
this.crud.url = 'api/mdBaseMaterial'
this.crud.toQuery()
}
},
handleSelectionChange(val, row) {
if (val.length > 1) {

Loading…
Cancel
Save