This commit is contained in:
2023-01-06 14:32:48 +08:00
parent 6c8cffb8b7
commit 2cda82fa09
16 changed files with 341 additions and 162 deletions

View File

@@ -48,8 +48,12 @@ public class CodeDetailServiceImpl implements CodeDetailService {
json.put("code_rule_id",dict.get("id"));
json.put("is_active","1");
json.put("is_delete","0");
json.put("create_by", SecurityUtils.getCurrentUsername());
json.put("create_id", SecurityUtils.getCurrentUserId());
json.put("create_name", SecurityUtils.getCurrentNickName());
json.put("create_time", now);
json.put("update_id", SecurityUtils.getCurrentUserId());
json.put("update_name", SecurityUtils.getCurrentNickName());
json.put("update_time", now);
if(form.get("type").equals("02")){
Date date = DateUtil.date();
String format = (String) form.get("format");
@@ -69,7 +73,8 @@ public class CodeDetailServiceImpl implements CodeDetailService {
public void update(JSONObject json) {
String now = DateUtil.now();
json.put("update_time",now);
json.put("update_by", SecurityUtils.getCurrentUsername());
json.put("update_id", SecurityUtils.getCurrentUserId());
json.put("update_name", SecurityUtils.getCurrentNickName());
WQLObject.getWQLObject("sys_code_rule_detail").update(json);
}
}

View File

@@ -13,10 +13,13 @@ 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.StringUtils;
import org.nl.modules.system.service.impl.GenCodeServiceImpl;
import org.nl.modules.system.util.CodeUtil;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.basedata.master.service.ClassstandardService;
import org.nl.wms.basedata.master.service.StoragevehicleinfoService;
import org.nl.wms.basedata.master.service.dto.ClassstandardDto;
import org.nl.wms.basedata.master.service.dto.StoragevehicleinfoDto;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
@@ -39,18 +42,24 @@ import java.util.Map;
@Slf4j
public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService {
private final ClassstandardService classstandardService;
@Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
HashMap<String, Object> map = new HashMap();
String storagevehicle_code_begin = (String) whereJson.get("storagevehicle_code_begin");
String storagevehicle_code_end = (String) whereJson.get("storagevehicle_code_end");
String storagevehicle_type = (String) whereJson.get("storagevehicle_type");
HashMap<String, Object> map = new HashMap();
if (StrUtil.isNotEmpty((String) whereJson.get("storagevehicle_type"))) {
ClassstandardDto dto = classstandardService.findById((String) whereJson.get("storagevehicle_type"));
String storagevehicle_type = classstandardService.getChildIdStr(dto.getClass_id().toString());
map.put("storagevehicle_type", storagevehicle_type);
}
map.put("storagevehicle_code_begin", storagevehicle_code_begin);
map.put("storagevehicle_code_end", storagevehicle_code_end);
map.put("storagevehicle_type", storagevehicle_type);
map.put("flag", "1");
JSONObject json = WQL.getWO("QMD_PB_STORAGEVEHICLEINFO").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "s.storagevehicle_code ASC");
JSONArray content = json.getJSONArray("content");
@@ -89,7 +98,7 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
public StoragevehicleinfoDto findByCode(String code) {
WQLObject wo = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
JSONObject json = wo.query("storagevehicle_code ='" + code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(json)){
if (ObjectUtil.isEmpty(json)) {
throw new BadRequestException("请输入正确的载具号!");
}
final StoragevehicleinfoDto obj = json.toJavaObject(StoragevehicleinfoDto.class);
@@ -108,16 +117,20 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
String storagevehicle_type = (String) map.get("storagevehicle_type");
String storagevehicle_type = ((String) map.get("storagevehicle_type"));
JSONObject class_jo = WQLObject.getWQLObject("md_pb_classstandard").query("class_id = '" + storagevehicle_type + "'").uniqueResult(0);
String class_code = class_jo.getString("class_code").substring(0, 4);
;
String code = "";
switch (storagevehicle_type) {
case "00":
code = "VEHICCLE_CODE_MTP";
break;
case "01":
code = "VEHICCLE_CODE_TTP";
switch (class_code) {
case "0001":
//气涨轴编码
code = "VEHICCLE_CODE_QZZ";
break;
}
if (StrUtil.isEmpty(code)) {
throw new BadRequestException("请选择正确的载具类型!");
}
JSONArray resultCodeArr = new JSONArray();
int num = MapUtil.getInt(map, "num");
for (int i = 0; i < num; i++) {
@@ -131,7 +144,7 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
dto.setUpdate_optname(nickName);
dto.setUpdate_time(now);
dto.setCreate_time(now);
dto.setStoragevehicle_type((String) map.get("storagevehicle_type"));
dto.setStoragevehicle_type(class_jo.getString("class_code"));
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.insert(json);
resultCodeArr.add(dto.getStoragevehicle_code());

View File

@@ -16,7 +16,7 @@
输入.flag TYPEAS s_string
输入.storagevehicle_code_begin TYPEAS s_string
输入.storagevehicle_code_end TYPEAS s_string
输入.storagevehicle_type TYPEAS s_string
输入.storagevehicle_type TYPEAS f_string
[临时表]
@@ -45,17 +45,17 @@
PAGEQUERY
SELECT
s.*,
d.label AS storagevehicle_type_name,
mater.material_code,
mater.material_name,
point.point_code,
point.point_name
mater.material_code,
mater.material_name,
point.point_code,
point.point_name,
class.class_name AS storagevehicle_type_name
FROM
md_pb_storagevehicleinfo s
LEFT JOIN sys_dict d ON s.storagevehicle_type = d.value and d.code = 'storagevehicle_type'
LEFT JOIN sch_base_point point ON point.vehicle_code = s.storagevehicle_code
LEFT JOIN ST_IVT_StructIvt ivt ON point.source_id = ivt.struct_id
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id
LEFT JOIN md_pb_classstandard class ON class.class_code = s.storagevehicle_type
WHERE
s.is_delete = '0'
ENDOPTION
@@ -68,9 +68,8 @@
s.storagevehicle_code <= 输入.storagevehicle_code_end
ENDOPTION
ENDOPTION
OPTION 输入.storagevehicle_type <> ""
s.storagevehicle_type = 输入.storagevehicle_type
class.class_id in 输入.storagevehicle_type
ENDOPTION
ENDSELECT
ENDPAGEQUERY

View File

@@ -42,6 +42,13 @@ public class CasingController {
return new ResponseEntity<>(casingService.confirm(whereJson), HttpStatus.OK);
}
@PostMapping("/outConfirm")
@Log("拔轴确认")
@ApiOperation("拔轴确认")
public ResponseEntity<Object> outConfirm(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(casingService.outConfirm(whereJson), HttpStatus.OK);
}
@PostMapping("/queryDeviceByarea")
@Log("查询设备")
@ApiOperation("查询设备")

View File

@@ -52,6 +52,13 @@ public class ShippingController {
return new ResponseEntity<>(shippingService.returnVehicle(whereJson), HttpStatus.OK);
}
@PostMapping("/acrossVehicle")
@Log("载具横移")
@ApiOperation("载具横移")
public ResponseEntity<Object> acrossVehicle(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(shippingService.acrossVehicle(whereJson), HttpStatus.OK);
}
@PostMapping("/check")
@Log("配送校验")
@ApiOperation("配送校验")

View File

@@ -22,6 +22,14 @@ public interface CasingService {
*/
JSONObject confirm(JSONObject whereJson);
/**
* 拔轴确认
*
* @param whereJson /
* @return JSONObject
*/
JSONObject outConfirm(JSONObject whereJson);
/**
* 查询设备
*

View File

@@ -33,6 +33,13 @@ public interface ShippingService {
*/
JSONObject returnVehicle(JSONObject whereJson);
/**
* 载具横移
* @param whereJson /
* @return JSONObject
*/
JSONObject acrossVehicle(JSONObject whereJson);
/**
* 配送校验
* @param whereJson /

View File

@@ -12,6 +12,7 @@ import org.nl.common.utils.SecurityUtils;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.core.content.HttpContext;
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
import org.nl.wms.ext.mes.service.LmsToMesService;
import org.nl.wms.pda.mps.service.BakingService;
import org.nl.wms.pda.mps.service.CasingService;
@@ -140,6 +141,51 @@ public class CasingServiceImpl implements CasingService {
return result;
}
@Override
public JSONObject outConfirm(JSONObject whereJson) {
String qzzno = whereJson.getString("qzzno");
String point_code = whereJson.getString("point_code");
if (StrUtil.isEmpty(qzzno)) {
throw new BadRequestException("气涨轴编码不能为空!");
}
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("点位编码不能为空!");
}
JSONObject qzz_jo = WQLObject.getWQLObject("md_pb_storagevehicleinfo").query("storagevehicle_code = '"+qzzno+"' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(qzz_jo)){
throw new BadRequestException("该气涨轴不存在或被删除!");
}
if (qzz_jo.getString("is_used").equals("0")){
throw new BadRequestException("气涨轴未启用!");
}
String storagevehicle_type = qzz_jo.getString("storagevehicle_type");
String to_command = "";
if (storagevehicle_type.equals("000101")){
to_command = "1";
}
if (storagevehicle_type.equals("000102")){
to_command = "2";
}
if (StrUtil.isEmpty(to_command)){
throw new BadRequestException("未查询到该气涨轴对应的类型!");
}
JSONArray rows = new JSONArray();
JSONObject jo = new JSONObject();
jo.put("device_code",whereJson.getString("point_code"));
jo.put("code","to_command");
jo.put("value",to_command);
rows.add(jo);
new WmsToAcsServiceImpl().action(rows);
//下发ACS拔轴机构
JSONObject result = new JSONObject();
result.put("message", "下发成功!");
return result;
}
@Override
public JSONObject queryDeviceByarea(JSONObject whereJson) {
String product_area = whereJson.getString("product_area");

View File

@@ -42,8 +42,8 @@ public class ShippingServiceImpl implements ShippingService {
}
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
JSONObject jo = new JSONObject();
jo.put("data",rows);
jo.put("message","操作成功!");
jo.put("data", rows);
jo.put("message", "操作成功!");
return jo;
}
@@ -53,7 +53,7 @@ public class ShippingServiceImpl implements ShippingService {
//查询离该分切计划包含机台最近的一个空载具
JSONObject empty_vehicle = WQL.getWO("PDA_02")
.addParam("sort_seq", cut_jo.getString("sort_seq"))
.addParam("sql_str", " ORDER BY abs("+cut_jo.getString("sort_seq")+"-sort_seq),point_code desc")
.addParam("sql_str", " ORDER BY abs(" + cut_jo.getString("sort_seq") + "-sort_seq),point_code desc")
.addParam("product_area", cut_jo.getString("product_area"))
.addParam("point_location", cut_jo.getString("point_location"))
.addParam("flag", "3").process().uniqueResult(0);
@@ -63,15 +63,15 @@ public class ShippingServiceImpl implements ShippingService {
//如果查询到给ACS下发一个输送线任务
JSONObject form = new JSONObject();
form.put("point_code1",empty_vehicle.getString("point_code"));
form.put("point_code1", empty_vehicle.getString("point_code"));
//查询该区域点位类型为出口的点位
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '"+cut_jo.getString("product_area")+"' AND point_type = '7'").uniqueResult(0);
form.put("point_code2",ss_jo.getString("point_code"));
form.put("task_type","010401");
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '" + cut_jo.getString("product_area") + "' AND point_type = '7'").uniqueResult(0);
form.put("point_code2", ss_jo.getString("point_code"));
form.put("task_type", "010401");
cutConveyorTask.createTask(form);
JSONObject jo = new JSONObject();
jo.put("message","操作成功!");
jo.put("message", "操作成功!");
return jo;
}
@@ -83,7 +83,7 @@ public class ShippingServiceImpl implements ShippingService {
throw new BadRequestException("载具号不能为空!");
}*/
if (rows.size()>2){
if (rows.size() > 2) {
throw new BadRequestException("最多选择两个子卷进行操作!");
}
@@ -96,30 +96,30 @@ public class ShippingServiceImpl implements ShippingService {
//对子卷任务进行校验
for (int i = 0; i < rows.size(); i++) {
JSONObject row = rows.getJSONObject(i);
if (StrUtil.isEmpty(split_group)){
JSONObject row = rows.getJSONObject(i);
if (StrUtil.isEmpty(split_group)) {
split_group = row.getString("split_group");
resource_name = row.getString("resource_name");
order_type = row.getString("order_type");
if (order_type.equals("1")){
if (order_type.equals("1")) {
parent_container_name = row.getString("parent_container_name");
}else {
} else {
restruct_container_name = row.getString("restruct_container_name");
package_box_sn = row.getString("package_box_sn");
}
}else {
if (!split_group.equals(row.getString("split_group"))){
} else {
if (!split_group.equals(row.getString("split_group"))) {
throw new BadRequestException("两个子卷的分切组必须相同!");
}
if (!resource_name.equals(row.getString("resource_name"))){
if (!resource_name.equals(row.getString("resource_name"))) {
throw new BadRequestException("两个子卷的机台编号必须相同!");
}
if (order_type.equals("1")){
if (!parent_container_name.equals(row.getString("parent_container_name"))){
if (order_type.equals("1")) {
if (!parent_container_name.equals(row.getString("parent_container_name"))) {
throw new BadRequestException("两个子卷的母卷号必须相同!");
}
}else {
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))){
} else {
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))) {
throw new BadRequestException("两个子卷的改制子卷必须相同!");
}
}
@@ -127,7 +127,6 @@ public class ShippingServiceImpl implements ShippingService {
}
//通过气涨轴对应的分切计划来判断要送到哪个机台编号附近
String qzzno = rows.getJSONObject(0).getString("qzzno");
@@ -140,100 +139,151 @@ public class ShippingServiceImpl implements ShippingService {
}
JSONObject plan_jo = WQL.getWO("PDA_02").addParamMap(map).process().uniqueResult(0);
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '"+resource_name+"'").uniqueResult(0);
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '" + resource_name + "'").uniqueResult(0);
String product_area = cut_jo.getString("product_area");
String point_location = cut_jo.getString("point_location");
//判断当前输送线上是否超过最大负荷任务数量组3组
JSONArray cut_rows = WQL.getWO("PDA_02").addParam("flag","13").addParam("qzzno",qzzno).addParam("product_area",product_area).addParam("point_location",point_location).process().getResultJSONArray(0);
JSONArray cut_rows = WQL.getWO("PDA_02").addParam("flag", "13").addParam("qzzno", qzzno).addParam("product_area", product_area).addParam("point_location", point_location).process().getResultJSONArray(0);
if (cut_rows.size()>3){
if (point_location.equals("0")){
if (cut_rows.size() > 3) {
if (point_location.equals("0")) {
throw new BadRequestException("已超过上半段输送线最大负荷任务数,请等下一子卷送出再进行配送,并将该空载具送回!");
}
if (point_location.equals("1")){
if (point_location.equals("1")) {
throw new BadRequestException("已超过下半段输送线最大负荷任务数,请等下一子卷送出再进行配送,并将该空载具送回!");
}
}
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '"+product_area+"' AND point_location = '"+point_location+"' AND vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '" + product_area + "' AND point_location = '" + point_location + "' AND vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_area)){
if (ObjectUtil.isEmpty(vehicle_area)) {
throw new BadRequestException("该气涨轴无法放在该载具上!");
}
//查询离该分切计划包含机台最近的一个空点位
JSONObject empty_point = WQL.getWO("PDA_02")
.addParam("sql_str", " ORDER BY abs("+plan_jo.getString("sort_seq")+"-sort_seq),point_code")
.addParam("sql_str", " ORDER BY abs(" + plan_jo.getString("sort_seq") + "-sort_seq),point_code")
.addParam("product_area", plan_jo.getString("product_area"))
.addParam("point_location", plan_jo.getString("point_location"))
.addParam("flag", "4").process().uniqueResult(0);
if (ObjectUtil.isEmpty(empty_point)){
if (ObjectUtil.isEmpty(empty_point)) {
throw new BadRequestException("未查询到可用的空点位!");
}
//下发输送线任务
JSONObject form = new JSONObject();
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '"+plan_jo.getString("product_area")+"' AND point_type = '6'").uniqueResult(0);
form.put("point_code1",ss_jo.getString("point_code"));
form.put("point_code2",empty_point.getString("point_code"));
form.put("task_type","010402");
form.put("vehicle_code",plan_jo.getString("qzzno"));
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '" + plan_jo.getString("product_area") + "' AND point_type = '6'").uniqueResult(0);
form.put("point_code1", ss_jo.getString("point_code"));
form.put("point_code2", empty_point.getString("point_code"));
form.put("task_type", "010402");
form.put("vehicle_code", plan_jo.getString("qzzno"));
cutConveyorTask.createTask(form);
//更新该气涨轴对应的分切计划状态
JSONArray plan_rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
for (int i = 0; i < plan_rows.size(); i++) {
JSONObject row = plan_rows.getJSONObject(i);
row.put("status","02");
row.put("status", "02");
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(row);
}
JSONObject jo = new JSONObject();
jo.put("message","操作成功!");
jo.put("message", "操作成功!");
return jo;
}
@Override
public JSONObject returnVehicle(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
String vehicle_code =whereJson.getString("vehicle_code");
if (StrUtil.isEmpty(point_code)){
String vehicle_code = whereJson.getString("vehicle_code");
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("起点不能为空!");
}
if (StrUtil.isEmpty(vehicle_code)){
if (StrUtil.isEmpty(vehicle_code)) {
throw new BadRequestException("载具码不能为空!");
}
//判断起点是否存在
JSONObject start_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '"+point_code+"' AND is_delete = '0' AND is_used = '1'").uniqueResult(0);
if (ObjectUtil.isEmpty(start_jo)){
JSONObject start_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "' AND is_delete = '0' AND is_used = '1'").uniqueResult(0);
if (ObjectUtil.isEmpty(start_jo)) {
throw new BadRequestException("未查询到对应点位!");
}
if (!start_jo.getString("point_type").equals("6")){
if (!start_jo.getString("point_type").equals("6")) {
throw new BadRequestException("请选择输送线入库口作为起点!");
}
//查询该载具码对应的区域位置
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_area)){
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_area)) {
throw new BadRequestException("未查询到该载具对应的区域位置!");
}
//根据起点判断区域查询对应的输送线空点位
JSONObject point_jo = WQL.getWO("PDA_02").addParam("flag","4").addParam("product_area",vehicle_area.getString("product_area")).addParam("point_location",vehicle_area.getString("point_location")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(point_jo)){
JSONObject point_jo = WQL.getWO("PDA_02").addParam("flag", "4").addParam("product_area", vehicle_area.getString("product_area")).addParam("point_location", vehicle_area.getString("point_location")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(point_jo)) {
throw new BadRequestException("对应输送线不存在可用的空位!");
}
//下发输送线任务
JSONObject form = new JSONObject();
form.put("point_code1",point_code);
form.put("point_code2",point_jo.getString("point_code"));
form.put("task_type","010402");
form.put("vehicle_code","");
form.put("point_code1", point_code);
form.put("point_code2", point_jo.getString("point_code"));
form.put("task_type", "010402");
form.put("vehicle_code", "");
cutConveyorTask.createTask(form);
JSONObject jo = new JSONObject();
jo.put("message","操作成功!");
jo.put("message", "操作成功!");
return jo;
}
@Override
public JSONObject acrossVehicle(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
if (StrUtil.isEmpty(point_code)){
throw new BadRequestException("输入点位不能为空!");
}
JSONObject del_jo = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_code = '"+point_code+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(del_jo)){
throw new BadRequestException("未查询到相关的输送线点位!");
}
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 = '"+point_code+"' OR point_code2 = '"+point_code+"') AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(task_jo)){
throw new BadRequestException("该点位存在未完成的任务,请先完成任务!");
}
String point_status = del_jo.getString("point_status");
if (point_status.equals("01")){
throw new BadRequestException("该点位上不存在载具!");
}
//判断输送进去的任务终点是否远离分切机,如果远离分切机且靠近分切机的点位上不存在载具且不存在任务进行载具横移
char dtl_type = point_code.charAt(point_code.length() - 1);
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 == 0) {
String point_location = del_jo.getString("point_location");
String product_area = del_jo.getString("product_area");
String sort_seq = del_jo.getString("sort_seq");
JSONObject left_point = WQL.getWO("PDA_02")
.addParam("point_location", point_location)
.addParam("product_area", product_area)
.addParam("sort_seq", sort_seq)
.addParam("find_type", "2")
.addParam("flag", "17").process().uniqueResult(0);
if (ObjectUtil.isNotEmpty(left_point)) {
//创建载具横移任务
String translate_code1 = point_code;
String translate_code2 = left_point.getString("point_code");
JSONObject tran_jo = new JSONObject();
tran_jo.put("point_code1",translate_code1);
tran_jo.put("point_code2",translate_code2);
tran_jo.put("vehicle_code",del_jo.getString("qzzno"));
tran_jo.put("task_type","010406");
cutConveyorTask.createTask(tran_jo);
}
}
JSONObject jo = new JSONObject();
jo.put("message", "操作成功!");
return jo;
}
@@ -242,38 +292,38 @@ public class ShippingServiceImpl implements ShippingService {
String qzzno = whereJson.getString("qzzno");
String vehicle_code = whereJson.getString("vehicle_code");
if (StrUtil.isEmpty(qzzno)){
if (StrUtil.isEmpty(qzzno)) {
throw new BadRequestException("气涨轴不能为空!");
}
JSONObject plan = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("qzzno = '"+qzzno+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(plan)){
JSONObject plan = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("qzzno = '" + qzzno + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(plan)) {
throw new BadRequestException("未查询到该气涨轴对应的分切计划!");
}
String resource_name = plan.getString("resource_name");
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '"+resource_name+"'").uniqueResult(0);
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '" + resource_name + "'").uniqueResult(0);
String product_area = cut_jo.getString("product_area");
String point_location = cut_jo.getString("point_location");
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '"+product_area+"' AND point_location = '"+point_location+"' AND vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '" + product_area + "' AND point_location = '" + point_location + "' AND vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_area)){
if (ObjectUtil.isEmpty(vehicle_area)) {
throw new BadRequestException("该气涨轴无法放在该载具上!");
}
//判断当前输送线上是否超过最大负荷任务数量组3组
JSONArray cut_rows = WQL.getWO("PDA_02").addParam("flag","13").addParam("qzzno",qzzno).addParam("product_area",product_area).addParam("point_location",point_location).process().getResultJSONArray(0);
JSONArray cut_rows = WQL.getWO("PDA_02").addParam("flag", "13").addParam("qzzno", qzzno).addParam("product_area", product_area).addParam("point_location", point_location).process().getResultJSONArray(0);
if (cut_rows.size()>3){
if (point_location.equals("0")){
if (cut_rows.size() > 3) {
if (point_location.equals("0")) {
throw new BadRequestException("已超过上半段输送线最大负荷任务数,请等下一子卷送出再进行配送,并将该空载具送回!");
}
if (point_location.equals("1")){
if (point_location.equals("1")) {
throw new BadRequestException("已超过下半段输送线最大负荷任务数,请等下一子卷送出再进行配送,并将该空载具送回!");
}
}
JSONObject jo = new JSONObject();
jo.put("message","校验无误,可以进行配送!");
jo.put("message", "校验无误,可以进行配送!");
return jo;
}

View File

@@ -38,8 +38,6 @@ import java.util.Map;
public class TaskServiceImpl implements TaskService {
private final ClassstandardService classstandardService;
private final RegionService regionService;
private final PointService pointService;
@Override
public Map<String, Object> queryAll(Map form, Pageable page) {

View File

@@ -168,7 +168,7 @@ public class CutConveyorTask extends AbstractAcsTask {
}
//判断输送进去的任务终点是否远离分切机,如果远离分切机且靠近分切机的点位上不存在载具且不存在任务进行载具横移
char dtl_type = point_code2.charAt(point_code1.length() - 1);
char dtl_type = point_code2.charAt(point_code2.length() - 1);
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 == 0) {
String point_location = jsonIvt.getString("point_location");
String product_area = jsonIvt.getString("product_area");

View File

@@ -67,10 +67,10 @@
<el-radio-button label="0">否</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-show="form.type.toString() !== '2' && form.type.toString() !== '1' " label="菜单可见" prop="hidden">
<el-form-item v-show="form.type.toString() !== '2' && form.type.toString() !== '1' " label="菜单隐藏" prop="hidden">
<el-radio-group v-model="form.hidden" size="mini">
<el-radio-button label="1">是</el-radio-button>
<el-radio-button label="0">否</el-radio-button>
<el-radio-button label=true>是</el-radio-button>
<el-radio-button label=false>否</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.type.toString() !== '2'" label="菜单标题" prop="title">

View File

@@ -79,7 +79,7 @@
<el-radio-button label="0">否</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-show="form.type.toString() !== '2' && form.type.toString() !== '1' " label="菜单可见" prop="hidden">
<el-form-item v-show="form.type.toString() !== '2' && form.type.toString() !== '1' " label="菜单隐藏" prop="hidden">
<el-radio-group v-model="form.hidden" size="mini">
<el-radio-button label=true>是</el-radio-button>
<el-radio-button label=false>否</el-radio-button>

View File

@@ -12,21 +12,13 @@
label-suffix=":"
>
<el-form-item label="载具类型">
<el-select
<treeselect
v-model="query.storagevehicle_type"
clearable
size="mini"
:load-options="loadChildNodes"
:options="classes1"
style="width: 220px"
placeholder="请选择"
class="filter-item"
style="width: 180px;"
@change="hand"
>
<el-option
v-for="item in dict.storagevehicle_type"
:label="item.label"
:value="item.value"
/>
</el-select>
/>
</el-form-item>
<el-form-item label="载具号">
@@ -35,7 +27,7 @@
clearable
size="mini"
placeholder="起始载具号"
style="width: 110px;"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
@@ -45,12 +37,12 @@
clearable
size="mini"
placeholder="结束载具号"
style="width: 110px;"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
<rrOperation/>
</el-form>
</div>
@@ -77,28 +69,17 @@
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
<el-form-item label="载具类型" prop="storagevehicle_type">
<el-select
<treeselect
v-model="form.storagevehicle_type"
clearable
size="mini"
:load-options="loadChildNodes"
:options="classes1"
style="width: 220px"
placeholder="请选择"
class="filter-item"
style="width: 250px;"
@change="getVehicle"
>
<el-option
v-for="item in dict.storagevehicle_type"
:label="item.label"
:value="item.value"
/>
</el-select>
/>
</el-form-item>
<br>
<el-form-item label="起始载具号" prop="storagevehicle_code">
<el-input v-model="form.storagevehicle_code" :disabled="true" style="width: 250px;" />
</el-form-item>
<el-form-item label="载具数量" prop="num">
<el-input-number v-model="form.num" :precision="0" style="width: 150px;" />
<el-input-number v-model="form.num" :precision="0" style="width: 150px;"/>
</el-form-item>
<el-form-item label="是否启用">
<el-radio v-model="form.is_used" label="0">否</el-radio>
@@ -120,17 +101,17 @@
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="storagevehicle_id" label="载具标识" />
<el-table-column prop="storagevehicle_type_name" label="载具类型" />
<el-table-column prop="storagevehicle_code" label="载具编码" />
<el-table-column prop="storagevehicle_name" label="载具名称" />
<el-table-column prop="is_task" label="是否搬运中" :formatter="formatIsTask" />
<el-table-column prop="point_code" label="当前点位" width="120px" />
<el-table-column prop="start_point_code" label="起点" width="120px" />
<el-table-column prop="next_point_code" label="终点" width="120px" />
<el-table-column prop="material_code" label="物料编码" />
<el-table-column prop="material_name" label="物料名称" />
<el-table-column type="selection" width="55"/>
<el-table-column v-if="false" prop="storagevehicle_id" label="载具标识"/>
<el-table-column prop="storagevehicle_type_name" label="载具类型"/>
<el-table-column prop="storagevehicle_code" label="载具编码"/>
<el-table-column prop="storagevehicle_name" label="载具名称"/>
<!-- <el-table-column prop="is_task" label="是否搬运中" :formatter="formatIsTask"/>-->
<!--<el-table-column prop="point_code" label="当前点位" width="120px"/>
<el-table-column prop="start_point_code" label="起点" width="120px"/>
<el-table-column prop="next_point_code" label="终点" width="120px"/>-->
<el-table-column prop="material_code" label="物料编码"/>
<el-table-column prop="material_name" label="物料名称"/>
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
@@ -141,8 +122,8 @@
/>
</template>
</el-table-column>
<el-table-column prop="create_name" label="创建人" />
<el-table-column prop="create_time" label="创建时间" width="150px" />
<el-table-column prop="create_name" label="创建人"/>
<el-table-column prop="create_time" label="创建时间" width="150px"/>
<el-table-column
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
label="操作"
@@ -160,7 +141,7 @@
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
<pagination/>
</div>
</div>
</template>
@@ -173,6 +154,9 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import crudClassstandard from '@/views/wms/basedata/master/class/classstandard'
const defaultForm = {
storagevehicle_id: null,
@@ -201,7 +185,7 @@ const defaultForm = {
export default {
name: 'Storagevehicleinfo',
dicts: ['storagevehicle_type'],
components: { pagination, crudOperation, rrOperation, udOperation },
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
@@ -232,10 +216,8 @@ export default {
return {
resultCodeArr: [],
permission: {},
classes1: [],
rules: {
storagevehicle_code: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
create_id: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
@@ -264,6 +246,9 @@ export default {
}
}
},
created() {
this.initClass1()
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
@@ -294,6 +279,42 @@ export default {
format_is_used(is_used) {
return is_used === '1'
},
initClass1() {
const param = {
parent_class_code: 'vehicle_type'
}
crudClassstandard.getClassType(param).then(res => {
const data = res.content
this.buildTree(data)
this.classes1 = data
})
},
buildTree(classes) {
classes.forEach(data => {
if (data.children) {
this.buildTree(data.children)
}
if (data.hasChildren && !data.children) {
data.children = null // 重点代码
}
})
},
// 获取子节点数据
loadChildNodes({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) {
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
parentNode.children = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}
return obj
})
setTimeout(() => {
callback()
}, 100)
})
}
},
print() {
const _selectData = this.$refs.table.selection
if (!_selectData || _selectData.length < 1) {
@@ -340,16 +361,6 @@ export default {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
getVehicle(code) {
if (!code) {
this.crud.notify('请选择载具类型', CRUD.NOTIFICATION_TYPE.INFO)
this.form.storagevehicle_code = ''
return false
}
crudStoragevehicleinfo.getVehicle(code).then(res => {
this.form.storagevehicle_code = res.value
})
},
formatIsTask(row) {
if (row.is_task === '1') {
return '是'

View File

@@ -183,7 +183,7 @@
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="160px">
<el-row>
<el-col :span="12">
<el-form-item label="木箱唯一码">
<el-form-item label="木箱唯一码" prop="package_box_sn">
<el-input v-model="form.package_box_sn" style="width: 300px;" />
</el-form-item>
</el-col>
@@ -308,7 +308,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="SAP批次">
<el-form-item label="SAP批次" prop="sap_pcsn">
<el-input v-model="form.sap_pcsn" style="width: 300px;" />
</el-form-item>
</el-col>
@@ -327,36 +327,36 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="">
<el-form-item label="" prop="box_length">
<el-input-number v-model="form.box_length" :max="10000" :min="0" :precision="2" :controls="false" style="width: 300px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="">
<el-form-item label="" prop="box_width">
<el-input-number v-model="form.box_width" :max="10000" :min="0" :precision="2" :controls="false" style="width: 300px;" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="">
<el-form-item label="" prop="box_high">
<el-input-number v-model="form.box_high" :max="10000" :min="0" :precision="2" :controls="false" style="width: 300px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="销售订单及行号">
<el-form-item label="销售订单及行号" prop="sale_order_name">
<el-input v-model="form.sale_order_name" style="width: 300px;" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料主数据厚度">
<el-form-item label="物料主数据厚度" prop="thickness_request">
<el-input v-model="form.thickness_request" :controls="false" style="width: 300px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="要求幅宽">
<el-form-item label="要求幅宽" prop="width_standard">
<el-input v-model="form.width_standard" style="width: 300px;" />
</el-form-item>
</el-col>
@@ -479,6 +479,12 @@ export default {
customer_description: [
{ required: true, message: '客户名称不能为空', trigger: 'blur' }
],
customer_name: [
{ required: true, message: '客户编码不能为空', trigger: 'blur' }
],
package_box_sn: [
{ required: true, message: '木箱唯一码不能为空', trigger: 'blur' }
],
product_name: [
{ required: true, message: '产品编码不能为空', trigger: 'blur' }
],
@@ -509,6 +515,24 @@ export default {
sale_order_name: [
{ required: true, message: '销售订单及行号不能为空', trigger: 'blur' }
],
width_standard: [
{ required: true, message: '要求幅宽不能为空', trigger: 'blur' }
],
thickness_request: [
{ required: true, message: '物流主数据厚度不能为空', trigger: 'blur' }
],
box_length: [
{ required: true, message: '长不能为空', trigger: 'blur' }
],
box_width: [
{ required: true, message: '宽不能为空', trigger: 'blur' }
],
box_high: [
{ required: true, message: '高不能为空', trigger: 'blur' }
],
sap_pcsn: [
{ required: true, message: 'SAP批次不能为空', trigger: 'blur' }
],
is_un_plan_production: [
{ required: true, message: '计划外分切的子卷不能为空', trigger: 'blur' }
],

View File

@@ -344,6 +344,10 @@ export default {
this.form.out_stor_id = ''
}
if (this.form.bill_type === '1004') {
if (!this.form.out_stor_id) {
this.crud.notify('移入仓库不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (this.form.out_stor_id === this.form.stor_id) {
this.crud.notify('移出仓库和移入仓库不能一致!', CRUD.NOTIFICATION_TYPE.INFO)
return false