fix:出入库流程修改
This commit is contained in:
@@ -87,6 +87,7 @@ public class TwoLashTask extends AbstractAcsTask {
|
|||||||
interaction_json.put("height",dao.get(0).getBox_high());
|
interaction_json.put("height",dao.get(0).getBox_high());
|
||||||
interaction_json.put("template","2");
|
interaction_json.put("template","2");
|
||||||
interaction_json.put("bindingTimes","1");
|
interaction_json.put("bindingTimes","1");
|
||||||
|
interaction_json.put("isBinding", IOSEnum.IS_SEND.code("是"));
|
||||||
|
|
||||||
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
||||||
AcsTaskDto dto = AcsTaskDto.builder()
|
AcsTaskDto dto = AcsTaskDto.builder()
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import org.checkerframework.checker.units.qual.A;
|
||||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvdisService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvdisService;
|
||||||
@@ -53,6 +56,9 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IschBaseTaskService ischBaseTaskService;
|
private IschBaseTaskService ischBaseTaskService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不需要查询的排集合
|
* 不需要查询的排集合
|
||||||
*/
|
*/
|
||||||
@@ -77,7 +83,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
String operate = json.getString("operate");
|
String operate = json.getString("operate");
|
||||||
if (operate.equals(IOSEnum.IO_TYPE.code("入库"))) {
|
if (operate.equals(IOSEnum.IO_TYPE.code("入库"))) {
|
||||||
|
|
||||||
attrTab.update(json, "struct_code IN ('"+ String.join("','", param) +"')");
|
attrTab.update(json, "struct_code IN ('" + String.join("','", param) + "')");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,10 +116,10 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
*/
|
*/
|
||||||
JSONArray attrArry = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
JSONArray attrArry = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
|
||||||
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("是") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("否") + "' " +
|
||||||
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '"+jsonObject.getString("stor_id")+"' " +
|
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonObject.getString("stor_id") + "' " +
|
||||||
"AND storagevehicle_type = '" + jsonObject.getString("vehicle_type") + "'" +
|
"AND storagevehicle_type = '" + jsonObject.getString("vehicle_type") + "'" +
|
||||||
"AND height = '" + jsonObject.getString("height") + "'" +
|
"AND height = '" + jsonObject.getString("height") + "'" +
|
||||||
"AND sect_id = '"+jsonObject.getString("sect_id")+"'").getResultJSONArray(0);
|
"AND sect_id = '" + jsonObject.getString("sect_id") + "'").getResultJSONArray(0);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(attrArry)) {
|
if (ObjectUtil.isEmpty(attrArry)) {
|
||||||
notInRowList.clear();
|
notInRowList.clear();
|
||||||
@@ -136,13 +142,13 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
/*
|
/*
|
||||||
* 确定哪排:查看每排相同木箱规格等 的数量,找到数量最小的那排
|
* 确定哪排:查看每排相同木箱规格等 的数量,找到数量最小的那排
|
||||||
*/
|
*/
|
||||||
jsonSub.put("block_num",block_num);
|
jsonSub.put("block_num", block_num);
|
||||||
String row_num = getMinRow(jsonSub);
|
String row_num = getMinRow(jsonSub);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 确定伸位,找仓位
|
* 确定伸位,找仓位
|
||||||
*/
|
*/
|
||||||
jsonSub.put("row_num",row_num);
|
jsonSub.put("row_num", row_num);
|
||||||
JSONObject jsonAttr = queryStruct(jsonSub);
|
JSONObject jsonAttr = queryStruct(jsonSub);
|
||||||
|
|
||||||
// 为空则新找巷道
|
// 为空则新找巷道
|
||||||
@@ -169,7 +175,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
json.put("box_high", jsonSub.getString("box_high"));
|
json.put("box_high", jsonSub.getString("box_high"));
|
||||||
|
|
||||||
String row_num_2 = getMinRow(json);
|
String row_num_2 = getMinRow(json);
|
||||||
json.put("row_num",row_num_2);
|
json.put("row_num", row_num_2);
|
||||||
JSONObject jsonAttr_2 = queryStruct(json);
|
JSONObject jsonAttr_2 = queryStruct(json);
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(jsonAttr_2)) {
|
if (ObjectUtil.isNotEmpty(jsonAttr_2)) {
|
||||||
@@ -204,10 +210,16 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
throw new BadRequestException("设备号不能为空!");
|
throw new BadRequestException("设备号不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询木箱信息
|
||||||
|
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
||||||
|
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||||
|
.eq(BstIvtBoxinfo::getBox_no, jsonObject.getString("box_no"))
|
||||||
|
);
|
||||||
|
|
||||||
List<String> pcsnList = Arrays.asList(material_barcode.split(","));
|
List<String> pcsnList = Arrays.asList(material_barcode.split(","));
|
||||||
|
|
||||||
// 查询子卷包装关系
|
// 查询子卷包装关系
|
||||||
List<JSONObject> subList = subTab.query("container_name in ('"+String.join("','", pcsnList)+"') and status = '0'")
|
List<JSONObject> subList = subTab.query("container_name in ('" + String.join("','", pcsnList) + "') and status = '0'")
|
||||||
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(subList)) {
|
if (ObjectUtil.isEmpty(subList)) {
|
||||||
@@ -248,7 +260,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
jsonDtl.put("is_active", IOSEnum.IS_SEND.code("是"));
|
jsonDtl.put("is_active", IOSEnum.IS_SEND.code("是"));
|
||||||
tableData.add(jsonDtl);
|
tableData.add(jsonDtl);
|
||||||
}
|
}
|
||||||
mst.put("tableData",tableData);
|
mst.put("tableData", tableData);
|
||||||
|
|
||||||
// 调用服务创建
|
// 调用服务创建
|
||||||
String iostorinv_id = iStIvtIostorinvService.insertMst(mst);
|
String iostorinv_id = iStIvtIostorinvService.insertMst(mst);
|
||||||
@@ -267,15 +279,16 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
).stream().map(row -> JSONObject.parseObject(JSON.toJSONString(row), LinkedHashMap.class))
|
).stream().map(row -> JSONObject.parseObject(JSON.toJSONString(row), LinkedHashMap.class))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
jsonDiv.put("dtl_row",JSONObject.parseObject(JSON.toJSONString(dtlDao)));
|
jsonDiv.put("dtl_row", JSONObject.parseObject(JSON.toJSONString(dtlDao)));
|
||||||
jsonDiv.put("tableMater", disList);
|
jsonDiv.put("tableMater", disList);
|
||||||
jsonDiv.put("checked", true);
|
jsonDiv.put("checked", true);
|
||||||
jsonDiv.put("is_send", IOSEnum.IS_SEND.code("是"));
|
jsonDiv.put("is_send", IOSEnum.IS_SEND.code("是"));
|
||||||
jsonDiv.put("point_code", jsonObject.getString("device_code"));
|
jsonDiv.put("point_code", jsonObject.getString("device_code"));
|
||||||
jsonDiv.put("sect_id", IOSEnum.SECT_ID.code("二期主存区"));
|
jsonDiv.put("sect_id", IOSEnum.SECT_ID.code("二期主存区"));
|
||||||
jsonDiv.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
jsonDiv.put("stor_id", IOSEnum.STOR_ID.code("二期"));
|
||||||
jsonDiv.put("material_barcode",jsonObject.getString("material_barcode"));
|
jsonDiv.put("material_barcode", jsonObject.getString("material_barcode"));
|
||||||
jsonDiv.put("vehicle_code",jsonObject.getString("vehicle_code"));
|
jsonDiv.put("vehicle_code", jsonObject.getString("vehicle_code"));
|
||||||
|
jsonDiv.put("vehicle_type", boxDao.getVehicle_type());
|
||||||
iStIvtIostorinvService.divStruct(jsonDiv);
|
iStIvtIostorinvService.divStruct(jsonDiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,7 +344,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
).get(0);
|
).get(0);
|
||||||
|
|
||||||
JSONObject jsonDiv = new JSONObject();
|
JSONObject jsonDiv = new JSONObject();
|
||||||
jsonDiv.put("dtl_row",JSONObject.parseObject(JSON.toJSONString(dtlDao)));
|
jsonDiv.put("dtl_row", JSONObject.parseObject(JSON.toJSONString(dtlDao)));
|
||||||
jsonDiv.put("tableMater", disList);
|
jsonDiv.put("tableMater", disList);
|
||||||
jsonDiv.put("checked", true);
|
jsonDiv.put("checked", true);
|
||||||
jsonDiv.put("is_send", IOSEnum.IS_SEND.code("否"));
|
jsonDiv.put("is_send", IOSEnum.IS_SEND.code("否"));
|
||||||
@@ -361,6 +374,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取最小巷道
|
* 获取最小巷道
|
||||||
|
*
|
||||||
* @param jsonSub {
|
* @param jsonSub {
|
||||||
* jsonSub:木箱信息
|
* jsonSub:木箱信息
|
||||||
* sect_id:库区
|
* sect_id:库区
|
||||||
@@ -384,7 +398,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
.collect(Collectors.joining("','"));
|
.collect(Collectors.joining("','"));
|
||||||
|
|
||||||
jsonSub.put("flag", "2");
|
jsonSub.put("flag", "2");
|
||||||
jsonSub.put("block_in", "('"+block_in+"')");
|
jsonSub.put("block_in", "('" + block_in + "')");
|
||||||
|
|
||||||
List<JSONObject> boxAllList = WQL.getWO("BST_INRULE").addParamMap(jsonSub)
|
List<JSONObject> boxAllList = WQL.getWO("BST_INRULE").addParamMap(jsonSub)
|
||||||
.process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
.process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
@@ -410,7 +424,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 区分木箱规格:最小木箱的巷道
|
// 区分木箱规格:最小木箱的巷道
|
||||||
JSONObject jsonBlockLikeMin = sumBlockMinNum(blockList,boxAllLikeList);
|
JSONObject jsonBlockLikeMin = sumBlockMinNum(blockList, boxAllLikeList);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 比较两个巷道的总木箱数,取最小的
|
* 比较两个巷道的总木箱数,取最小的
|
||||||
@@ -426,6 +440,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算最小巷道木箱数
|
* 计算最小巷道木箱数
|
||||||
|
*
|
||||||
* @param blockList : 所有巷道
|
* @param blockList : 所有巷道
|
||||||
* @param boxAllList: 所有木箱
|
* @param boxAllList: 所有木箱
|
||||||
* @return JSONObject:最小木箱数的巷道 JSONObject{block_num,box_num}
|
* @return JSONObject:最小木箱数的巷道 JSONObject{block_num,box_num}
|
||||||
@@ -456,6 +471,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取最小排
|
* 获取最小排
|
||||||
|
*
|
||||||
* @param jsonSub {
|
* @param jsonSub {
|
||||||
* jsonSub:木箱信息
|
* jsonSub:木箱信息
|
||||||
* sect_id:库区
|
* sect_id:库区
|
||||||
@@ -482,7 +498,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
.collect(Collectors.joining("','"));
|
.collect(Collectors.joining("','"));
|
||||||
|
|
||||||
jsonSub.put("flag", "2");
|
jsonSub.put("flag", "2");
|
||||||
jsonSub.put("row_in", "('"+row_in+"')");
|
jsonSub.put("row_in", "('" + row_in + "')");
|
||||||
|
|
||||||
List<JSONObject> boxAllList = WQL.getWO("BST_INRULE").addParamMap(jsonSub)
|
List<JSONObject> boxAllList = WQL.getWO("BST_INRULE").addParamMap(jsonSub)
|
||||||
.process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
.process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
@@ -527,6 +543,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算最小木箱的排
|
* 计算最小木箱的排
|
||||||
|
*
|
||||||
* @param rowList : 所有排
|
* @param rowList : 所有排
|
||||||
* @param boxAllList: 所有木箱
|
* @param boxAllList: 所有木箱
|
||||||
* @return JSONObject:最小木箱数的排 JSONObject{row_num,box_num}
|
* @return JSONObject:最小木箱数的排 JSONObject{row_num,box_num}
|
||||||
@@ -557,6 +574,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取仓位
|
* 获取仓位
|
||||||
|
*
|
||||||
* @param jsonSub {
|
* @param jsonSub {
|
||||||
* jsonSub:木箱信息
|
* jsonSub:木箱信息
|
||||||
* sect_id:库区
|
* sect_id:库区
|
||||||
@@ -580,7 +598,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
|
|
||||||
// 新的一排
|
// 新的一排
|
||||||
String row_num_new = this.getMinRow(jsonSub);
|
String row_num_new = this.getMinRow(jsonSub);
|
||||||
jsonSub.put("row_num",row_num_new);
|
jsonSub.put("row_num", row_num_new);
|
||||||
|
|
||||||
jsonAttr = this.getStruct(jsonSub);
|
jsonAttr = this.getStruct(jsonSub);
|
||||||
}
|
}
|
||||||
@@ -590,6 +608,7 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取一个货位公共方法
|
* 获取一个货位公共方法
|
||||||
|
*
|
||||||
* @param jsonSub {
|
* @param jsonSub {
|
||||||
* jsonSub:木箱信息
|
* jsonSub:木箱信息
|
||||||
* sect_id:库区
|
* sect_id:库区
|
||||||
|
|||||||
@@ -209,15 +209,15 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
result.put("width", boxDao.getBox_width());
|
result.put("width", boxDao.getBox_width());
|
||||||
result.put("height", boxDao.getBox_high());
|
result.put("height", boxDao.getBox_high());
|
||||||
result.put("case", boxDao.getMaterial_code());
|
result.put("case", boxDao.getMaterial_code());
|
||||||
result.put("isBinding", IOSEnum.IS_SEND.code("否"));
|
result.put("isBinding", IOSEnum.IS_SEND.code("是"));
|
||||||
result.put("isLabeling", IOSEnum.IS_SEND.code("否"));
|
result.put("isLabeling", IOSEnum.IS_SEND.code("否"));
|
||||||
|
|
||||||
result.put("labelingTemplate", boxDao.getLash_num());
|
result.put("labelingTemplate", boxDao.getLash_num());
|
||||||
result.put("bindingTemplate", "1");
|
result.put("bindingTemplate", boxDao.getLash_num());
|
||||||
result.put("printDevice", "1");
|
result.put("printDevice", "1");
|
||||||
|
|
||||||
result.put("printQty", "1");
|
result.put("printQty", "1");
|
||||||
result.put("bundleTimes", "2");
|
result.put("bundleTimes", "1");
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,14 +70,8 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
|||||||
.eq(SchBasePoint::getIs_delete, IOSEnum.IS_NOTANDYES.code("否"))
|
.eq(SchBasePoint::getIs_delete, IOSEnum.IS_NOTANDYES.code("否"))
|
||||||
);
|
);
|
||||||
|
|
||||||
// 根据载具号找到对应的木箱号
|
|
||||||
JSONObject jsonExt = extTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
|
|
||||||
if (ObjectUtil.isEmpty(jsonExt)) {
|
|
||||||
throw new BadRequestException("此载具上没有木箱,请检查!"+whereJson.getString("vehicle_code"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1.查询此木箱号的子卷包装关系
|
// 1.查询此木箱号的子卷包装关系
|
||||||
JSONObject jsonSub = subTab.query("package_box_sn = '" + jsonExt.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("package_box_sn = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonSub)) {
|
if (ObjectUtil.isEmpty(jsonSub)) {
|
||||||
throw new BadRequestException("未查询到该木箱对应的包装关系!");
|
throw new BadRequestException("未查询到该木箱对应的包装关系!");
|
||||||
}
|
}
|
||||||
@@ -215,6 +209,6 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// 删除载具对应木箱记录
|
// 删除载具对应木箱记录
|
||||||
extTab.delete(jsonExt);
|
//extTab.delete(jsonExt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ public class StoragevehicleinfoController {
|
|||||||
@Log("修改载具")
|
@Log("修改载具")
|
||||||
|
|
||||||
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:edit')")
|
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:edit')")
|
||||||
public ResponseEntity<Object> update(@Validated @RequestBody StoragevehicleinfoDto dto) {
|
public ResponseEntity<Object> update(@RequestBody JSONObject map) {
|
||||||
storagevehicleinfoService.update(dto);
|
storagevehicleinfoService.update(map);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public interface StoragevehicleinfoService {
|
|||||||
*
|
*
|
||||||
* @param dto /
|
* @param dto /
|
||||||
*/
|
*/
|
||||||
void update(StoragevehicleinfoDto dto);
|
void update(JSONObject dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多选删除
|
* 多选删除
|
||||||
|
|||||||
@@ -160,24 +160,47 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void update(StoragevehicleinfoDto dto) {
|
public void update(JSONObject dto) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
|
WQLObject wo = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
|
||||||
JSONObject jsonObject = wo.query("storagevehicle_code = '" + dto.getStoragevehicle_code() + "' and is_delete = '0'").uniqueResult(0);
|
WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
||||||
|
JSONObject jsonObject = wo.query("storagevehicle_code = '" + dto.getString("storagevehicle_code") + "' and is_delete = '0' AND storagevehicle_id != '" + dto.getString("storagevehicle_id") + "'").uniqueResult(0);
|
||||||
if (!ObjectUtil.isEmpty(jsonObject)) {
|
if (!ObjectUtil.isEmpty(jsonObject)) {
|
||||||
throw new BadRequestException("此载具已存在");
|
throw new BadRequestException("此载具已存在");
|
||||||
}
|
}
|
||||||
StoragevehicleinfoDto entity = this.findById(dto.getStoragevehicle_id());
|
|
||||||
if (entity == null) {
|
|
||||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
|
||||||
}
|
|
||||||
|
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
|
||||||
String now = DateUtil.now();
|
String qty = dto.getString("qty");
|
||||||
dto.setUpdate_time(now);
|
String pcsn = dto.getString("pcsn");
|
||||||
dto.setUpdate_optid(currentUserId);
|
if (StrUtil.isNotEmpty(qty) || StrUtil.isNotEmpty(pcsn)) {
|
||||||
dto.setUpdate_optname(nickName);
|
JSONObject ext_jo = veExtTab.query("storagevehicle_code = '"+dto.getString("storagevehicle_code")+"'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(ext_jo)) {
|
||||||
|
//新增一条记录
|
||||||
|
JSONObject jsonVeExt = new JSONObject();
|
||||||
|
jsonVeExt.put("storagevehicleext_id", org.nl.common.utils.IdUtil.getLongId());
|
||||||
|
jsonVeExt.put("storagevehicle_id", dto.getLongValue("storagevehicle_id"));
|
||||||
|
jsonVeExt.put("storagevehicle_code", dto.getString("storagevehicle_code"));
|
||||||
|
jsonVeExt.put("storagevehicle_type", dto.getString("storagevehicle_type"));
|
||||||
|
if (StrUtil.isNotEmpty(pcsn)) {
|
||||||
|
jsonVeExt.put("pcsn", pcsn);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(qty)) {
|
||||||
|
jsonVeExt.put("qty", qty);
|
||||||
|
}
|
||||||
|
jsonVeExt.put("device_uuid", org.nl.common.utils.IdUtil.getLongId());
|
||||||
|
jsonVeExt.put("update_time", DateUtil.now());
|
||||||
|
veExtTab.insert(jsonVeExt);
|
||||||
|
} else {
|
||||||
|
if (StrUtil.isNotEmpty(pcsn)) {
|
||||||
|
ext_jo.put("pcsn", pcsn);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(qty)) {
|
||||||
|
ext_jo.put("qty", qty);
|
||||||
|
}
|
||||||
|
veExtTab.update(ext_jo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||||
wo.update(json);
|
wo.update(json);
|
||||||
|
|||||||
@@ -45,6 +45,9 @@
|
|||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
s.*,
|
s.*,
|
||||||
|
ext.pcsn,
|
||||||
|
ext.qty,
|
||||||
|
ext.update_time AS change_time,
|
||||||
mater.material_code,
|
mater.material_code,
|
||||||
mater.material_name,
|
mater.material_name,
|
||||||
point.point_code,
|
point.point_code,
|
||||||
@@ -56,6 +59,7 @@
|
|||||||
LEFT JOIN ST_IVT_StructIvt ivt ON point.source_id = ivt.struct_id
|
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_me_materialbase mater ON mater.material_id = ivt.material_id
|
||||||
LEFT JOIN md_pb_classstandard class ON class.class_code = s.storagevehicle_type
|
LEFT JOIN md_pb_classstandard class ON class.class_code = s.storagevehicle_type
|
||||||
|
LEFT JOIN md_pb_storagevehicleext ext ON ext.storagevehicle_code = s.storagevehicle_code
|
||||||
WHERE
|
WHERE
|
||||||
s.is_delete = '0'
|
s.is_delete = '0'
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
Binary file not shown.
@@ -68,7 +68,7 @@
|
|||||||
width="450px"
|
width="450px"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||||
<el-form-item label="载具类型" prop="storagevehicle_type">
|
<el-form-item label="载具类型" v-if="crud.status.add > 0" prop="storagevehicle_type">
|
||||||
<treeselect
|
<treeselect
|
||||||
v-model="form.storagevehicle_type"
|
v-model="form.storagevehicle_type"
|
||||||
:load-options="loadChildNodes"
|
:load-options="loadChildNodes"
|
||||||
@@ -78,8 +78,14 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br>
|
<br>
|
||||||
<el-form-item label="载具数量" prop="num">
|
<el-form-item label="载具数量" v-if="crud.status.add > 0" prop="num">
|
||||||
<el-input-number v-model="form.num" :precision="0" style="width: 150px;"/>
|
<el-input-number v-model="form.num" v-if="crud.status.add > 0" :precision="0" style="width: 150px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="载具重量" v-if="crud.status.edit > 0" prop="qty">
|
||||||
|
<el-input-number v-model="form.qty" :precision="0" style="width: 150px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="绑定物料" v-if="crud.status.edit > 0" prop="pcsn">
|
||||||
|
<el-input v-model="form.pcsn" :precision="0" style="width: 150px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用">
|
<el-form-item label="是否启用">
|
||||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||||
@@ -88,8 +94,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
||||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">生成</el-button>
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||||
<el-button type="primary" @click="addAndprint">生成并打印</el-button>
|
<el-button v-if="crud.status.add > 0" type="primary" @click="addAndprint">保存并打印</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
@@ -110,8 +116,8 @@
|
|||||||
<!--<el-table-column prop="point_code" label="当前点位" width="120px"/>
|
<!--<el-table-column prop="point_code" label="当前点位" width="120px"/>
|
||||||
<el-table-column prop="start_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="next_point_code" label="终点" width="120px"/>-->
|
||||||
<el-table-column prop="material_code" label="物料编码"/>
|
<el-table-column prop="pcsn" label="绑定物料"/>
|
||||||
<el-table-column prop="material_name" label="物料名称"/>
|
<el-table-column prop="qty" label="托盘重量"/>
|
||||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
@@ -127,7 +133,7 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="100px"
|
width="150px"
|
||||||
align="center"
|
align="center"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
@@ -135,7 +141,6 @@
|
|||||||
<udOperation
|
<udOperation
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
:permission="permission"
|
:permission="permission"
|
||||||
:is-visiable-edit="false"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -180,7 +185,9 @@ const defaultForm = {
|
|||||||
overstruct_type: null,
|
overstruct_type: null,
|
||||||
occupystruct_qty: null,
|
occupystruct_qty: null,
|
||||||
ext_id: null,
|
ext_id: null,
|
||||||
num: '1'
|
num: '1',
|
||||||
|
qty: null,
|
||||||
|
pcsn: null
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Storagevehicleinfo',
|
name: 'Storagevehicleinfo',
|
||||||
|
|||||||
Reference in New Issue
Block a user