Merge branch 'master' of http://121.40.234.130:8899/root/nladmin
This commit is contained in:
@@ -36,8 +36,4 @@ public interface LogRepository extends JpaRepository<Log,Long>, JpaSpecification
|
||||
@Modifying
|
||||
@Query(value = "delete from sys_log where log_type = ?1", nativeQuery = true)
|
||||
void deleteByLogType(String logType);
|
||||
|
||||
@Modifying
|
||||
@Query(value = "delete from sys_log where log_type = ?1 and DATEDIFF(NOW(),create_time) >= 15", nativeQuery = true)
|
||||
void delAfterDay(String logType);
|
||||
}
|
||||
|
||||
@@ -79,14 +79,4 @@ public interface LogService {
|
||||
* 删除所有INFO日志
|
||||
*/
|
||||
void delAllByInfo();
|
||||
|
||||
/**
|
||||
* 删除15天之前的错误日志
|
||||
*/
|
||||
void delAfterDay15ByError();
|
||||
|
||||
/**
|
||||
* 删除15天之前的INFO日志
|
||||
*/
|
||||
void delAfterDay15ByInfo();
|
||||
}
|
||||
|
||||
@@ -155,16 +155,4 @@ public class LogServiceImpl implements LogService {
|
||||
public void delAllByInfo() {
|
||||
logRepository.deleteByLogType("INFO");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delAfterDay15ByError() {
|
||||
logRepository.delAfterDay("ERROR");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delAfterDay15ByInfo() {
|
||||
logRepository.delAfterDay("INFO");
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -2,7 +2,8 @@ package org.nl.wms.autotask;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.logging.service.LogService;
|
||||
import org.nl.modules.system.service.ParamService;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -12,14 +13,14 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class CleanLog {
|
||||
private final LogService logService;
|
||||
private final ParamService paramService;
|
||||
|
||||
public void run(){
|
||||
// 删除所有异常日志
|
||||
logService.delAfterDay15ByError();
|
||||
// 删除所有操作日志
|
||||
logService.delAfterDay15ByInfo();
|
||||
log.info("删除所有异常/操作日志 执行成功");
|
||||
//delete from sys_log where DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL 30 day)) limit 10;
|
||||
WQLObject logTab = WQLObject.getWQLObject("sys_log");
|
||||
int days = Integer.parseInt(paramService.findByCode("log_day").getValue());
|
||||
logTab.delete("DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL " + days + " day))");
|
||||
log.info("自动清理日志执行成功...!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -121,4 +121,12 @@ public class ClassstandardController {
|
||||
return new ResponseEntity<>(ClassstandardService.getType(type_id,level), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getClassName")
|
||||
@Log("获取分类名称下拉框")
|
||||
@ApiOperation("获取分类名称下拉框")
|
||||
public ResponseEntity<Object> getClassName() {
|
||||
return new ResponseEntity<>(ClassstandardService.getClassName(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -124,4 +124,9 @@ public interface ClassstandardService {
|
||||
*/
|
||||
String getAllChildIdStr(String class_idStr);
|
||||
|
||||
/**
|
||||
* 获取分类名称下拉框
|
||||
* @return
|
||||
*/
|
||||
JSONArray getClassName();
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ public class ClassstandardDto implements Serializable {
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long class_id;
|
||||
|
||||
private String base_data_type;
|
||||
|
||||
private String path_code;
|
||||
|
||||
private String class_code;
|
||||
|
||||
@@ -44,10 +44,10 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||
String base_data_type = (String) whereJson.get("base_data_type");
|
||||
String class_code = (String) whereJson.get("class_code");
|
||||
String where = "";
|
||||
if (!StrUtil.isEmpty(base_data_type)) {
|
||||
where = "AND base_data_type = '" + base_data_type + "'";
|
||||
if (!StrUtil.isEmpty(class_code)) {
|
||||
where = "AND class_code = '" + class_code + "'";
|
||||
}
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "(parent_class_id is null OR parent_class_id = '0') AND is_delete = '0'" + where + "", "update_time desc");
|
||||
final JSONObject json = rb.pageResult();
|
||||
@@ -100,7 +100,7 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
||||
public void create(ClassstandardDto dto) {
|
||||
String class_code = dto.getClass_code();
|
||||
ClassstandardDto classstandardDto = this.findByCode(class_code);
|
||||
if (classstandardDto != null && classstandardDto.getIs_delete().equals("0") && dto.getBase_data_type().equals(classstandardDto.getBase_data_type())) {
|
||||
if (classstandardDto != null && classstandardDto.getIs_delete().equals("0") ) {
|
||||
throw new BadRequestException("存在相同的基础类别编号");
|
||||
}
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
@@ -120,10 +120,6 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
||||
dto.setPath_code(dto.getClass_code());
|
||||
dto.setLong_class_code(dto.getClass_code());
|
||||
|
||||
if (StrUtil.equals(dto.getBase_data_type(), "03")) {
|
||||
dto.setIs_modify("0");
|
||||
}
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
wo.insert(json);
|
||||
@@ -144,7 +140,7 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
||||
|
||||
String class_code = dto.getClass_code();
|
||||
ClassstandardDto classstandardDto = this.findByCode(class_code);
|
||||
if (classstandardDto != null && !dto.getClass_id().equals(classstandardDto.getClass_id()) && classstandardDto.getIs_delete().equals("0") && dto.getBase_data_type().equals(classstandardDto.getBase_data_type())) {
|
||||
if (classstandardDto != null && !dto.getClass_id().equals(classstandardDto.getClass_id()) && classstandardDto.getIs_delete().equals("0") ) {
|
||||
throw new BadRequestException("存在相同的供应商编号");
|
||||
}
|
||||
|
||||
@@ -240,15 +236,10 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
||||
|
||||
@Override
|
||||
public JSONArray getSuperior(JSONObject jo, JSONArray ja) {
|
||||
String base_data_type=jo.getString("base_data_type");
|
||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||
if (StrUtil.isEmpty(jo.getString("parent_class_id")) || jo.getString("parent_class_id").equals("0")) {
|
||||
JSONArray null_pids = new JSONArray();
|
||||
if (jo.getString("base_data_type").equals(base_data_type)) {
|
||||
null_pids = wo.query("(parent_class_id = '0' OR parent_class_id is null) and is_delete = '0' and base_data_type = '"+base_data_type+"'").getResultJSONArray(0);
|
||||
} else {
|
||||
null_pids = wo.query("(parent_class_id = '0' OR parent_class_id is null) and is_delete = '0'").getResultJSONArray(0);
|
||||
}
|
||||
null_pids = wo.query("(parent_class_id = '0' OR parent_class_id is null) and is_delete = '0'").getResultJSONArray(0);
|
||||
|
||||
for (int m = 0; m < null_pids.size(); m++) {
|
||||
JSONObject null_pid = null_pids.getJSONObject(m);
|
||||
@@ -536,6 +527,21 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
||||
return str;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getClassName() {
|
||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||
// 获取的是父节点
|
||||
JSONArray result = wo.query("(parent_class_id is null OR parent_class_id = '0') AND is_delete = '0'").getResultJSONArray(0);
|
||||
JSONArray res = new JSONArray();
|
||||
for (int i=0; i<result.size(); i++) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("label", result.getJSONObject(i).get("class_name"));
|
||||
jsonObject.put("value", result.getJSONObject(i).get("class_code"));
|
||||
res.add(jsonObject);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public void updateSubCnt(Long Id) {
|
||||
if (Id != null && Id != 0) {
|
||||
|
||||
Binary file not shown.
@@ -28,6 +28,7 @@ public class BakingController {
|
||||
@Log("烘箱出入")
|
||||
@ApiOperation("烘箱出入")
|
||||
public ResponseEntity<Object> queryRawFoil(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(bakingService.ovenInAndOut(whereJson), HttpStatus.OK);
|
||||
bakingService.ovenInAndOut(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ public interface BakingService {
|
||||
* @param whereJson /
|
||||
* @return JSONObject
|
||||
*/
|
||||
JSONObject ovenInAndOut(JSONObject whereJson);
|
||||
void ovenInAndOut(JSONObject whereJson);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,27 +1,210 @@
|
||||
package org.nl.wms.pda.mps.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.SecurityUtils;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.pda.mps.service.BakingService;
|
||||
import org.nl.wms.pda.mps.service.RawFoilService;
|
||||
import org.nl.wms.sch.manage.RegionTypeEnum;
|
||||
import org.nl.wms.sch.tasks.InHotTask;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class BakingServiceImpl implements BakingService {
|
||||
|
||||
|
||||
/*
|
||||
* 业务流程:
|
||||
* 入烤箱:
|
||||
* 1.首先需要找到无任务的暂存位 并创建两条任务
|
||||
* 2。下发冷却区 --> 烘烤区的任务 等待反馈完成
|
||||
* 3.插入烤箱区出入主表和明细表
|
||||
* 出烤箱:
|
||||
* 1.烤箱时间到后 查找无任务的暂存位 并创建2条任务
|
||||
* 2.1下发烤箱区 --> 暂存位 的任务
|
||||
* 2.2插入烤箱区出入明细表
|
||||
* 3.查找对应冷却区空位
|
||||
* 4.在下发暂存位 --> 冷却区的任务
|
||||
* 问题:
|
||||
* 1.第二条任务出现异常后 如何再次触发
|
||||
*/
|
||||
@Override
|
||||
public JSONObject ovenInAndOut(JSONObject whereJson) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", "1");
|
||||
result.put("desc", "查询成功");
|
||||
return result;
|
||||
@Transactional
|
||||
public void ovenInAndOut(JSONObject whereJson) {
|
||||
|
||||
String option = whereJson.getString("option"); // 1-入箱 2-出箱
|
||||
|
||||
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point"); // 点位表
|
||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); // 任务表
|
||||
WQLObject coolIvtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区点位库存表
|
||||
WQLObject hosIvtTab = WQLObject.getWQLObject("ST_IVT_HotPointIvt"); // 烤箱区点位库存表
|
||||
|
||||
if (StrUtil.equals(option, "1")) {
|
||||
// 入箱
|
||||
String container_name = whereJson.getString("container_name"); // 母卷号
|
||||
String temperature = whereJson.getString("temperature"); // 温度
|
||||
String hours = whereJson.getString("hours"); // 时间
|
||||
String point_code1 = whereJson.getString("point_code"); // 点位
|
||||
|
||||
if (ObjectUtil.isEmpty(container_name)) throw new BadRequestException("母卷号不能为空");
|
||||
if (ObjectUtil.isEmpty(temperature)) throw new BadRequestException("温度不能为空");
|
||||
if (ObjectUtil.isEmpty(hours)) throw new BadRequestException("时间不能为空");
|
||||
if (ObjectUtil.isEmpty(point_code1)) throw new BadRequestException("点位不能为空");
|
||||
|
||||
// 1.根据冷却区此母卷的点位找到对应的暂存区、找到空位
|
||||
JSONObject jsonCoolIvt = coolIvtTab.query("container_name ='" + container_name + "' and is is_used = '1' and full_point_status = '02'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("母卷不存在");
|
||||
|
||||
String product_area = jsonCoolIvt.getString("product_area"); // 生产区域
|
||||
String point_location = jsonCoolIvt.getString("point_location"); // 位置
|
||||
String reging_id = "";
|
||||
|
||||
switch (product_area) {
|
||||
case "A":
|
||||
reging_id = RegionTypeEnum.A_HKZC.getId();
|
||||
break;
|
||||
case "B":
|
||||
reging_id = RegionTypeEnum.B_HKZC.getId();
|
||||
break;
|
||||
case "C":
|
||||
reging_id = RegionTypeEnum.C_HKZC.getId();
|
||||
break;
|
||||
case "D":
|
||||
reging_id = RegionTypeEnum.D_HKZC.getId();
|
||||
break;
|
||||
}
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "1");
|
||||
map.put("reging_id", reging_id);
|
||||
map.put("point_location", point_location);
|
||||
|
||||
JSONArray pointArr = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(pointArr)) {
|
||||
if (StrUtil.equals(point_location, "0")) map.put("point_location","1");
|
||||
if (StrUtil.equals(point_location, "1")) map.put("point_location","0");
|
||||
pointArr = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有空暂存位");
|
||||
}
|
||||
|
||||
// 2.判断暂存位是否有任务:找到无任务的暂存位 、查询烘箱对应的空位
|
||||
String point_code2 = "";
|
||||
for (int i = 0; i < pointArr.size(); i++) {
|
||||
JSONObject jsonPoint = pointArr.getJSONObject(i);
|
||||
String point_code = jsonPoint.getString("point_code");
|
||||
|
||||
JSONObject json_point_code1 = taskTab.query("point_code1 = '" + point_code + "' and task_status != '99' and is_delete = '0'").uniqueResult(0);
|
||||
JSONObject json_point_code2 = taskTab.query("point_code2 = '" + point_code + "' and task_status != '99' and is_delete = '0'").uniqueResult(0);
|
||||
JSONObject json_point_code3 = taskTab.query("point_code3 = '" + point_code + "' and task_status != '99' and is_delete = '0'").uniqueResult(0);
|
||||
JSONObject json_point_code4 = taskTab.query("point_code4 = '" + point_code + "' and task_status != '99' and is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(json_point_code1) && ObjectUtil.isEmpty(json_point_code2) && ObjectUtil.isEmpty(json_point_code3) && ObjectUtil.isEmpty(json_point_code4)) {
|
||||
point_code2 = point_code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isEmpty(point_code2)) throw new BadRequestException("没有空暂存位");
|
||||
|
||||
// 查询烘箱对应的空位
|
||||
JSONObject jsonHotIvt = hosIvtTab.query("product_area = '" + product_area + "' and temperature = '" + temperature + "' and point_location = '"+map.getString("point_location")+"' and is_used = '1' and point_status = '01' order by point_code ASC").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonHotIvt)) throw new BadRequestException("烘烤区没有对应空位");
|
||||
|
||||
// 3.创建冷却区 --> 烘烤区任务
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1",point_code1);
|
||||
param.put("point_code2",point_code2);
|
||||
param.put("point_code3",jsonHotIvt.getString("point_code"));
|
||||
|
||||
// 创建冷却区 --> 暂存位的任务
|
||||
InHotTask inHotTask = new InHotTask();
|
||||
String task_id = inHotTask.createTask(param);
|
||||
|
||||
// 4.插入烘箱区出入主表 和 明细表
|
||||
JSONObject hotParam = new JSONObject();
|
||||
hotParam.put("container_name",container_name);
|
||||
hotParam.put("task_id",task_id);
|
||||
// 创建主表
|
||||
String iostorinv_id = this.createHotIoMst(hotParam);
|
||||
// 创建明细
|
||||
hotParam.put("iostorinv_id",iostorinv_id);
|
||||
hotParam.put("start_point_code",point_code2);
|
||||
hotParam.put("next_point_code",jsonHotIvt.getString("point_code"));
|
||||
hotParam.put("temperature",temperature);
|
||||
hotParam.put("oven_time",hours);
|
||||
this.createHotDtl(hotParam);
|
||||
|
||||
// 5.下发任务
|
||||
JSONObject jsonObject = inHotTask.renotifyAcs(task_id);
|
||||
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
||||
// 成功返回 更新任务状态
|
||||
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
||||
jsonTask.put("task_status", "05");
|
||||
taskTab.update(jsonTask);
|
||||
}
|
||||
} else if (StrUtil.equals(option, "2")) {
|
||||
// 出箱
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public String createHotIoMst(JSONObject param) {
|
||||
/*
|
||||
* 创建烘箱区出入主表
|
||||
*/
|
||||
WQLObject hotMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst"); // 烘箱区出入主表
|
||||
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区点位库存表
|
||||
|
||||
JSONObject jsonCoolIvt = coolTab.query("container_name = '" + param.getString("container_name") + "'").uniqueResult(0);
|
||||
|
||||
JSONObject jsonHotMst = new JSONObject();
|
||||
jsonHotMst.put("iostorinv_id", IdUtil.getSnowflake(1,1).nextId());
|
||||
jsonHotMst.put("bill_code", CodeUtil.getNewCode("HOT_BILL_CODE"));
|
||||
jsonHotMst.put("container_name", param.getString("container_name"));
|
||||
jsonHotMst.put("workorder_id", jsonCoolIvt.getString("workorder_id"));
|
||||
jsonHotMst.put("qty", jsonCoolIvt.getString("ivt_qty"));
|
||||
jsonHotMst.put("bill_status", "10");
|
||||
jsonHotMst.put("create_mode", "03");
|
||||
jsonHotMst.put("task_id", param.getString("task_id"));
|
||||
jsonHotMst.put("create_id", SecurityUtils.getCurrentUserId());
|
||||
jsonHotMst.put("create_name", SecurityUtils.getCurrentUsername());
|
||||
jsonHotMst.put("create_time", DateUtil.now());
|
||||
hotMstTab.insert(jsonHotMst);
|
||||
|
||||
return jsonHotMst.getString("iostorinv_id");
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void createHotDtl(JSONObject param) {
|
||||
/*
|
||||
* 创建烘箱区出入明细表
|
||||
*/
|
||||
WQLObject hotDtlTab = WQLObject.getWQLObject("ST_IVT_HotRegionIODtl"); // 烘箱区出入明细表
|
||||
|
||||
JSONObject jsonHotDtl = new JSONObject();
|
||||
jsonHotDtl.put("iostorinvdtl_id",IdUtil.getSnowflake(1,1).nextId());
|
||||
jsonHotDtl.put("iostorinv_id", param.getString("iostorinv_id"));
|
||||
jsonHotDtl.put("start_point_code", param.getString("start_point_code"));
|
||||
jsonHotDtl.put("next_point_code", param.getString("next_point_code"));
|
||||
jsonHotDtl.put("temperature", param.getString("temperature"));
|
||||
jsonHotDtl.put("oven_time", param.getString("oven_time"));
|
||||
jsonHotDtl.put("task_type", "1");
|
||||
jsonHotDtl.put("task_id", param.getString("task_id"));
|
||||
jsonHotDtl.put("create_id", SecurityUtils.getCurrentUserId());
|
||||
jsonHotDtl.put("create_name", SecurityUtils.getCurrentUsername());
|
||||
jsonHotDtl.put("create_time", DateUtil.now());
|
||||
jsonHotDtl.put("dtl_status", "10");
|
||||
hotDtlTab.insert(jsonHotDtl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -144,13 +144,13 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
param.put("end_pint_code", end_pint_code);
|
||||
|
||||
CallEmpReelTask callEmpReelTask = new CallEmpReelTask();
|
||||
String taskdtl_id = callEmpReelTask.createTask(param);
|
||||
String task_id = callEmpReelTask.createTask(param);
|
||||
|
||||
// 下发任务
|
||||
JSONObject jsonObject = callEmpReelTask.renotifyAcs(taskdtl_id);
|
||||
JSONObject jsonObject = callEmpReelTask.renotifyAcs(task_id);
|
||||
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
||||
// 成功返回 更新任务状态
|
||||
JSONObject jsonTask = taskTab.query("taskdtl_id ='" + taskdtl_id + "'").uniqueResult(0);
|
||||
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
||||
jsonTask.put("task_status", "05");
|
||||
taskTab.update(jsonTask);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
param.put("end_pint_code",end_point_code);
|
||||
|
||||
BookTwoConfirmTask bookTwoConfirmTask = new BookTwoConfirmTask();
|
||||
String taskdtl_id = bookTwoConfirmTask.createTask(param);
|
||||
String task_id = bookTwoConfirmTask.createTask(param);
|
||||
|
||||
// 5.插入入库单
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
@@ -226,17 +226,17 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
jsonRegion.put("end_point_code",end_point_code);
|
||||
jsonRegion.put("cust_id","");
|
||||
jsonRegion.put("create_mode","03");
|
||||
jsonRegion.put("task_id",taskdtl_id);
|
||||
jsonRegion.put("task_id",task_id);
|
||||
jsonRegion.put("create_id",currentUserId);
|
||||
jsonRegion.put("create_name",currentUsername);
|
||||
jsonRegion.put("create_time",DateUtil.now());
|
||||
regionTab.insert(jsonRegion);
|
||||
|
||||
// 6.下发任务
|
||||
JSONObject jsonObject = bookTwoConfirmTask.renotifyAcs(taskdtl_id);
|
||||
JSONObject jsonObject = bookTwoConfirmTask.renotifyAcs(task_id);
|
||||
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
||||
// 成功返回 更新任务状态
|
||||
JSONObject jsonTask = taskTab.query("taskdtl_id ='" + taskdtl_id + "'").uniqueResult(0);
|
||||
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
||||
jsonTask.put("task_status", "05");
|
||||
taskTab.update(jsonTask);
|
||||
// 更新出入表状态
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
[交易说明]
|
||||
交易名: 手持接口
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.reging_id TYPEAS s_string
|
||||
输入.point_location TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
SCH_BASE_Point
|
||||
WHERE
|
||||
is_delete = '0'
|
||||
AND is_used = '1'
|
||||
|
||||
OPTION 输入.reging_id <> ""
|
||||
region_id = 输入.reging_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.point_location <> ""
|
||||
point_location = 输入.point_location
|
||||
ENDOPTION
|
||||
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -26,6 +26,15 @@ public class DeliveryPointIvtDto implements Serializable {
|
||||
/** 生产区域 */
|
||||
private String product_area;
|
||||
|
||||
/** 点位状态 **/
|
||||
private String point_status;
|
||||
|
||||
/** 载具码 **/
|
||||
private String vehicle_code;
|
||||
|
||||
/** 气涨轴 **/
|
||||
private String qzzno;
|
||||
|
||||
/** 位置 */
|
||||
private String point_location;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.SecurityUtils;
|
||||
import org.nl.modules.wql.core.bean.ResultBean;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.pdm.ivt.service.DeliveryPointIvtService;
|
||||
@@ -36,9 +36,14 @@ public class DeliveryPointIvtServiceImpl implements DeliveryPointIvtService {
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(Map whereJson, Pageable page){
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_deliverypointivt");
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1=1", "update_time desc");
|
||||
final JSONObject json = rb.pageResult();
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "1");
|
||||
if (!ObjectUtil.isNull(whereJson.get("point_code")))
|
||||
map.put("point_code", "%" + whereJson.get("point_code") + "%");
|
||||
map.put("product_area", whereJson.get("product_area"));
|
||||
map.put("point_status", whereJson.get("point_status"));
|
||||
map.put("is_used", whereJson.get("is_used"));
|
||||
JSONObject json = WQL.getWO("ST_IVT_DELIVERYPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
[交易说明]
|
||||
交易名: 分切输送线点位库存
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.point_code TYPEAS s_string
|
||||
输入.point_status TYPEAS s_string
|
||||
输入.product_area TYPEAS s_string
|
||||
输入.is_used TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
deliver.*
|
||||
FROM
|
||||
st_ivt_deliverypointivt deliver
|
||||
WHERE
|
||||
1=1
|
||||
OPTION 输入.point_code <> ""
|
||||
point_code LIKE 输入.point_code
|
||||
ENDOPTION
|
||||
OPTION 输入.point_status <> ""
|
||||
point_status = 输入.point_status
|
||||
ENDOPTION
|
||||
OPTION 输入.product_area <> ""
|
||||
product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
OPTION 输入.is_used <> ""
|
||||
is_used = 输入.is_used
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.nl.wms.sch;
|
||||
|
||||
/**
|
||||
* 任务状态枚举
|
||||
*/
|
||||
public enum TaskTypeEnum {
|
||||
//生箔任务
|
||||
SB_QKFM("sb_qkfm", "生箔取空放满","生箔取空放满"),
|
||||
SB_QK("sb_qk", "生箔取空","生箔取空"),
|
||||
SB_FM("sb_qk", "生箔放满","生箔放满"),
|
||||
|
||||
//分切上料任务
|
||||
FQ_SL_QMFK("fq_sl_qmfk", "分切取满放空","分切放满"),
|
||||
FQ_SL_FM("fq_sl_fm", "分切放满","分切初始化"),
|
||||
FQ_SL_QK("fq_sl_qk", "分切取满放空","分切放满"),
|
||||
|
||||
//分切下料任务
|
||||
FQ_XL_CZ("FQ_XL_QK", "子卷出站","子卷出站4个点"),
|
||||
|
||||
//烘箱
|
||||
//入烘箱:3个点
|
||||
//输送任务。
|
||||
HX_R_QMFMFM("hx_r_qmfmfm", "入烘箱","入烘箱3个点"),
|
||||
HX_C_SS("hx_c_ss", "出烘箱输送线","出烘箱输送线"),
|
||||
HX_C_AGV("hx_c_agv", "出烘箱AGV","出烘箱AGV");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
private String description;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
TaskTypeEnum(String code, String name,String description) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.wms.sch.manage;
|
||||
|
||||
/**
|
||||
* 完成方式:00自动,01:手动
|
||||
*/
|
||||
public enum RegionTypeEnum {
|
||||
A_SB("01","A生箔区","1578627451293143040"),
|
||||
B_SB("02","B生箔区",""),
|
||||
C_SB("03","C生箔区",""),
|
||||
D_SB("04","D生箔区",""),
|
||||
A_FQ("05","A分切区","1578628922277498880"),
|
||||
B_FQ("06","B分切区",""),
|
||||
C_FQ("07","C分切区",""),
|
||||
D_FQ("08","D分切区",""),
|
||||
A_HKZC("09","A烘烤暂存区","1578657813205487616"),
|
||||
B_HKZC("10","B烘烤暂存区",""),
|
||||
C_HKZC("11","C烘烤暂存区",""),
|
||||
D_HKZC("12","D烘烤暂存区","");
|
||||
|
||||
|
||||
private String name;
|
||||
private String code;
|
||||
private String id;
|
||||
|
||||
private RegionTypeEnum(String code, String name, String id) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
package org.nl.wms.sch.manage;
|
||||
|
||||
/**
|
||||
* 任务状态枚举
|
||||
*/
|
||||
public enum TaskTypeEnum {
|
||||
IN_TASK(1, "01", "入库"),
|
||||
Out_TASK(2, "02", "出库"),
|
||||
IN_EMPTY_VEHICLE_TASK(3, "03", "入空载具"),
|
||||
OUT_EMPTY_VEHICLE_TASK(4, "04", "出空载具"),
|
||||
DUMPINV_TASK(5, "05", "转储"),
|
||||
QUALITY_TASK(6, "06", "质检"),
|
||||
MATERIAL_BACK_TASK(7, "07", "余料回库");
|
||||
|
||||
private int index;
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
TaskTypeEnum(int index, String code, String name) {
|
||||
this.index = index;
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import org.nl.wms.sch.manage.FinishTypeEnum;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.service.TaskService;
|
||||
import org.nl.wms.sch.service.dto.TaskDto;
|
||||
import org.nl.wms.sch.manage.TaskTypeEnum;
|
||||
import org.nl.wms.sch.TaskTypeEnum;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -67,20 +67,20 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
String next_point_code = jsonTask.getString("next_point_code");
|
||||
String start_point_code = jsonTask.getString("start_point_code");
|
||||
String point_code1 = jsonTask.getString("point_code1");
|
||||
String point_code2 = jsonTask.getString("point_code2");
|
||||
|
||||
PointService point = SpringContextHolder.getBean(PointService.class);
|
||||
// 校验起点是否存在
|
||||
PointDto startDto = point.findByCode(start_point_code);
|
||||
if (ObjectUtil.isEmpty(startDto)) throw new BadRequestException("起点未找到可用点位:" + start_point_code);
|
||||
PointDto startDto = point.findByCode(point_code1);
|
||||
if (ObjectUtil.isEmpty(startDto)) throw new BadRequestException("起点未找到可用点位:" + point_code1);
|
||||
|
||||
// 校验终点是否存在
|
||||
JSONObject jsonIvt = ivtTab.query("point_code ='" + next_point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("终点未找到可用点位:" + next_point_code);
|
||||
JSONObject jsonIvt = ivtTab.query("point_code ='" + point_code2 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||
|
||||
// 更新冷却库存状态
|
||||
JSONObject jsonRaw = rawTab.query("resource_name ='" + start_point_code + "'").uniqueResult(0);
|
||||
JSONObject jsonRaw = rawTab.query("resource_name ='" + point_code1 + "'").uniqueResult(0);
|
||||
|
||||
jsonIvt.put("full_point_status", "02");
|
||||
jsonIvt.put("instorage_time", DateUtil.now());
|
||||
@@ -117,13 +117,13 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("taskdtl_id", IdUtil.getSnowflake(1,1).nextId());
|
||||
json.put("task_id",json.getString("taskdtl_id"));
|
||||
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||
json.put("task_type", "05");
|
||||
json.put("task_status", "01");
|
||||
json.put("start_point_code", form.getString("start_pint_code"));
|
||||
json.put("next_point_code", form.getString("end_pint_code"));
|
||||
json.put("point_code1", form.getString("start_pint_code"));
|
||||
json.put("point_code2", form.getString("end_pint_code"));
|
||||
json.put("sort_seq", "1");
|
||||
json.put("handle_class", THIS_CLASS);
|
||||
json.put("create_id", currentUserId);
|
||||
json.put("create_name", currentUsername);
|
||||
@@ -132,7 +132,7 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
||||
json.put("acs_task_type","1" );
|
||||
tab.insert(json);
|
||||
|
||||
return json.getString("taskdtl_id");
|
||||
return json.getString("task_id");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,15 +65,15 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
String start_point_code = jsonTask.getString("start_point_code");
|
||||
String point_code1 = jsonTask.getString("point_code1");
|
||||
|
||||
PointService point = SpringContextHolder.getBean(PointService.class);
|
||||
// 校验起点是否存在
|
||||
JSONObject jsonIvt = ivtTab.query("point_code ='" + start_point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("未找到可用点位:" + start_point_code);
|
||||
JSONObject jsonIvt = ivtTab.query("point_code ='" + point_code1 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("未找到可用点位:" + point_code1);
|
||||
// 校验终点是否存在
|
||||
PointDto nextDto = point.findByCode(jsonTask.getString("next_point_code"));
|
||||
if (ObjectUtil.isEmpty(nextDto)) throw new BadRequestException("未找到可用点位:" + jsonTask.getString("next_point_code"));
|
||||
PointDto nextDto = point.findByCode(jsonTask.getString("point_code2"));
|
||||
if (ObjectUtil.isEmpty(nextDto)) throw new BadRequestException("未找到可用点位:" + jsonTask.getString("point_code2"));
|
||||
|
||||
// 更新冷却库存状态
|
||||
jsonIvt.put("empty_point_status", "01");
|
||||
@@ -99,14 +99,14 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("taskdtl_id", IdUtil.getSnowflake(1,1).nextId());
|
||||
json.put("task_id",json.getString("taskdtl_id"));
|
||||
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||
json.put("task_type", "05");
|
||||
json.put("task_status", "01");
|
||||
json.put("start_point_code", form.getString("start_pint_code"));
|
||||
json.put("next_point_code", form.getString("end_pint_code"));
|
||||
json.put("point_code1", form.getString("start_pint_code"));
|
||||
json.put("point_code2", form.getString("end_pint_code"));
|
||||
json.put("handle_class", THIS_CLASS);
|
||||
json.put("sort_seq", "1");
|
||||
json.put("create_id", currentUserId);
|
||||
json.put("create_name", currentUsername);
|
||||
json.put("create_time", DateUtil.now());
|
||||
@@ -114,7 +114,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
json.put("acs_task_type","1" );
|
||||
tab.insert(json);
|
||||
|
||||
return json.getString("taskdtl_id");
|
||||
return json.getString("task_id");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
169
nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java
Normal file
169
nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java
Normal file
@@ -0,0 +1,169 @@
|
||||
package org.nl.wms.sch.tasks;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.SecurityUtils;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.service.PointService;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class InHotTask extends AbstractAcsTask {
|
||||
private final String THIS_CLASS = InHotTask.class.getName();
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateTaskStatus(JSONObject taskObj, String status) {
|
||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); // 任务表
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位表
|
||||
WQLObject coolIvtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
||||
WQLObject hotIvtTab = WQLObject.getWQLObject("ST_IVT_HotPointIvt"); // 烘箱区库存表
|
||||
WQLObject hotMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst"); // 烘箱区出入主表
|
||||
WQLObject hotDtlTab = WQLObject.getWQLObject("ST_IVT_HotRegionIODtl"); // 烘箱区出入明细表
|
||||
|
||||
String task_id = taskObj.getString("task_id");
|
||||
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
|
||||
if (StrUtil.equals(status,"0")) {
|
||||
// 取消删除任务
|
||||
taskTab.delete("task_id = '"+task_id+"'");
|
||||
}
|
||||
|
||||
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
||||
// 更新任务状态为执行中
|
||||
jsonTask.put("task_status", TaskStatusEnum.EXECUTING.getCode());
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
// 更新明细表状态
|
||||
JSONObject jsonHotDtl = hotDtlTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
jsonHotDtl.put("dtl_status", "40");
|
||||
hotDtlTab.update(jsonHotDtl);
|
||||
|
||||
// 更新主表状态
|
||||
JSONObject jsonHotMst = hotMstTab.query("iostorinv_id = '" + jsonHotDtl.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||
jsonHotMst.put("bill_status", "40");
|
||||
hotMstTab.update(jsonHotMst);
|
||||
}
|
||||
|
||||
if(StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
// 更改任务状态为完成
|
||||
jsonTask.put("task_status",TaskStatusEnum.FINISHED.getCode());
|
||||
jsonTask.put("update_optid", currentUserId);
|
||||
jsonTask.put("update_optname", currentUsername);
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
// 更新明细表
|
||||
JSONObject jsonHotDtl = hotDtlTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
jsonHotDtl.put("dtl_status", "50");
|
||||
jsonHotDtl.put("confirm_optid", currentUserId);
|
||||
jsonHotDtl.put("confirm_optname", currentUsername);
|
||||
jsonHotDtl.put("confirm_time", DateUtil.now());
|
||||
hotDtlTab.update(jsonHotDtl);
|
||||
|
||||
// 更新主表: 什么时候更新主表
|
||||
JSONObject jsonHotMst = hotMstTab.query("iostorinv_id = '" + jsonHotDtl.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||
|
||||
// 更新冷却区库存状态
|
||||
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||
String container_name = jsonCoolIvt.getString("container_name"); // 母卷号
|
||||
String workorder_id = jsonCoolIvt.getString("workorder_id"); // 母卷工单标识
|
||||
String ivt_qty = jsonCoolIvt.getString("ivt_qty"); // 库存
|
||||
|
||||
jsonCoolIvt.put("full_point_status", "01");
|
||||
jsonCoolIvt.put("container_name", "");
|
||||
jsonCoolIvt.put("workorder_id", "");
|
||||
jsonCoolIvt.put("ivt_qty", "0");
|
||||
jsonCoolIvt.put("instorage_time", "");
|
||||
jsonCoolIvt.put("update_optid", currentUserId);
|
||||
jsonCoolIvt.put("update_optname", currentUsername);
|
||||
jsonCoolIvt.put("update_time", DateUtil.now());
|
||||
coolIvtTab.update(jsonCoolIvt);
|
||||
|
||||
// 更新烘箱区库存状态
|
||||
JSONObject jsonHotIvt = hotIvtTab.query("point_code = '" + jsonTask.getString("point_code3") + "'").uniqueResult(0);
|
||||
jsonHotIvt.put("point_status", "02");
|
||||
jsonHotIvt.put("container_name",container_name );
|
||||
jsonHotIvt.put("workorder_id",workorder_id );
|
||||
jsonHotIvt.put("ivt_qty",ivt_qty );
|
||||
jsonHotIvt.put("instorage_time",DateUtil.now() );
|
||||
jsonHotIvt.put("update_optid", currentUserId);
|
||||
jsonHotIvt.put("update_optname", currentUsername);
|
||||
jsonHotIvt.put("update_time", DateUtil.now());
|
||||
hotIvtTab.update(jsonHotIvt);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findStartPoint() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findNextPoint() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public String createTask(JSONObject form) {
|
||||
WQLObject tab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||
json.put("task_type", "010201");
|
||||
json.put("task_status", "01");
|
||||
json.put("point_code1", form.getString("point_code1"));
|
||||
json.put("point_code2", form.getString("point_code2"));
|
||||
json.put("point_code3", form.getString("point_code3"));
|
||||
json.put("sort_seq", "1");
|
||||
json.put("handle_class", THIS_CLASS);
|
||||
json.put("create_id", currentUserId);
|
||||
json.put("create_name", currentUsername);
|
||||
json.put("create_time", DateUtil.now());
|
||||
json.put("priority","1" );
|
||||
json.put("acs_task_type","1" );
|
||||
tab.insert(json);
|
||||
|
||||
return json.getString("task_id");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void forceFinish(String task_id) {
|
||||
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
this.updateTaskStatus(taskObj, TaskStatusEnum.FINISHED.getCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pullBack(String task_id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel(String task_id) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,7 +66,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
</http>
|
||||
<format>
|
||||
<label>
|
||||
<pattern>system=${SYSTEM_NAME},level=%level,logType=%X{log_file_type:-logType},device=%X{device_code_log:-device}</pattern>
|
||||
<pattern>system=${SYSTEM_NAME},level=%level,logType=%X{log_file_type:-logType}</pattern>
|
||||
</label>
|
||||
<message>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"echarts": "^4.2.1",
|
||||
"echarts-gl": "^1.1.1",
|
||||
"echarts-wordcloud": "^1.1.3",
|
||||
"element-ui": "^2.13.2",
|
||||
"element-ui": "^2.15.8",
|
||||
"file-saver": "1.3.8",
|
||||
"font-awesome": "^4.7.0",
|
||||
"fuse.js": "3.4.4",
|
||||
|
||||
@@ -210,6 +210,18 @@ function CRUD(options) {
|
||||
callVmHook(crud, CRUD.HOOK.afterToAdd, crud.form)
|
||||
callVmHook(crud, CRUD.HOOK.afterToCU, crud.form)
|
||||
},
|
||||
/**
|
||||
* 启动添加 可携带参数
|
||||
*/
|
||||
toAddAndData(data) {
|
||||
crud.resetForm(JSON.parse(JSON.stringify(data)))
|
||||
if (!(callVmHook(crud, CRUD.HOOK.beforeToAdd, crud.form) && callVmHook(crud, CRUD.HOOK.beforeToCU, crud.form))) {
|
||||
return
|
||||
}
|
||||
crud.status.add = CRUD.STATUS.PREPARED
|
||||
callVmHook(crud, CRUD.HOOK.afterToAdd, crud.form)
|
||||
callVmHook(crud, CRUD.HOOK.afterToCU, crud.form)
|
||||
},
|
||||
/**
|
||||
* 启动编辑
|
||||
* @param {*} data 数据项
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<el-tag :type="scope.row.isSuccess ? 'success' : 'danger'">{{ scope.row.isSuccess ? '成功' : '失败' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="createTime" label="创建日期">
|
||||
<el-table-column min-width="100" show-overflow-tooltip prop="createTime" label="创建日期">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
|
||||
@@ -72,4 +72,11 @@ export function getClassTable(params) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getClass, getClassSuperior, getClassType, getClassTable, getType, queryClassById }
|
||||
export function getClassName() {
|
||||
return request({
|
||||
url: 'api/Classstandard/getClassName',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getClass, getClassSuperior, getClassType, getClassTable, getType, queryClassById, getClassName }
|
||||
|
||||
@@ -2,33 +2,49 @@
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<span style="line-height:36px;text-align: center">基础分类:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select
|
||||
v-model="query.base_data_type"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.base_data"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<rrOperation />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="分类名称">
|
||||
<el-select
|
||||
v-model="query.class_code"
|
||||
placeholder="请选择分类名称"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand">
|
||||
<el-option
|
||||
v-for="item in classNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-s-operation"
|
||||
@click="ToExpandall"
|
||||
>
|
||||
全部展开
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -44,21 +60,6 @@
|
||||
<el-form-item label="分类名称" prop="class_name">
|
||||
<el-input v-model="form.class_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="基础分类" prop="base_data_type">
|
||||
<el-select
|
||||
v-model="form.base_data_type"
|
||||
placeholder=""
|
||||
@change="dataTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.base_data"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<span style="color: #C0C0C0;margin-left: 10px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="简要描述" prop="class_desc">
|
||||
<el-input v-model="form.class_desc" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
@@ -105,17 +106,20 @@
|
||||
<el-table-column
|
||||
v-permission="['admin','Classstandard:edit','Classstandard:del']"
|
||||
label="操作"
|
||||
width="150px"
|
||||
width="250px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
style="display: inline"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="scope.row.is_modify === '0'"
|
||||
:disabled-dle="scope.row.is_modify === '0'"
|
||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
||||
/>
|
||||
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus-outline" @click="crud.toAddAndData(addSibling(scope.row))">新增同级</el-button>
|
||||
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus" @click="crud.toAddAndData(addChildren(scope.row))">新增子级</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -135,7 +139,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
let defaultForm = {
|
||||
class_id: null,
|
||||
base_data_type: null,
|
||||
path_code: null,
|
||||
@@ -180,14 +184,12 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
classNames: [],
|
||||
permission: {},
|
||||
rules: {
|
||||
class_id: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
base_data_type: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
path_code: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
@@ -218,7 +220,15 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getClassNames() // 获取分类
|
||||
},
|
||||
methods: {
|
||||
getClassNames() {
|
||||
crudClassstandard.getClassName().then((res) => { // 获取分类名称,查询根据分类编码查找对应分支树
|
||||
this.classNames = res
|
||||
})
|
||||
},
|
||||
getClassDatas(tree, treeNode, resolve) {
|
||||
const params = { pid: tree.id }
|
||||
setTimeout(() => {
|
||||
@@ -318,6 +328,72 @@ export default {
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
clearFrom() {
|
||||
defaultForm = {
|
||||
id: null,
|
||||
class_id: null,
|
||||
base_data_type: null,
|
||||
path_code: null,
|
||||
class_code: null,
|
||||
long_class_code: null,
|
||||
class_name: null,
|
||||
class_desc: null,
|
||||
parent_class_id: null,
|
||||
is_leaf: null,
|
||||
sub_count: null,
|
||||
is_modify: null,
|
||||
is_delete: null,
|
||||
class_level: null,
|
||||
ext_id: null,
|
||||
ext_parent_id: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
isTop: null
|
||||
}
|
||||
},
|
||||
addSibling(row) {
|
||||
this.clearFrom() // 将默认的表单数据清除
|
||||
defaultForm.id = row.id // 获取分类树的id - 懒加载依赖此id,不可为空
|
||||
defaultForm.class_id = row.class_id
|
||||
defaultForm.parent_class_id = row.parent_class_id // 同级为父类class_id
|
||||
defaultForm.isTop = row.isTop
|
||||
return defaultForm
|
||||
},
|
||||
addChildren(row) {
|
||||
this.clearFrom()
|
||||
defaultForm.id = row.id // 获取分类树的id
|
||||
defaultForm.class_id = row.parent_class_id
|
||||
defaultForm.parent_class_id = row.id // 子级为本身的class_id
|
||||
defaultForm.isTop = row.isTop
|
||||
return defaultForm
|
||||
},
|
||||
// 全部展开 参考:https://www.cnblogs.com/toughy/p/12667805.html
|
||||
ToExpandall() {
|
||||
const els = document.getElementsByClassName('el-table__expand-icon')
|
||||
if (this.crud.data.length !== 0 && els.length !== 0) {
|
||||
for (let j1 = 0; j1 < els.length; j1++) {
|
||||
els[j1].classList.add('dafult')
|
||||
}
|
||||
if (this.$el.getElementsByClassName('el-table__expand-icon--expanded')) {
|
||||
const open = this.$el.getElementsByClassName('el-table__expand-icon--expanded')
|
||||
for (let j = 0; j < open.length; j++) {
|
||||
open[j].classList.remove('dafult')
|
||||
}
|
||||
const dafult = this.$el.getElementsByClassName('dafult')
|
||||
for (let a = 0; a < dafult.length; a++) {
|
||||
debugger
|
||||
dafult[a].click()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,19 +92,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="基础分类" prop="class_id">
|
||||
<treeselect
|
||||
v-model="form.class_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="width: 600px;" type="textarea" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -228,7 +228,11 @@
|
||||
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="qty_unit_name" label="计量单位" />
|
||||
<el-table-column prop="instorage_time" label="入库时间" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="product_area" label="生产区域" />
|
||||
<el-table-column prop="product_area" label="生产区域" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.product_area[scope.row.product_area] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="point_location" label="位置" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.point_location[scope.row.point_location] }}
|
||||
|
||||
@@ -2,25 +2,137 @@
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="点位编码">
|
||||
<el-input
|
||||
v-model="query.point_code"
|
||||
clearable
|
||||
placeholder="输入点位编码"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-select
|
||||
v-model="query.product_area"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位状态">
|
||||
<el-select
|
||||
v-model="query.point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.delivery_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-switch
|
||||
@change="hand"
|
||||
v-model="query.is_used"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
active-color="#C0CCDA"
|
||||
inactive-color="#409EFF"/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="点位编码" prop="point_code">
|
||||
<el-input v-model="form.point_code" style="width: 370px;" />
|
||||
<el-input v-model="form.point_code" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-input v-model="form.product_area" style="width: 370px;" />
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
size="mini"
|
||||
placeholder="生产区域"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具码">
|
||||
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="气涨轴">
|
||||
<el-input v-model="form.qzzno" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="点位状态">
|
||||
<el-select
|
||||
v-model="form.point_status"
|
||||
size="mini"
|
||||
placeholder="点位状态"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.delivery_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置">
|
||||
<el-input v-model="form.point_location" style="width: 370px;" />
|
||||
<el-select
|
||||
v-model="form.point_location"
|
||||
size="mini"
|
||||
placeholder="位置"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.point_location"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="顺序号" prop="sort_seq">
|
||||
<el-input v-model="form.sort_seq" style="width: 370px;" />
|
||||
<el-form-item label="顺序号" prop="sort_seq" >
|
||||
<el-input v-model="form.sort_seq" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="is_used">
|
||||
<el-input v-model="form.is_used" style="width: 370px;" />
|
||||
<el-switch v-model="form.is_used" active-value="1" inactive-value="0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="width: 370px;" />
|
||||
@@ -35,16 +147,36 @@
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="point_code" label="点位编码" />
|
||||
<el-table-column prop="product_area" label="生产区域" />
|
||||
<el-table-column prop="point_location" label="位置" />
|
||||
<el-table-column prop="is_used" label="是否启用" />
|
||||
<el-table-column prop="vehicle_code" label="载具码" />
|
||||
<el-table-column prop="qzzno" label="气涨轴" />
|
||||
<el-table-column prop="point_status" label="点位状态" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.delivery_point_status[scope.row.point_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="product_area" label="生产区域" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.product_area[scope.row.product_area] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="point_location" label="位置" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.point_location[scope.row.point_location] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_used" label="是否启用" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.is_used[scope.row.is_used] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="update_time" label="修改时间" />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:is-visiable-del="false"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -63,13 +195,27 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = { ivt_id: null, point_code: null, product_area: null, point_location: null, sort_seq: null, is_used: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
const defaultForm = { ivt_id: null, point_code: null, product_area: null, qzzno: null, vehicle_code: null, point_status: null, point_location: null, sort_seq: null, is_used: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
export default {
|
||||
name: 'DeliveryPointIvt',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
dicts: ['delivery_point_status', 'product_area', 'is_used', 'point_location'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '分切输送线', url: 'api/deliverypointivt', idField: 'ivt_id', sort: 'ivt_id,desc', crudMethod: { ...crudDeliverypointivt }})
|
||||
return CRUD({
|
||||
title: '分切输送线',
|
||||
url: 'api/deliverypointivt',
|
||||
idField: 'ivt_id',
|
||||
sort: 'ivt_id,desc',
|
||||
crudMethod: { ...crudDeliverypointivt },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: true,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -79,9 +225,6 @@ export default {
|
||||
point_code: [
|
||||
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
sort_seq: [
|
||||
{ required: true, message: '顺序号不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_used: [
|
||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||
]
|
||||
@@ -91,6 +234,9 @@ export default {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user