opt:株洲中钨修改
This commit is contained in:
@@ -547,7 +547,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
param.put("stor_id", sectattr.getStor_id());
|
param.put("stor_id", sectattr.getStor_id());
|
||||||
param.put("supp_code", groupPlate.getSupp_code());
|
param.put("supp_code", groupPlate.getSupp_code());
|
||||||
param.put("supp_name", groupPlate.getSupp_name());
|
param.put("supp_name", groupPlate.getSupp_name());
|
||||||
pdaIosInService.zwConfirmReturnMaterial(param);
|
return MesResponse.requestParamOk(pdaIosInService.zwConfirmReturnMaterial(param));
|
||||||
|
|
||||||
} else if ("2".equals(dto.getTask_type())) {
|
} else if ("2".equals(dto.getTask_type())) {
|
||||||
//退空桶
|
//退空桶
|
||||||
|
|||||||
@@ -143,6 +143,14 @@ public class PdaIosOutController {
|
|||||||
return new ResponseEntity<>(pdaIosOutService.getMaterialSuppByVehicleCode(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(pdaIosOutService.getMaterialSuppByVehicleCode(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/getMaterialSuppByDeviceCode")
|
||||||
|
@Log("PDA根据点位获取载具中物料信息")
|
||||||
|
public ResponseEntity<Object> getMaterialSuppByDeviceCode(@RequestBody JSONObject whereJson) {
|
||||||
|
assertNotBlankJson(whereJson, "请求参数不能为空", "device_code");
|
||||||
|
return new ResponseEntity<>(pdaIosOutService.getMaterialSuppByDeviceCode(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/getStructivtByMaterialAndSectCode")
|
@PostMapping("/getStructivtByMaterialAndSectCode")
|
||||||
@Log("根据库区、物料信息获取库存信息")
|
@Log("根据库区、物料信息获取库存信息")
|
||||||
public ResponseEntity<Object> getStructivtByMaterialAndSectCode(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> getStructivtByMaterialAndSectCode(@RequestBody JSONObject whereJson) {
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ public interface PdaIosInService {
|
|||||||
* }
|
* }
|
||||||
* @return PdaResponse
|
* @return PdaResponse
|
||||||
*/
|
*/
|
||||||
PdaResponse zwConfirmReturnMaterial(JSONObject whereJson);
|
String zwConfirmReturnMaterial(JSONObject whereJson);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -132,6 +132,14 @@ public interface PdaIosOutService {
|
|||||||
*/
|
*/
|
||||||
PdaResponse getMaterialSuppByVehicleCode(JSONObject whereJson);
|
PdaResponse getMaterialSuppByVehicleCode(JSONObject whereJson);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PDA根据点位获取料桶号
|
||||||
|
*
|
||||||
|
* @return PdaResponse
|
||||||
|
*/
|
||||||
|
PdaResponse getMaterialSuppByDeviceCode(JSONObject whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询组盘信息通过载具编号
|
* 查询组盘信息通过载具编号
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public PdaResponse zwConfirmReturnMaterial(JSONObject whereJson) {
|
public String zwConfirmReturnMaterial(JSONObject whereJson) {
|
||||||
// 生成回库任务
|
// 生成回库任务
|
||||||
whereJson.put("config_code", IOSConstant.BACK_IN_TASK);
|
whereJson.put("config_code", IOSConstant.BACK_IN_TASK);
|
||||||
whereJson.put("Priority", TaskEnum.ACS_PRIORITY.code("1"));
|
whereJson.put("Priority", TaskEnum.ACS_PRIORITY.code("1"));
|
||||||
@@ -638,7 +638,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
Map<String, Object> jsonDtl = organizeDivData(whereJson);
|
Map<String, Object> jsonDtl = organizeDivData(whereJson);
|
||||||
jsonDtl.put("stragegy_type",StatusEnum.IOBILL_TYPE_IN.code("余料入库"));
|
jsonDtl.put("stragegy_type",StatusEnum.IOBILL_TYPE_IN.code("余料入库"));
|
||||||
// 调用分配,默认自动分配库位
|
// 调用分配,默认自动分配库位
|
||||||
iRawAssistIStorService.divStruct(new JSONObject(jsonDtl));
|
String struct_code = iRawAssistIStorService.divStruct(new JSONObject(jsonDtl));
|
||||||
// 下发任务
|
// 下发任务
|
||||||
sendTask(whereJson);
|
sendTask(whereJson);
|
||||||
//更新组盘表状态
|
//更新组盘表状态
|
||||||
@@ -647,7 +647,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
.set(GroupPlate::getQty,whereJson.getString("qty"))
|
.set(GroupPlate::getQty,whereJson.getString("qty"))
|
||||||
.eq(GroupPlate::getGroup_id, whereJson.getString("group_id")));
|
.eq(GroupPlate::getGroup_id, whereJson.getString("group_id")));
|
||||||
|
|
||||||
return PdaResponse.requestOk();
|
return struct_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -501,6 +501,53 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
return PdaResponse.requestParamOk(outJson);
|
return PdaResponse.requestParamOk(outJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PdaResponse getMaterialSuppByDeviceCode(JSONObject whereJson) {
|
||||||
|
String device_code =whereJson.getString("device_code");
|
||||||
|
//1、查询点位
|
||||||
|
SchBasePoint schBasePoint = iSchBasePointService.getPointByCode(device_code);
|
||||||
|
if(null == schBasePoint){
|
||||||
|
throw new BadRequestException("点位不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(schBasePoint.getVehicle_code())) {
|
||||||
|
throw new BadRequestException("机台" + device_code + "上不存在料桶,请核对!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//查找状态为入库状态的组盘表
|
||||||
|
List<GroupPlate> groupPlateList = iMdPbGroupPlateService.list(new QueryWrapper<GroupPlate>().lambda()
|
||||||
|
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
|
||||||
|
.ne(GroupPlate::getPcsn, "空托盘入库")
|
||||||
|
.eq(GroupPlate::getStoragevehicle_code, schBasePoint.getVehicle_code())
|
||||||
|
.orderByDesc(GroupPlate::getCreate_time)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (CollectionUtils.isEmpty(groupPlateList)) {
|
||||||
|
throw new BadRequestException("机台" + device_code + "上载具组盘信息不存在,请核对!");
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject outJson = new JSONObject();
|
||||||
|
|
||||||
|
//根据物料id获取物料名称等信息
|
||||||
|
|
||||||
|
MdMeMaterialbase materialbase = iMdMeMaterialbaseService.getByCode(groupPlateList.get(0).getMaterial_id(), false);
|
||||||
|
if (materialbase != null) {
|
||||||
|
outJson.put("material_code", materialbase.getMaterial_code());
|
||||||
|
outJson.put("material_name", materialbase.getMaterial_name());
|
||||||
|
outJson.put("material_spec", materialbase.getMaterial_spec());
|
||||||
|
outJson.put("material_model", materialbase.getMaterial_model());
|
||||||
|
}
|
||||||
|
|
||||||
|
outJson.put("vehicle_code", schBasePoint.getVehicle_code());
|
||||||
|
outJson.put("supp_code", groupPlateList.get(0).getSupp_code());
|
||||||
|
outJson.put("supp_name", groupPlateList.get(0).getSupp_name());
|
||||||
|
outJson.put("pscn", groupPlateList.get(0).getPcsn());
|
||||||
|
|
||||||
|
return PdaResponse.requestParamOk(outJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PdaResponse getStructivtByMaterialAndSectCode(JSONObject whereJson) {
|
public PdaResponse getStructivtByMaterialAndSectCode(JSONObject whereJson) {
|
||||||
return PdaResponse.requestParamOk(mdPbStoragevehicleextMapper.queryAll(whereJson));
|
return PdaResponse.requestParamOk(mdPbStoragevehicleextMapper.queryAll(whereJson));
|
||||||
|
|||||||
@@ -38,7 +38,12 @@ public interface IInBillService extends IService<IOStorInv> {
|
|||||||
|
|
||||||
List<IOStorInvDtlDto> getIODtl(Map whereJson);
|
List<IOStorInvDtlDto> getIODtl(Map whereJson);
|
||||||
|
|
||||||
void divStruct(JSONObject whereJson);
|
/**
|
||||||
|
* 库位分配,返回分配的库位
|
||||||
|
* @param whereJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String divStruct(JSONObject whereJson);
|
||||||
|
|
||||||
void zwInDivStruct(JSONObject whereJson);
|
void zwInDivStruct(JSONObject whereJson);
|
||||||
|
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void divStruct(JSONObject param) {
|
public String divStruct(JSONObject param) {
|
||||||
Assert.noNullElements(new Object[]{param.getString("stor_code"), param.getString("sect_code")}, "参数异常");
|
Assert.noNullElements(new Object[]{param.getString("stor_code"), param.getString("sect_code")}, "参数异常");
|
||||||
ArrayList<HashMap> rows = (ArrayList<HashMap>) param.get("tableMater");
|
ArrayList<HashMap> rows = (ArrayList<HashMap>) param.get("tableMater");
|
||||||
JSONObject mst = JSONObject.parseObject(JSON.toJSONString(param));
|
JSONObject mst = JSONObject.parseObject(JSON.toJSONString(param));
|
||||||
@@ -448,6 +448,8 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
|
|||||||
ios.setUpdate_time(now);
|
ios.setUpdate_time(now);
|
||||||
ios.setBill_status(disCount > 0 ? IOSEnum.BILL_STATUS.code("分配中") : IOSEnum.BILL_STATUS.code("分配完"));
|
ios.setBill_status(disCount > 0 ? IOSEnum.BILL_STATUS.code("分配中") : IOSEnum.BILL_STATUS.code("分配完"));
|
||||||
ioStorInvMapper.updateById(ios);
|
ioStorInvMapper.updateById(ios);
|
||||||
|
|
||||||
|
return struct_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user