代码备份

master
anthonywj 2 years ago
parent e514676578
commit 1569560f5f

@ -193,7 +193,7 @@ public class ConstantStatus {
public static final int FROM_PDAUN = 4; //pda未校验 public static final int FROM_PDAUN = 4; //pda未校验
public static final int FROM_PC = 5; //pc端扫码精灵 public static final int FROM_PC = 5; //pc端扫码精灵
public static final int FROM_CHANGE = 6; //单据流转 public static final int FROM_CHANGE = 6; //单据流转
public static final int FROM_UDISP = 7; //供应商平台 public static final int FROM_UDISP = 7; //供应商平台|| UDI管理系统
public static final int FROM_PEACE_CHANGE = 8; //平衡补单 public static final int FROM_PEACE_CHANGE = 8; //平衡补单
public static final int FROM_REVIEW = 9; //单据验收直接补单 public static final int FROM_REVIEW = 9; //单据验收直接补单
public static final int FROM_COPY = 10; //单据复制 public static final int FROM_COPY = 10; //单据复制

@ -51,70 +51,70 @@ public class ioCodeRelController {
//判断码有没有重复 //判断码有没有重复
List<IoCodeRelEntity> list=ioCodeRelServicec.selectIoCodeRelByCode("",code); List<IoCodeRelEntity> list = ioCodeRelServicec.selectIoCodeRelByCode("", code);
if(list.size()>0){ if (list.size() > 0) {
return ResultVOUtils.error(999,"此码已做关联!"); return ResultVOUtils.error(999, "此码已做关联!");
} }
if(StrUtil.isNotEmpty(code)){ if (StrUtil.isNotEmpty(code)) {
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(code); UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
UdiProductEntity udiProductEntity=udiProductService.findByNameCode(udiEntity.getUdi()); UdiProductEntity udiProductEntity = udiProductService.findByNameCode(udiEntity.getUdi());
if(udiProductEntity.getPackLevel()!=null){ if (udiProductEntity.getPackLevel() != null) {
if(Integer.valueOf(udiProductEntity.getPackLevel())>1){ if (Integer.valueOf(udiProductEntity.getPackLevel()) > 1) {
return ResultVOUtils.success(udiProductEntity.getBhxjcpbm()); return ResultVOUtils.success(udiProductEntity.getBhxjcpbm());
} }
} }
} }
return ResultVOUtils.error(999,"扫码错误!"); return ResultVOUtils.error(999, "扫码错误!");
} }
@GetMapping("/udi/ioCode/Rel/checkLowProduct") @GetMapping("/udi/ioCode/Rel/checkLowProduct")
public BaseResponse checkLowProduct(String upCode,String lowCode) { public BaseResponse checkLowProduct(String upCode, String lowCode) {
UdiProductEntity udiProductEntity=new UdiProductEntity(); UdiProductEntity udiProductEntity = new UdiProductEntity();
//查询上级产品信息 //查询上级产品信息
if(StrUtil.isNotEmpty(upCode)){ if (StrUtil.isNotEmpty(upCode)) {
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(upCode); UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(upCode);
udiProductEntity=udiProductService.findByNameCode(udiEntity.getUdi()); udiProductEntity = udiProductService.findByNameCode(udiEntity.getUdi());
} }
//判断码有没有重复 //判断码有没有重复
List<IoCodeRelEntity> list=ioCodeRelServicec.selectIoCodeRelByCode(lowCode,upCode); List<IoCodeRelEntity> list = ioCodeRelServicec.selectIoCodeRelByCode(lowCode, upCode);
if(list.size()>0){ if (list.size() > 0) {
return ResultVOUtils.error(999,"此码已做关联!"); return ResultVOUtils.error(999, "此码已做关联!");
} }
//判断条数是否超出 //判断条数是否超出
Long count=ioCodeRelServicec.selectIoCodeRelCount(upCode); Long count = ioCodeRelServicec.selectIoCodeRelCount(upCode);
if(count>=udiProductEntity.getBhxjsl()){ if (count >= udiProductEntity.getBhxjsl()) {
return ResultVOUtils.error(999,"数量超出!"); return ResultVOUtils.error(999, "数量超出!");
} }
//查询下级产品信息 //查询下级产品信息
if(StrUtil.isNotEmpty(lowCode)){ if (StrUtil.isNotEmpty(lowCode)) {
UdiEntity udiEntity=FilterUdiUtils.getGS1Udi(lowCode); UdiEntity udiEntity = FilterUdiUtils.getGS1Udi(lowCode);
UdiProductEntity udiProductEntity1=udiProductService.findByNameCode(udiEntity.getUdi()); UdiProductEntity udiProductEntity1 = udiProductService.findByNameCode(udiEntity.getUdi());
if(udiProductEntity!=null){ if (udiProductEntity != null) {
if(udiProductEntity1.getNameCode().equals(udiProductEntity.getBhxjcpbm())){ if (udiProductEntity1.getNameCode().equals(udiProductEntity.getBhxjcpbm())) {
IoCodeRelEntity ioCodeRelEntity=new IoCodeRelEntity(); IoCodeRelEntity ioCodeRelEntity = new IoCodeRelEntity();
ioCodeRelEntity.setCode(lowCode); ioCodeRelEntity.setCode(lowCode);
ioCodeRelEntity.setParentCode(upCode); ioCodeRelEntity.setParentCode(upCode);
ioCodeRelEntity.setNameCode(udiProductEntity1.getNameCode()); ioCodeRelEntity.setNameCode(udiProductEntity1.getNameCode());
ioCodeRelEntity.setDiType(udiProductEntity1.getDiType()); ioCodeRelEntity.setDiType(udiProductEntity1.getDiType());
ioCodeRelEntity.setLevel(udiProductEntity1.getPackLevel()); ioCodeRelEntity.setLevel(udiProductEntity1.getPackLevel());
ioCodeRelEntity.setProduceDate(udiProductEntity1.getProduceDate()); ioCodeRelEntity.setProduceDate(udiProductEntity1.getProduceDate());
ioCodeRelEntity.setExpireDate(udiProductEntity1.getExpireDate()); ioCodeRelEntity.setExpireDate(udiProductEntity1.getExpireDate());
ioCodeRelEntity.setSerialNo(udiProductEntity1.getSerialNo()); ioCodeRelEntity.setSerialNo(udiProductEntity1.getSerialNo());
ioCodeRelEntity.setCreateTime(new Date()); ioCodeRelEntity.setCreateTime(new Date());
ioCodeRelEntity.setUpdateTime(new Date()); ioCodeRelEntity.setUpdateTime(new Date());
ioCodeRelServicec.insert(ioCodeRelEntity); ioCodeRelServicec.insert(ioCodeRelEntity);
return ResultVOUtils.success(); return ResultVOUtils.success();
}else{ } else {
return ResultVOUtils.error(999,"该条码不属于下级产品!"); return ResultVOUtils.error(999, "该条码不属于下级产品!");
} }
} }
} }
return ResultVOUtils.error(999,""); return ResultVOUtils.error(999, "");
} }
@GetMapping("/udi/ioCode/Rel/delectList") @GetMapping("/udi/ioCode/Rel/delectList")
@ -131,13 +131,13 @@ public class ioCodeRelController {
@GetMapping("/udi/ioCode/Rel/del") @GetMapping("/udi/ioCode/Rel/del")
public BaseResponse del(String code,String parentCode) { public BaseResponse del(String code, String parentCode) {
int count=ioCodeRelServicec.delIoCodeRel(code,parentCode); int count = ioCodeRelServicec.delIoCodeRel(code, parentCode);
if(count>0){ if (count > 0) {
return ResultVOUtils.success("删除成功"); return ResultVOUtils.success("删除成功");
}else{ } else {
return ResultVOUtils.error(999,"删除失败"); return ResultVOUtils.error(999, "删除失败");
} }
} }

@ -102,6 +102,7 @@ public class IdcServiceImpl implements IdcService {
return ResultVOUtils.success(list); return ResultVOUtils.success(list);
} }
@Override @Override
public BaseResponse download(HttpServletRequest request,Map<String,Object> params) { public BaseResponse download(HttpServletRequest request,Map<String,Object> params) {
Map<String,Object> map = dbDao.get("select * from basic_upload_status where taskId='"+params.get("taskId")+"'"); Map<String,Object> map = dbDao.get("select * from basic_upload_status where taskId='"+params.get("taskId")+"'");

@ -1,6 +1,6 @@
spring: spring:
profiles: profiles:
active: pro active: dev
jmx: jmx:
enabled: false enabled: false

Loading…
Cancel
Save