fix:入库修改

This commit is contained in:
zhouz
2024-05-17 17:02:43 +08:00
parent 1971e6ced2
commit 6746f0a088
13 changed files with 122 additions and 16 deletions

View File

@@ -39,4 +39,11 @@ public class VehicleTwoController {
public ResponseEntity<Object> boxIn(@RequestBody JSONObject whereJson) { public ResponseEntity<Object> boxIn(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(vehicleTwoService.boxIn(whereJson), HttpStatus.OK); return new ResponseEntity<>(vehicleTwoService.boxIn(whereJson), HttpStatus.OK);
} }
@PostMapping("/returnIn")
@Log("退货入库")
@SaIgnore
public ResponseEntity<Object> returnIn(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(vehicleTwoService.returnIn(whereJson), HttpStatus.OK);
}
} }

View File

@@ -30,4 +30,15 @@ public interface VehicleTwoService {
* @return JSONObject返回前端参数~ * @return JSONObject返回前端参数~
*/ */
JSONObject boxIn(JSONObject whereJson); JSONObject boxIn(JSONObject whereJson);
/**
*
* @param whereJson {
* box_no: 木箱号
* vehicle_code: 载具号
* point_code: 点位
* }
* @return JSONObject返回前端参数~
*/
JSONObject returnIn(JSONObject whereJson);
} }

View File

@@ -149,4 +149,13 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
return result; return result;
} }
@Override
public JSONObject returnIn(JSONObject whereJson) {
// 调用接口
inBoxManageService.returnIn(whereJson);
JSONObject result = new JSONObject();
result.put("message", "入库成功!");
return result;
}
} }

View File

@@ -85,7 +85,7 @@ public class TwoLashTask extends AbstractAcsTask {
interaction_json.put("length",dao.get(0).getBox_length()); interaction_json.put("length",dao.get(0).getBox_length());
interaction_json.put("weight",dao.get(0).getBox_width()); interaction_json.put("weight",dao.get(0).getBox_width());
interaction_json.put("height",dao.get(0).getBox_high()); interaction_json.put("height",dao.get(0).getBox_high());
interaction_json.put("template",dao.get(0).getBox_high()); interaction_json.put("template","2");
interaction_json.put("bindingTimes","1"); interaction_json.put("bindingTimes","1");
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);
@@ -214,7 +214,7 @@ public class TwoLashTask extends AbstractAcsTask {
json.put("create_name", SecurityUtils.getCurrentUsername()); json.put("create_name", SecurityUtils.getCurrentUsername());
json.put("create_time", DateUtil.now()); json.put("create_time", DateUtil.now());
json.put("priority", "1"); json.put("priority", "1");
json.put("acs_task_type", "7"); json.put("acs_task_type", "6");
WQLObject.getWQLObject("SCH_BASE_Task").insert(json); WQLObject.getWQLObject("SCH_BASE_Task").insert(json);
return json.getString("task_id"); return json.getString("task_id");

View File

@@ -72,7 +72,8 @@ public class TwoOutTask extends AbstractAcsTask {
.task_type(json.getString("acs_task_type")) .task_type(json.getString("acs_task_type"))
.start_device_code(json.getString("point_code1")) .start_device_code(json.getString("point_code1"))
.next_device_code(json.getString("point_code2")) .next_device_code(json.getString("point_code2"))
.vehicle_code(json.getString("vehicle_code2")) .vehicle_code(json.getString("vehicle_code"))
.interaction_json(json.getJSONObject("request_param"))
.priority(json.getString("priority")) .priority(json.getString("priority"))
.class_type(json.getString("task_type")) .class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type)) .dtl_type(String.valueOf(dtl_type))
@@ -179,6 +180,7 @@ public class TwoOutTask extends AbstractAcsTask {
json.put("task_group_id", form.getString("task_group_id")); json.put("task_group_id", form.getString("task_group_id"));
json.put("is_auto_issue", form.getString("is_auto_issue")); json.put("is_auto_issue", form.getString("is_auto_issue"));
json.put("table_fk", form.getString("table_fk")); json.put("table_fk", form.getString("table_fk"));
json.put("request_param", form.getString("request_param"));
json.put("sort_seq", form.getIntValue("sort_seq")); json.put("sort_seq", form.getIntValue("sort_seq"));
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode()); json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());

