fix: 1
This commit is contained in:
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.pda.service.PrintTableTwoService;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiContainerinfoService;
|
||||
@@ -27,9 +28,6 @@ import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.redisson.api.RLock;
|
||||
@@ -76,6 +74,7 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
|
||||
@Resource
|
||||
private PrintTableTwoService printTableTwoService;
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
@@ -230,6 +229,7 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
|
||||
/**
|
||||
* 查询没有搬运任务的空的目标点位
|
||||
*
|
||||
* @param ivtType 点位类型
|
||||
* @param ivtStatus 库存状态
|
||||
* @param pointCode 取货还是放货
|
||||
@@ -490,8 +490,6 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取等待点
|
||||
*/
|
||||
@@ -512,8 +510,6 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 更新点位状态
|
||||
*
|
||||
@@ -776,8 +772,6 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
@@ -808,7 +802,6 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
* 手持子卷质检
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject update(JSONObject whereJson) {
|
||||
JSONObject result = new JSONObject();
|
||||
if (StringUtils.isBlank(whereJson.getString("ivt_status"))) {
|
||||
@@ -829,7 +822,7 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
return result;
|
||||
}
|
||||
dtoList = bstIvtPackageinfoivtMapper.selectList(new LambdaQueryWrapper<BstIvtPackageinfoivt>().eq(BstIvtPackageinfoivt::getContainer_name, whereJson.getString("container_name")));
|
||||
if (CollectionUtils.isEmpty(dtoList)) {
|
||||
if (ObjectUtils.isEmpty(dtoList)) {
|
||||
result.put("status", org.springframework.http.HttpStatus.BAD_REQUEST.value());
|
||||
result.put("message", "子卷号或点位信息有误,请核对是否存在!");
|
||||
return result;
|
||||
@@ -845,36 +838,11 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
return result;
|
||||
}
|
||||
if (whereJson.getString("ivt_status").equals(PackageInfoIvtEnum.IVT_STATUS.code("合格品"))) {
|
||||
//子卷下料信息MES传递给LMS
|
||||
iPdmBiContainerinfoService.createSubInfoByContainer(whereJson.getString("container_name"));
|
||||
//获取子卷最新信息
|
||||
jo.put("container_name", whereJson.getString("container_name"));
|
||||
lmsToMesService.getInspectionResult(jo);
|
||||
|
||||
/*
|
||||
* 调用打印服务进行打印内标管表
|
||||
*/
|
||||
// 判断是否自动打标
|
||||
String auto_table = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("AUTO_PRINT_TABLE").getValue();
|
||||
if (auto_table.equals(IOSEnum.IS_NOTANDYES.code("是"))) {
|
||||
// 内标默认打印机
|
||||
String within_table = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("WITHIN_PEINT_TWO").getValue();
|
||||
JSONObject within_print = WQLObject.getWQLObject("pdm_bi_printinfo")
|
||||
.query("print_name = '" + within_table + "'")
|
||||
.uniqueResult(0);
|
||||
// 管标默认打印机
|
||||
String pipe_table = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("PIPE_PEINT_TWO").getValue();
|
||||
JSONObject pipe_print = WQLObject.getWQLObject("pdm_bi_printinfo")
|
||||
.query("print_name = '" + pipe_table + "'")
|
||||
.uniqueResult(0);
|
||||
// 组织数据
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("pcsn", whereJson.getString("container_name"));
|
||||
param.put("print_code", pipe_print.getString("print_id"));
|
||||
printTableTwoService.pipeTable(param);
|
||||
|
||||
param.put("print_code", within_print.getString("print_id"));
|
||||
printTableTwoService.withinTable(param);
|
||||
}
|
||||
//子卷下料信息MES传递给LMS
|
||||
iPdmBiContainerinfoService.createSubInfoByContainer(whereJson.getString("container_name"));
|
||||
}
|
||||
updateWrapper.set("container_name", dtoList.get(0).getContainer_name());
|
||||
updateWrapper.set("ivt_status", whereJson.getString("ivt_status"));
|
||||
@@ -883,10 +851,11 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
else if (StringUtils.isNotBlank(whereJson.getString("container_name")) && StringUtils.isNotBlank(whereJson.getString("pointCode"))) {
|
||||
dtoList = bstIvtPackageinfoivtMapper.selectList(new LambdaQueryWrapper<BstIvtPackageinfoivt>().eq(BstIvtPackageinfoivt::getPoint_code, whereJson.getString("pointCode").equals("1") ? "ZXQ_135" : "ZXQ_136"));
|
||||
if (whereJson.getString("ivt_status").equals(PackageInfoIvtEnum.IVT_STATUS.code("合格品"))) {
|
||||
//子卷下料信息MES传递给LMS
|
||||
iPdmBiContainerinfoService.createSubInfoByContainer(whereJson.getString("container_name"));
|
||||
//获取子卷最新信息
|
||||
jo.put("container_name", whereJson.getString("container_name"));
|
||||
lmsToMesService.getInspectionResult(jo);
|
||||
//子卷下料信息MES传递给LMS
|
||||
iPdmBiContainerinfoService.createSubInfoByContainer(whereJson.getString("container_name"));
|
||||
updateWrapper.set("container_name", whereJson.getString("container_name"));
|
||||
updateWrapper.set("ivt_status", PackageInfoIvtEnum.IVT_STATUS.code("合格品"));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user