add: 新增任务管理
This commit is contained in:
@@ -45,9 +45,19 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
@Override
|
||||
public IPage<SchBasePoint> queryAll(Map whereJson, PageQuery page){
|
||||
String blurry = ObjectUtil.isNotEmpty(whereJson.get("blurry")) ? whereJson.get("blurry").toString() : null;
|
||||
String workshop_code = ObjectUtil.isNotEmpty(whereJson.get("workshop_code")) ? whereJson.get("workshop_code").toString() : null;
|
||||
String region_code = ObjectUtil.isNotEmpty(whereJson.get("region_code")) ? whereJson.get("region_code").toString() : null;
|
||||
String point_type = ObjectUtil.isNotEmpty(whereJson.get("point_type")) ? whereJson.get("point_type").toString() : null;
|
||||
String point_status = ObjectUtil.isNotEmpty(whereJson.get("point_status")) ? whereJson.get("point_status").toString() : null;
|
||||
Boolean is_used = ObjectUtil.isNotEmpty(whereJson.get("is_used")) ? Boolean.valueOf(whereJson.get("is_used").toString()) : null;
|
||||
LambdaQueryWrapper<SchBasePoint> lam = new LambdaQueryWrapper<>();
|
||||
lam.like(ObjectUtil.isNotEmpty(blurry), SchBasePoint::getPoint_code, blurry)
|
||||
.or(ObjectUtil.isNotEmpty(blurry), lam1 -> lam1.like(SchBasePoint::getPoint_name, blurry));
|
||||
.or(ObjectUtil.isNotEmpty(blurry), lam1 -> lam1.like(SchBasePoint::getPoint_name, blurry))
|
||||
.eq(ObjectUtil.isNotEmpty(workshop_code), SchBasePoint::getWorkshop_code, workshop_code)
|
||||
.eq(ObjectUtil.isNotEmpty(region_code), SchBasePoint::getRegion_code, region_code)
|
||||
.eq(ObjectUtil.isNotEmpty(point_type), SchBasePoint::getPoint_type, point_type)
|
||||
.eq(ObjectUtil.isNotEmpty(point_status), SchBasePoint::getPoint_status, point_status)
|
||||
.eq(ObjectUtil.isNotEmpty(is_used), SchBasePoint::getIs_used, is_used);
|
||||
IPage<SchBasePoint> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
pointMapper.selectPage(pages, lam);
|
||||
// 可以存放的载具类型
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package org.nl.wms.sch.task.controller;
|
||||
|
||||
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.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "任务管理管理")
|
||||
@RequestMapping("/api/schBaseTask")
|
||||
public class SchBaseTaskController {
|
||||
|
||||
@Autowired
|
||||
private ISchBaseTaskService schBaseTaskService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询任务管理")
|
||||
@ApiOperation("查询任务管理")
|
||||
//@SaCheckPermission("@el.check('schBaseTask:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(schBaseTaskService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增任务管理")
|
||||
@ApiOperation("新增任务管理")
|
||||
//@SaCheckPermission("@el.check('schBaseTask:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBaseTask entity){
|
||||
schBaseTaskService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改任务管理")
|
||||
@ApiOperation("修改任务管理")
|
||||
//@SaCheckPermission("@el.check('schBaseTask:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBaseTask entity){
|
||||
schBaseTaskService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除任务管理")
|
||||
@ApiOperation("删除任务管理")
|
||||
//@SaCheckPermission("@el.check('schBaseTask:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
schBaseTaskService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package org.nl.wms.sch.task.controller;
|
||||
|
||||
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.sch.task.service.ISchBaseTaskconfigService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "任务配置管理")
|
||||
@RequestMapping("/api/schBaseTaskconfig")
|
||||
public class SchBaseTaskconfigController {
|
||||
|
||||
@Autowired
|
||||
private ISchBaseTaskconfigService schBaseTaskconfigService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询任务配置")
|
||||
@ApiOperation("查询任务配置")
|
||||
//@SaCheckPermission("@el.check('schBaseTaskconfig:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(schBaseTaskconfigService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增任务配置")
|
||||
@ApiOperation("新增任务配置")
|
||||
//@SaCheckPermission("@el.check('schBaseTaskconfig:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SchBaseTaskconfig entity){
|
||||
schBaseTaskconfigService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改任务配置")
|
||||
@ApiOperation("修改任务配置")
|
||||
//@SaCheckPermission("@el.check('schBaseTaskconfig:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SchBaseTaskconfig entity){
|
||||
schBaseTaskconfigService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除任务配置")
|
||||
@ApiOperation("删除任务配置")
|
||||
//@SaCheckPermission("@el.check('schBaseTaskconfig:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
schBaseTaskconfigService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.wms.sch.task.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
public interface ISchBaseTaskService extends IService<SchBaseTask> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<SchBaseTask>
|
||||
*/
|
||||
IPage<SchBaseTask> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param entity /
|
||||
*/
|
||||
void create(SchBaseTask entity);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param entity /
|
||||
*/
|
||||
void update(SchBaseTask entity);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.wms.sch.task.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
public interface ISchBaseTaskconfigService extends IService<SchBaseTaskconfig> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<SchBaseTaskconfig>
|
||||
*/
|
||||
IPage<SchBaseTaskconfig> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param entity /
|
||||
*/
|
||||
void create(SchBaseTaskconfig entity);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param entity /
|
||||
*/
|
||||
void update(SchBaseTaskconfig entity);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package org.nl.wms.sch.task.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sch_base_task")
|
||||
public class SchBaseTask implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "task_code", type = IdType.NONE)
|
||||
@ApiModelProperty(value = "任务编码")
|
||||
private String task_code;
|
||||
|
||||
@ApiModelProperty(value = "任务分类")
|
||||
private String task_class_id;
|
||||
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private String task_status;
|
||||
|
||||
@ApiModelProperty(value = "配置编码")
|
||||
private String config_code;
|
||||
|
||||
@ApiModelProperty(value = "点位1")
|
||||
private String point_code1;
|
||||
|
||||
@ApiModelProperty(value = "点位2")
|
||||
private String point_code2;
|
||||
|
||||
@ApiModelProperty(value = "点位3")
|
||||
private String point_code3;
|
||||
|
||||
@ApiModelProperty(value = "点位4")
|
||||
private String point_code4;
|
||||
|
||||
@ApiModelProperty(value = "载具类型")
|
||||
private String vehicle_type;
|
||||
|
||||
@ApiModelProperty(value = "载具数量")
|
||||
private BigDecimal vehicle_qty;
|
||||
|
||||
@ApiModelProperty(value = "载具编码")
|
||||
private String vehicle_code;
|
||||
|
||||
@ApiModelProperty(value = "优先级")
|
||||
private String priority;
|
||||
|
||||
@ApiModelProperty(value = "处理类")
|
||||
private String handle_class;
|
||||
|
||||
@ApiModelProperty(value = "处理状态")
|
||||
private String handle_status;
|
||||
|
||||
@ApiModelProperty(value = "车号")
|
||||
private String car_no;
|
||||
|
||||
@ApiModelProperty(value = "是否自动下发")
|
||||
private Boolean is_auto_issue;
|
||||
|
||||
@ApiModelProperty(value = "任务组标识")
|
||||
private Long task_group_id;
|
||||
|
||||
@ApiModelProperty(value = "任务组顺序号")
|
||||
private BigDecimal task_group_seq;
|
||||
|
||||
@ApiModelProperty(value = "任务完成类型")
|
||||
private String finished_type;
|
||||
|
||||
@ApiModelProperty(value = "生成方式")
|
||||
private String create_mode;
|
||||
|
||||
@ApiModelProperty(value = "链路标识")
|
||||
private String acs_trace_id;
|
||||
|
||||
@ApiModelProperty(value = "生成任务的请求参数")
|
||||
private String request_param;
|
||||
|
||||
@ApiModelProperty(value = "下发任务的请求参数")
|
||||
private String response_param;
|
||||
|
||||
@ApiModelProperty(value = "车间编码")
|
||||
private String workshop_code;
|
||||
|
||||
@ApiModelProperty(value = "额外组盘信息")
|
||||
private String ext_group_data;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private Boolean is_delete;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String create_id;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String create_name;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String create_time;
|
||||
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private String update_id;
|
||||
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private String update_name;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private String update_time;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package org.nl.wms.sch.task.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sch_base_taskconfig")
|
||||
public class SchBaseTaskconfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "config_code", type = IdType.NONE)
|
||||
@ApiModelProperty(value = "配置编码")
|
||||
private String config_code;
|
||||
|
||||
@ApiModelProperty(value = "配置名称")
|
||||
private String config_name;
|
||||
|
||||
@ApiModelProperty(value = "任务取放类型")
|
||||
private String task_qf_type;
|
||||
|
||||
@ApiModelProperty(value = "acs任务类型")
|
||||
private String acs_task_type;
|
||||
|
||||
@ApiModelProperty(value = "任务名字")
|
||||
private String task_name;
|
||||
|
||||
@ApiModelProperty(value = "任务类型")
|
||||
private String task_type;
|
||||
|
||||
@ApiModelProperty(value = "优先级")
|
||||
private String priority;
|
||||
|
||||
@ApiModelProperty(value = "允许最大任务生成数")
|
||||
private BigDecimal task_create_num;
|
||||
|
||||
@ApiModelProperty(value = "允许最大任务下发数")
|
||||
private BigDecimal task_issue_num;
|
||||
|
||||
@ApiModelProperty(value = "是否自动下发")
|
||||
private Boolean is_auto_issue;
|
||||
|
||||
@ApiModelProperty(value = "起点区域配置")
|
||||
private String start_region_str;
|
||||
|
||||
@ApiModelProperty(value = "终点区域配置")
|
||||
private String next_region_str;
|
||||
|
||||
@ApiModelProperty(value = "起点点位前缀")
|
||||
private String start_point_pre;
|
||||
|
||||
@ApiModelProperty(value = "终点点位前缀")
|
||||
private String next_region_pre;
|
||||
|
||||
@ApiModelProperty(value = "是否校验工单")
|
||||
private Boolean is_check_workorder;
|
||||
|
||||
@ApiModelProperty(value = "是否判断起点锁定")
|
||||
private Boolean is_check_start_lock;
|
||||
|
||||
@ApiModelProperty(value = "是否立即创建")
|
||||
private Boolean is_immediate_create;
|
||||
|
||||
@ApiModelProperty(value = "是否判断终点锁定")
|
||||
private Boolean is_check_next_lock;
|
||||
|
||||
@ApiModelProperty(value = "是否起点自动")
|
||||
private Boolean is_start_auto;
|
||||
|
||||
@ApiModelProperty(value = "是否终点自动")
|
||||
private Boolean is_next_auto;
|
||||
|
||||
@ApiModelProperty(value = "是否锁定起点")
|
||||
private Boolean is_lock_start;
|
||||
|
||||
@ApiModelProperty(value = "是否锁定终点")
|
||||
private Boolean is_lock_next;
|
||||
|
||||
@ApiModelProperty(value = "生成任务的请求参数")
|
||||
private String request_param;
|
||||
|
||||
@ApiModelProperty(value = "下发任务的请求参数")
|
||||
private String response_param;
|
||||
|
||||
@ApiModelProperty(value = "是否按组控制下发顺序")
|
||||
private Boolean is_group_congrol_issue_seq;
|
||||
|
||||
@ApiModelProperty(value = "任务未完成通知时间数")
|
||||
private BigDecimal unfinish_notify_time;
|
||||
|
||||
@ApiModelProperty(value = "sql配置")
|
||||
private String sql_param;
|
||||
|
||||
@ApiModelProperty(value = "车间编码")
|
||||
private String workshop_code;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
private Boolean is_used;
|
||||
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private Boolean is_delete;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String create_id;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String create_name;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String create_time;
|
||||
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private String update_id;
|
||||
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private String update_name;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private String update_time;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.wms.sch.task.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
public interface SchBaseTaskMapper extends BaseMapper<SchBaseTask> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.sch.task.service.dao.mapper.SchBaseTaskMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.wms.sch.task.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
public interface SchBaseTaskconfigMapper extends BaseMapper<SchBaseTaskconfig> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.sch.task.service.dao.mapper.SchBaseTaskconfigMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,113 @@
|
||||
package org.nl.wms.sch.task.service.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Data
|
||||
public class SchBaseTaskDto implements Serializable {
|
||||
|
||||
/** 任务编码 */
|
||||
private String task_code;
|
||||
|
||||
/** 任务分类 */
|
||||
private String task_class_id;
|
||||
|
||||
/** 任务状态 */
|
||||
private String task_status;
|
||||
|
||||
/** 配置编码 */
|
||||
private String config_code;
|
||||
|
||||
/** 点位1 */
|
||||
private String point_code1;
|
||||
|
||||
/** 点位2 */
|
||||
private String point_code2;
|
||||
|
||||
/** 点位3 */
|
||||
private String point_code3;
|
||||
|
||||
/** 点位4 */
|
||||
private String point_code4;
|
||||
|
||||
/** 载具类型 */
|
||||
private String vehicle_type;
|
||||
|
||||
/** 载具数量 */
|
||||
private BigDecimal vehicle_qty;
|
||||
|
||||
/** 载具编码 */
|
||||
private String vehicle_code;
|
||||
|
||||
/** 优先级 */
|
||||
private String priority;
|
||||
|
||||
/** 处理类 */
|
||||
private String handle_class;
|
||||
|
||||
/** 处理状态 */
|
||||
private String handle_status;
|
||||
|
||||
/** 车号 */
|
||||
private String car_no;
|
||||
|
||||
/** 是否自动下发 */
|
||||
private Boolean is_auto_issue;
|
||||
|
||||
/** 任务组标识 */
|
||||
private Long task_group_id;
|
||||
|
||||
/** 任务组顺序号 */
|
||||
private BigDecimal task_group_seq;
|
||||
|
||||
/** 任务完成类型 */
|
||||
private String finished_type;
|
||||
|
||||
/** 生成方式 */
|
||||
private String create_mode;
|
||||
|
||||
/** 链路标识 */
|
||||
private String acs_trace_id;
|
||||
|
||||
/** 生成任务的请求参数 */
|
||||
private String request_param;
|
||||
|
||||
/** 下发任务的请求参数 */
|
||||
private String response_param;
|
||||
|
||||
/** 车间编码 */
|
||||
private String workshop_code;
|
||||
|
||||
/** 额外组盘信息 */
|
||||
private String ext_group_data;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 是否删除 */
|
||||
private Boolean is_delete;
|
||||
|
||||
/** 创建人 */
|
||||
private String create_id;
|
||||
|
||||
/** 创建人 */
|
||||
private String create_name;
|
||||
|
||||
/** 创建时间 */
|
||||
private String create_time;
|
||||
|
||||
/** 修改人 */
|
||||
private String update_id;
|
||||
|
||||
/** 修改人 */
|
||||
private String update_name;
|
||||
|
||||
/** 修改时间 */
|
||||
private String update_time;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.wms.sch.task.service.dto;
|
||||
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
public class SchBaseTaskQuery extends BaseQuery<SchBaseTask> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package org.nl.wms.sch.task.service.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Data
|
||||
public class SchBaseTaskconfigDto implements Serializable {
|
||||
|
||||
/** 配置编码 */
|
||||
private String config_code;
|
||||
|
||||
/** 配置名称 */
|
||||
private String config_name;
|
||||
|
||||
/** 任务取放类型 */
|
||||
private String task_qf_type;
|
||||
|
||||
/** acs任务类型 */
|
||||
private String acs_task_type;
|
||||
|
||||
/** 任务名字 */
|
||||
private String task_name;
|
||||
|
||||
/** 任务类型 */
|
||||
private String task_type;
|
||||
|
||||
/** 优先级 */
|
||||
private String priority;
|
||||
|
||||
/** 允许最大任务生成数 */
|
||||
private BigDecimal task_create_num;
|
||||
|
||||
/** 允许最大任务下发数 */
|
||||
private BigDecimal task_issue_num;
|
||||
|
||||
/** 是否自动下发 */
|
||||
private Boolean is_auto_issue;
|
||||
|
||||
/** 起点区域配置 */
|
||||
private String start_region_str;
|
||||
|
||||
/** 终点区域配置 */
|
||||
private String next_region_str;
|
||||
|
||||
/** 起点点位前缀 */
|
||||
private String start_point_pre;
|
||||
|
||||
/** 终点点位前缀 */
|
||||
private String next_region_pre;
|
||||
|
||||
/** 是否校验工单 */
|
||||
private Boolean is_check_workorder;
|
||||
|
||||
/** 是否判断起点锁定 */
|
||||
private Boolean is_check_start_lock;
|
||||
|
||||
/** 是否立即创建 */
|
||||
private Boolean is_immediate_create;
|
||||
|
||||
/** 是否判断终点锁定 */
|
||||
private Boolean is_check_next_lock;
|
||||
|
||||
/** 是否起点自动 */
|
||||
private Boolean is_start_auto;
|
||||
|
||||
/** 是否终点自动 */
|
||||
private Boolean is_next_auto;
|
||||
|
||||
/** 是否锁定起点 */
|
||||
private Boolean is_lock_start;
|
||||
|
||||
/** 是否锁定终点 */
|
||||
private Boolean is_lock_next;
|
||||
|
||||
/** 生成任务的请求参数 */
|
||||
private String request_param;
|
||||
|
||||
/** 下发任务的请求参数 */
|
||||
private String response_param;
|
||||
|
||||
/** 是否按组控制下发顺序 */
|
||||
private Boolean is_group_congrol_issue_seq;
|
||||
|
||||
/** 任务未完成通知时间数 */
|
||||
private BigDecimal unfinish_notify_time;
|
||||
|
||||
/** sql配置 */
|
||||
private String sql_param;
|
||||
|
||||
/** 车间编码 */
|
||||
private String workshop_code;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 是否启用 */
|
||||
private Boolean is_used;
|
||||
|
||||
/** 是否删除 */
|
||||
private Boolean is_delete;
|
||||
|
||||
/** 创建人 */
|
||||
private String create_id;
|
||||
|
||||
/** 创建人 */
|
||||
private String create_name;
|
||||
|
||||
/** 创建时间 */
|
||||
private String create_time;
|
||||
|
||||
/** 修改人 */
|
||||
private String update_id;
|
||||
|
||||
/** 修改人 */
|
||||
private String update_name;
|
||||
|
||||
/** 修改时间 */
|
||||
private String update_time;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.wms.sch.task.service.dto;
|
||||
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
public class SchBaseTaskconfigQuery extends BaseQuery<SchBaseTaskconfig> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package org.nl.wms.sch.task.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.dao.mapper.SchBaseTaskMapper;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务实现
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBaseTask> implements ISchBaseTaskService {
|
||||
|
||||
@Autowired
|
||||
private SchBaseTaskMapper schBaseTaskMapper;
|
||||
|
||||
@Override
|
||||
public IPage<SchBaseTask> queryAll(Map whereJson, PageQuery page){
|
||||
LambdaQueryWrapper<SchBaseTask> lam = new LambdaQueryWrapper<>();
|
||||
IPage<SchBaseTask> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
schBaseTaskMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(SchBaseTask entity) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
entity.setTask_code(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
entity.setCreate_id(currentUserId);
|
||||
entity.setCreate_name(nickName);
|
||||
entity.setCreate_time(now);
|
||||
entity.setUpdate_id(currentUserId);
|
||||
entity.setUpdate_name(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
schBaseTaskMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(SchBaseTask entity) {
|
||||
SchBaseTask dto = schBaseTaskMapper.selectById(entity.getTask_code());
|
||||
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_id(currentUserId);
|
||||
entity.setUpdate_name(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
|
||||
schBaseTaskMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
schBaseTaskMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package org.nl.wms.sch.task.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
|
||||
import org.nl.wms.sch.task.service.dao.mapper.SchBaseTaskconfigMapper;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务实现
|
||||
* @author lyd
|
||||
* @date 2023-05-15
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SchBaseTaskconfigServiceImpl extends ServiceImpl<SchBaseTaskconfigMapper, SchBaseTaskconfig> implements ISchBaseTaskconfigService {
|
||||
|
||||
@Autowired
|
||||
private SchBaseTaskconfigMapper schBaseTaskconfigMapper;
|
||||
|
||||
@Override
|
||||
public IPage<SchBaseTaskconfig> queryAll(Map whereJson, PageQuery page){
|
||||
LambdaQueryWrapper<SchBaseTaskconfig> lam = new LambdaQueryWrapper<>();
|
||||
IPage<SchBaseTaskconfig> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
schBaseTaskconfigMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(SchBaseTaskconfig entity) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
entity.setConfig_code(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
entity.setCreate_id(currentUserId);
|
||||
entity.setCreate_name(nickName);
|
||||
entity.setCreate_time(now);
|
||||
entity.setUpdate_id(currentUserId);
|
||||
entity.setUpdate_name(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
schBaseTaskconfigMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(SchBaseTaskconfig entity) {
|
||||
SchBaseTaskconfig dto = schBaseTaskconfigMapper.selectById(entity.getConfig_code());
|
||||
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_id(currentUserId);
|
||||
entity.setUpdate_name(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
|
||||
schBaseTaskconfigMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
schBaseTaskconfigMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user