View File

@@ -86,7 +86,7 @@ public enum IOSEnum {
ZDEPTH_STRUCT(MapOf.of("", "1","","2","","3")), ZDEPTH_STRUCT(MapOf.of("", "1","","2","","3")),
//是否自动下发 //是否自动下发
IS_SEND(MapOf.of("", "1","","2")), IS_SEND(MapOf.of("", "1","","0")),
//外部系统 //外部系统
EXT_SYSTEM(MapOf.of("mes", "mes","sap","sap","crm","crm")), EXT_SYSTEM(MapOf.of("mes", "mes","sap","sap","crm","crm")),
@@ -95,7 +95,7 @@ public enum IOSEnum {
PRODUCT_AREA(MapOf.of("BLK", "BLK")), PRODUCT_AREA(MapOf.of("BLK", "BLK")),
//acs申请任务 //acs申请任务
ACSTOLMS_TYPE(MapOf.of("成品入库任务", "1","空盘入库","2","空盘出库","3","异常处理位","4","木箱入库","5","贴标","1","捆扎","2")), ACSTOLMS_TYPE(MapOf.of("成品入库任务", "1","空盘入库","2","空盘出库","3","异常处理位","4","木箱入库","5","退货入库","6","贴标","1","捆扎","2")),
; ;
private Map<String, String> code; private Map<String, String> code;

View File

@@ -13,6 +13,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.nl.b_lms.pdm_manage.enums.SUBEnum; import org.nl.b_lms.pdm_manage.enums.SUBEnum;
import org.nl.b_lms.sch.tasks.TwoOutExceptionalTask; import org.nl.b_lms.sch.tasks.TwoOutExceptionalTask;
import org.nl.b_lms.sch.tasks.TwoOutTask; import org.nl.b_lms.sch.tasks.TwoOutTask;
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.IStIvtIostorinvOutService; import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvOutService;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService; import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
@@ -97,6 +99,9 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
@Autowired @Autowired
private InBussManageService inBussManageService; private InBussManageService inBussManageService;
@Autowired
private IBstIvtBoxinfoService iBstIvtBoxinfoService;
@Override @Override
@Transactional @Transactional
public String insertMst(JSONObject whereJson) { public String insertMst(JSONObject whereJson) {
@@ -1219,6 +1224,13 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
} }
jsonTaskParam.put("task_group_id", task_group_id); jsonTaskParam.put("task_group_id", task_group_id);
jsonTaskParam.put("is_auto_issue", is_auto_issue); jsonTaskParam.put("is_auto_issue", is_auto_issue);
JSONObject request_param = new JSONObject();
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, json.getString("storagevehicle_code"))
);
request_param.put("containerType", boxDao.getVehicle_type());
request_param.put("request_param", request_param);
jsonTaskParam.put("table_fk", disDaoList.get(0).getIostorinv_id().toString()); jsonTaskParam.put("table_fk", disDaoList.get(0).getIostorinv_id().toString());
if (json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("")) || if (json.getString("zdepth").equals(IOSEnum.ZDEPTH_STRUCT.code("")) ||
@@ -1407,6 +1419,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
mstDao.setDetail_count(BigDecimal.valueOf(whereJson.getJSONArray("tableData").size())); mstDao.setDetail_count(BigDecimal.valueOf(whereJson.getJSONArray("tableData").size()));
mstDao.setRemark(whereJson.getString("remark")); mstDao.setRemark(whereJson.getString("remark"));
mstDao.setTotal_qty(whereJson.getBigDecimal("total_qty")); mstDao.setTotal_qty(whereJson.getBigDecimal("total_qty"));
mstDao.setBill_type(whereJson.getString("bill_type"));
mstDao.setUpdate_optid(Long.parseLong(SecurityUtils.getCurrentUserId())); mstDao.setUpdate_optid(Long.parseLong(SecurityUtils.getCurrentUserId()));
mstDao.setUpdate_optname(SecurityUtils.getCurrentNickName()); mstDao.setUpdate_optname(SecurityUtils.getCurrentNickName());
mstDao.setUpdate_time(DateUtil.now()); mstDao.setUpdate_time(DateUtil.now());

View File

@@ -269,6 +269,67 @@ public class InBoxManageServiceImpl implements InBoxManageService {
taskBean.immediateNotifyAcs(null); taskBean.immediateNotifyAcs(null);
} }
@Override
public void returnIn(JSONObject whereJson) {
// 载具表
WQLObject vehicleTab = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
// 载具扩展属性表
// WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
/*
* 查询mes木箱信息插入木箱信息表
*/
// TODO 调用mes接口
JSONObject mesBoxInfo = new JSONObject();
// 插入木箱信息表
// iBstIvtBoxinfoService.mesInsert(mesBoxInfo);
/*
* 插入木箱对应载具表
*/
//查询对应的木箱信息
// 查询木箱信息
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("box_no"))
);
if (boxDao == null) {
throw new BadRequestException("木箱不存在!");
}
JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'")
.uniqueResult(0);
// if (ObjectUtil.isEmpty(jsonVehicle)) {
// throw new BadRequestException("载具不存在!");
// }
// JSONObject jsonVeExt = new JSONObject();
// jsonVeExt.put("storagevehicleext_id", IdUtil.getLongId());
// jsonVeExt.put("storagevehicle_id", jsonVehicle.getLongValue("storagevehicle_id"));
// jsonVeExt.put("storagevehicle_code", jsonVehicle.getString("storagevehicle_code"));
// jsonVeExt.put("storagevehicle_type", jsonVehicle.getString("storagevehicle_type"));
// jsonVeExt.put("pcsn", whereJson.getString("box_no"));
// jsonVeExt.put("device_uuid", IdUtil.getLongId());
// veExtTab.insert(jsonVeExt);
// 下发桁架任务
JSONObject taskParam = new JSONObject();
taskParam.put("task_type", "010713");
taskParam.put("start_device_code", whereJson.getString("point_code"));
taskParam.put("next_device_code", "CK2005");
taskParam.put("vehicle_code", whereJson.getString("box_no"));
// taskParam.put("vehicle_code2", whereJson.getString("box_no"));
JSONObject param = new JSONObject();
param.put("layer", whereJson.getString("layer"));
param.put("length", boxDao.getBox_length());
param.put("width", boxDao.getBox_width());
param.put("height", boxDao.getBox_high());
param.put("containerType", boxDao.getVehicle_type());
param.put("barcode", whereJson.getString("box_no"));
taskParam.put("request_param", param.toString());
TwoInBoxTrussTask taskBean = new TwoInBoxTrussTask();
taskBean.createTask(taskParam);
taskBean.immediateNotifyAcs(null);
}
@Override @Override
@Transactional @Transactional
public String taskExceptional(JSONObject jsonObject) { public String taskExceptional(JSONObject jsonObject) {

View File

@@ -220,7 +220,7 @@ public class InBussManageServiceImpl implements InBussManageService {
mst.put("bill_status", IOSEnum.BILL_STATUS.code("生成")); mst.put("bill_status", IOSEnum.BILL_STATUS.code("生成"));
mst.put("total_qty", subList.stream().map(row -> row.getDoubleValue("net_weight")).reduce(Double::sum).orElse(0.00)); mst.put("total_qty", subList.stream().map(row -> row.getDoubleValue("net_weight")).reduce(Double::sum).orElse(0.00));
mst.put("detail_count", subList.size()); mst.put("detail_count", subList.size());
mst.put("bill_type", IOSEnum.IN_TYPE.code("生产入库")); mst.put("bill_type", jsonObject.getString("bill_type"));
mst.put("biz_date", DateUtil.today()); mst.put("biz_date", DateUtil.today());
mst.put("remark", ""); mst.put("remark", "");

View File

@@ -198,21 +198,15 @@ public class LashManageServiceImpl implements LashManageService {
// TODO 贴标流程 // TODO 贴标流程
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
// 查询木箱对应托盘信息
JSONObject jsonExt = extTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonExt)) {
throw new BadRequestException("此托盘上没有木箱!"+whereJson.getString("vehicle_code"));
}
// 查询木箱信息 // 查询木箱信息
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne( BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda() new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, jsonExt.getString("pcsn")) .eq(BstIvtBoxinfo::getBox_no, whereJson.getString("vehicle_code"))
); );
// 返回参数 // 返回参数
result.put("length", boxDao.getBox_length()); result.put("length", boxDao.getBox_length());
result.put("weight", boxDao.getBox_width()); result.put("width", boxDao.getBox_width());
result.put("height", boxDao.getBox_high()); result.put("height", boxDao.getBox_high());
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(""));

