现场修改
This commit is contained in:
@@ -41,7 +41,7 @@ public class ToErpApiController {
|
||||
/**
|
||||
* 回传其他入库单
|
||||
*/
|
||||
@Scheduled(fixedDelay = 1500)
|
||||
//@Scheduled(fixedDelay = 1500)
|
||||
@RequestMapping("/callbackInDeliveryNotice")
|
||||
@ResponseBody
|
||||
public void callbackInDeliveryNotice() {
|
||||
@@ -51,7 +51,7 @@ public class ToErpApiController {
|
||||
/**
|
||||
* 回传其他出库单
|
||||
*/
|
||||
@Scheduled(fixedDelay = 1500)
|
||||
// @Scheduled(fixedDelay = 1500)
|
||||
@RequestMapping("/callbackOutDeliveryNotice")
|
||||
@ResponseBody
|
||||
public void callbackDeliveryOutNotice() {
|
||||
@@ -60,7 +60,7 @@ public class ToErpApiController {
|
||||
/**
|
||||
* 移库回调接口
|
||||
*/
|
||||
@Scheduled(fixedDelay = 1500)
|
||||
// @Scheduled(fixedDelay = 1500)
|
||||
@RequestMapping("/moveCargoSpace")
|
||||
@ResponseBody
|
||||
public void moveCargoSpace(){
|
||||
|
||||
@@ -20,4 +20,5 @@ public class RequestEnter {
|
||||
private String type;
|
||||
|
||||
private String flag;
|
||||
private String taskNo;
|
||||
}
|
||||
|
||||
@@ -59,4 +59,6 @@ public interface IToWmsService {
|
||||
* 作废物料
|
||||
*/
|
||||
AjaxResult InvalidProduct(ErpProduct erpProduct);
|
||||
|
||||
AjaxResult requestEnterByTaskNo(RequestEnter requestEnter);
|
||||
}
|
||||
|
||||
@@ -279,6 +279,7 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
out.setSpare3(deliveryNoticeVo.getApproveDate());//审核时间
|
||||
out.setSpare4(deliveryNoticeVo.getApproveMan());//审核人
|
||||
out.setSpare5(deliveryNoticeVo.getRemark());
|
||||
out.setSpare7(deliveryNoticeVo.getDestination());
|
||||
|
||||
if (exist == null) {
|
||||
outStockoutService.insertOutStockout(out);
|
||||
@@ -309,8 +310,8 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
d.setSpare3(item.getTopMaterial());
|
||||
d.setSpare4(deliveryNoticeVo.getProjectNo());
|
||||
// d.setSpare6(item.getLineNo());
|
||||
d.setSpare8(deliveryNoticeVo.getOutType());
|
||||
d.setRemark(item.getRemark());
|
||||
//d.setSpare8(deliveryNoticeVo.getDestination());
|
||||
|
||||
|
||||
try {
|
||||
|
||||
@@ -98,21 +98,24 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
String trayCode = requestEnter.getTrayCode();
|
||||
MydoJob inJob = mydoJobMapper.selectInJobByTrayCode(trayCode);
|
||||
if(inJob != null && Integer.parseInt(inJob.getInOrOut()) < 20){
|
||||
if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
|
||||
return AjaxResult.success(inJob);
|
||||
}else{
|
||||
//分配货位
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
// if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
|
||||
// return AjaxResult.success(inJob);
|
||||
// }else{
|
||||
// //分配货位
|
||||
// HashMap<String, Object> map = new HashMap<>();
|
||||
//
|
||||
// map.put("v_tray_code", trayCode);
|
||||
// mydoJobMapper.allotInJobSpace(map);
|
||||
// if (!"10".equals(map.get("v_result").toString())) {
|
||||
// return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
// }else{
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
// MydoJob inJob2 = mydoJobMapper.selectInJobByTrayCode(trayCode);
|
||||
return AjaxResult.success(inJob);
|
||||
|
||||
map.put("v_tray_code", trayCode);
|
||||
mydoJobMapper.allotInJobSpace(map);
|
||||
if (!"10".equals(map.get("v_result").toString())) {
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
MydoJob inJob2 = mydoJobMapper.selectInJobByTrayCode(trayCode);
|
||||
return AjaxResult.success(inJob2);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.error("该条码无入库任务,请扫码绑定!");
|
||||
}
|
||||
@@ -196,14 +199,19 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
return AjaxResult.error("任务不存在");
|
||||
}
|
||||
MydoJob outJob = outMydoJobs.get(0);
|
||||
if ("30".equals(outJob.getInOrOut())){
|
||||
//移库作业
|
||||
mydoJobService.ykCompleted(outJob);
|
||||
}else {
|
||||
//出库作业
|
||||
outJob.setExecutionPhase("2");
|
||||
mydoJobService.updateMydoJob(outJob);
|
||||
//出库作业
|
||||
outJob.setExecutionPhase("2");
|
||||
mydoJobService.updateMydoJob(outJob);
|
||||
break;
|
||||
case "7":
|
||||
//移库作业
|
||||
mydoJobParam.setTaskNo(wmsJobRequest.getTaskNo());
|
||||
List<MydoJob> ykMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
|
||||
if (ykMydoJobs.isEmpty()) {
|
||||
return AjaxResult.error("任务不存在");
|
||||
}
|
||||
MydoJob ykJob = ykMydoJobs.get(0);
|
||||
mydoJobService.ykCompleted(ykJob);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -390,5 +398,30 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
return AjaxResult.error(erpProduct.getSys_MainId()+"物料不存在");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult requestEnterByTaskNo(RequestEnter requestEnter) {
|
||||
String taskNo = requestEnter.getTaskNo();
|
||||
MydoJob inJob = mydoJobMapper.selectInJobByTaskNo(taskNo);
|
||||
if(inJob != null && Integer.parseInt(inJob.getInOrOut()) < 20){
|
||||
if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
|
||||
return AjaxResult.success(inJob);
|
||||
}else{
|
||||
//分配货位
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
|
||||
map.put("v_tray_code", inJob.getTrayCode());
|
||||
mydoJobMapper.allotInJobSpace(map);
|
||||
if (!"10".equals(map.get("v_result").toString())) {
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
MydoJob inJob2 = mydoJobMapper.selectInJobByTaskNo(taskNo);
|
||||
return AjaxResult.success(inJob2);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.error("该条码无入库任务,请扫码绑定!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -82,6 +82,9 @@ public interface MydoJobMapper
|
||||
|
||||
MydoJob selectInJobByTrayCode(@Param("trayCode") String trayCode);
|
||||
|
||||
MydoJob selectInJobByTaskNo(@Param("taskNo") String taskNo);
|
||||
|
||||
|
||||
void allotInJobSpace(HashMap<String, Object> map);
|
||||
|
||||
void ykCompleted(HashMap<String, Object> map);
|
||||
|
||||
@@ -532,6 +532,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
public void ykCompleted(MydoJob outJob) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_job_id", outJob.getJobId());
|
||||
map.put("v_result", null);
|
||||
mydoJobMapper.ykCompleted(map);
|
||||
if (!"10".equals(map.get("v_result").toString())) {
|
||||
log.error("移库任务处理异常 异常代码{}", map.get("v_result"));
|
||||
|
||||
Reference in New Issue
Block a user