View File

@@ -46,4 +46,6 @@ public interface InBoxManageService {
*/ */
String taskExceptional(JSONObject jsonObject); String taskExceptional(JSONObject jsonObject);
void returnIn(JSONObject whereJson);
} }

View File

@@ -1835,6 +1835,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
if (ObjectUtil.isEmpty(whereJson.getString("material_barcode"))) { if (ObjectUtil.isEmpty(whereJson.getString("material_barcode"))) {
throw new BadRequestException("子卷号不能为空!"); throw new BadRequestException("子卷号不能为空!");
} }
whereJson.put("bill_type", IOSEnum.IN_TYPE.code("生产入库"));
inBussManageService.inTask(whereJson); inBussManageService.inTask(whereJson);
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘入库"))) { } else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘入库"))) {
// 2-空盘入库 // 2-空盘入库
@@ -1855,7 +1856,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject jsonTaskParam = new JSONObject(); JSONObject jsonTaskParam = new JSONObject();
jsonTaskParam.put("task_type", "010710"); jsonTaskParam.put("task_type", "010710");
jsonTaskParam.put("start_device_code", whereJson.getString("device_code")); jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
jsonTaskParam.put("next_device_code", "B1_ERRO"); jsonTaskParam.put("next_device_code", "RK1003");
jsonTaskParam.put("vehicle_code", whereJson.getString("material_barcode")); jsonTaskParam.put("vehicle_code", whereJson.getString("material_barcode"));
TwoBoxExcepTask taskBean = new TwoBoxExcepTask(); TwoBoxExcepTask taskBean = new TwoBoxExcepTask();
taskBean.createTask(jsonTaskParam); taskBean.createTask(jsonTaskParam);
@@ -1863,6 +1864,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
// 5-木箱入库 // 5-木箱入库
whereJson.put("box_no", whereJson.getString("material_barcode")); whereJson.put("box_no", whereJson.getString("material_barcode"));
inBoxManageService.inBox(whereJson); inBoxManageService.inBox(whereJson);
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("退货入库"))) {
// 6-退货入库
whereJson.put("bill_type", IOSEnum.IN_TYPE.code("退货入库"));
whereJson.put("box_no", whereJson.getString("material_barcode"));
inBussManageService.inTask(whereJson);
} }
result.put("status", HttpStatus.OK.value()); result.put("status", HttpStatus.OK.value());
result.put("message", "下发成功!"); result.put("message", "下发成功!");

View File

@@ -366,7 +366,7 @@ export default {
var area_type = '1585167595403874304' var area_type = '1585167595403874304'
if (this.storId.toString() === '1582991156504039455') { if (this.storId.toString() === '1582991156504039455') {
area_type = '1760141408548818944' area_type = '1791031105286180864'
} }
crudPoint.getPoint({ 'area_type': area_type }).then(res => { crudPoint.getPoint({ 'area_type': area_type }).then(res => {
this.pointList = res this.pointList = res
@@ -668,6 +668,7 @@ export default {
'checked': this.checked, 'checked': this.checked,
'stor_id': this.mstrow.stor_id 'stor_id': this.mstrow.stor_id
} }
debugger
checkoutbill.allSetPoint(data).then(res => { checkoutbill.allSetPoint(data).then(res => {
this.queryTableDdis(this.currentRow.iostorinvdtl_id) this.queryTableDdis(this.currentRow.iostorinvdtl_id)
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)