问题修复
This commit is contained in:
parent
f7bb3dc50f
commit
47672c0f50
|
|
@ -105,11 +105,6 @@ public class OptionalEbomConfigEntity implements Serializable {
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private String createdTime;
|
private String createdTime;
|
||||||
|
|
||||||
public String getCreatedTime(){
|
|
||||||
|
|
||||||
return DateUtil.now();
|
|
||||||
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 变更时间
|
* 变更时间
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public class OptionalMbomCompareEntity implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "created_time")
|
@TableField(value = "created_time")
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createdTime;
|
private String createdTime;
|
||||||
/**
|
/**
|
||||||
* 物料编码
|
* 物料编码
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ package com.nflg.product.bomnew.pojo.entity;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -78,7 +79,9 @@ public class OptionalMbomMaterialEntity implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "created_time")
|
@TableField(value = "created_time")
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createdTime;
|
private String createdTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作人编码
|
* 操作人编码
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,9 @@ public class MaterialService {
|
||||||
materialMainDTO.setMaterialName(materialName);
|
materialMainDTO.setMaterialName(materialName);
|
||||||
materialMainDTO.setDrawingNo(drawingNo);
|
materialMainDTO.setDrawingNo(drawingNo);
|
||||||
|
|
||||||
if(StrUtil.isEmpty(drawingNo)){
|
if (StrUtil.isEmpty(drawingNo)) {
|
||||||
materialMainDTO.setMaterialDesc(materialName);
|
materialMainDTO.setMaterialDesc(materialName);
|
||||||
}else {
|
} else {
|
||||||
materialMainDTO.setMaterialDesc(StrUtil.join(" ", StrUtil.isNotBlank(drawingNo) ? drawingNo : "", StrUtil.isNotBlank(materialName) ? materialName : ""));
|
materialMainDTO.setMaterialDesc(StrUtil.join(" ", StrUtil.isNotBlank(drawingNo) ? drawingNo : "", StrUtil.isNotBlank(materialName) ? materialName : ""));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -55,19 +55,28 @@ public class MaterialService {
|
||||||
materialMainDTO.setOpEnum(1);
|
materialMainDTO.setOpEnum(1);
|
||||||
materialMainDTO.setRowId(IdWorker.getId());
|
materialMainDTO.setRowId(IdWorker.getId());
|
||||||
|
|
||||||
// materialMainDTO.setApplyDeptName(SessionUtil.getDepartName());
|
// materialMainDTO.setApplyDeptName(SessionUtil.getDepartName());
|
||||||
// String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySW5mbyI6IntcImRlcGFydE5hbWVcIjpcIuemj-W7uuWNl-aWuei3r-mdouacuuaisOaciemZkOWFrOWPuFwiLFwiZGVwYXJ0Um93SWRcIjoxNTg1MTk1Njk0ODcyNzg0ODk3LFwiZnVsbERlcHROYW1lXCI6XCJPVT3npo_lu7rljZfmlrnot6_pnaLmnLrmorDmnInpmZDlhazlj7gsREM9bmZsZ1wiLFwicXVlcnlEYXRhXCI6MixcInJlYWxOYW1lXCI6XCJhZG1pblwiLFwicm93SWRcIjoxNTQ3NTEyOTc4MDE2OTE5NTUzLFwidXNlckNvZGVcIjpcImFkbWluXCIsXCJ1c2VyTmFtZVwiOlwiYWRtaW5cIn0iLCJleHAiOjE3MDIxNTQ4MjksImp0aSI6IjQ1YjFlYThlLWJjZjgtNDhlZi05M2M3LTg2ZGQwNjZiM2UzYSJ9.vxOgvTYgFqM3FPAY8fwWtULPeF10wiCWzLOxuoPLvbE";
|
|
||||||
String token=SessionUtil.getSessionKey();
|
|
||||||
|
//测试用 生成编码
|
||||||
|
// try {
|
||||||
|
// Thread.sleep(100);
|
||||||
|
// }catch (Exception e){
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// String s=DateUtil.format(DateUtil.date(), "yyyyMMddHHmmssSSS");
|
||||||
|
|
||||||
|
|
||||||
HttpUtils httpUtils = new HttpUtils();
|
HttpUtils httpUtils = new HttpUtils();
|
||||||
|
// String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySW5mbyI6IntcImRlcGFydE5hbWVcIjpcIuemj-W7uuWNl-aWuei3r-mdouacuuaisOaciemZkOWFrOWPuFwiLFwiZGVwYXJ0Um93SWRcIjoxNTg1MTk1Njk0ODcyNzg0ODk3LFwiZnVsbERlcHROYW1lXCI6XCJPVT3npo_lu7rljZfmlrnot6_pnaLmnLrmorDmnInpmZDlhazlj7gsREM9bmZsZ1wiLFwicXVlcnlEYXRhXCI6MixcInJlYWxOYW1lXCI6XCJhZG1pblwiLFwicm93SWRcIjoxNTQ3NTEyOTc4MDE2OTE5NTUzLFwidXNlckNvZGVcIjpcImFkbWluXCIsXCJ1c2VyTmFtZVwiOlwiYWRtaW5cIn0iLCJleHAiOjE3MDIxNTQ4MjksImp0aSI6IjQ1YjFlYThlLWJjZjgtNDhlZi05M2M3LTg2ZGQwNjZiM2UzYSJ9.vxOgvTYgFqM3FPAY8fwWtULPeF10wiCWzLOxuoPLvbE";
|
||||||
|
String token = SessionUtil.getSessionKey();
|
||||||
|
String s = httpUtils.doPost(NacosConfig.getNacosConfig().getAddMaterialUrl(), JSON.toJSONString(materialMainDTO), token);
|
||||||
|
|
||||||
|
AddMaterialResultDTO result = JSON.parseObject(s, AddMaterialResultDTO.class);
|
||||||
String s = httpUtils.doPost(NacosConfig.getNacosConfig().getAddMaterialUrl(),JSON.toJSONString(materialMainDTO),token);
|
if (STATE.Success.getState().equals(result.getState())) {
|
||||||
|
return result.getData().toString();
|
||||||
AddMaterialResultDTO result= JSON.parseObject(s,AddMaterialResultDTO.class);
|
|
||||||
if(STATE.Success.getState().equals(result.getState()) ){
|
|
||||||
return result.getData().toString();
|
|
||||||
}
|
}
|
||||||
VUtils.isTure(true).throwMessage("申请物料失败"+result.getMsg());
|
VUtils.isTure(true).throwMessage("申请物料失败" + result.getMsg());
|
||||||
return s;
|
return s;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -82,9 +91,9 @@ public class MaterialService {
|
||||||
// materialMainDTO.setRowId(IdWorker.getId());
|
// materialMainDTO.setRowId(IdWorker.getId());
|
||||||
|
|
||||||
materialMainDTO.setApplyDeptName(SessionUtil.getDepartName());
|
materialMainDTO.setApplyDeptName(SessionUtil.getDepartName());
|
||||||
// materialMainDTO.setApplyDeptName("福建南方路面机械有限公司");
|
// materialMainDTO.setApplyDeptName("福建南方路面机械有限公司");
|
||||||
// String token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySW5mbyI6IntcImRlcGFydE5hbWVcIjpcIuemj-W7uuWNl-aWuei3r-mdouacuuaisOaciemZkOWFrOWPuFwiLFwiZGVwYXJ0Um93SWRcIjoxNTg1MTk1Njk0ODcyNzg0ODk3LFwiZnVsbERlcHROYW1lXCI6XCJPVT3npo_lu7rljZfmlrnot6_pnaLmnLrmorDmnInpmZDlhazlj7gsREM9bmZsZ1wiLFwicXVlcnlEYXRhXCI6MixcInJlYWxOYW1lXCI6XCJhZG1pblwiLFwicm93SWRcIjoxNTQ3NTEyOTc4MDE2OTE5NTUzLFwidXNlckNvZGVcIjpcImFkbWluXCIsXCJ1c2VyTmFtZVwiOlwiYWRtaW5cIn0iLCJleHAiOjE3MDIwNTI1MzEsImp0aSI6Ijc5NmU2MjZhLWJjYzUtNDY3ZS1iNjFjLWRmOGViNGY0MDYyOSJ9.iq2dyYKpGd7Z60Mmm9ef59CF1YrkG9KLaTGr9CrGsHI";
|
// String token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySW5mbyI6IntcImRlcGFydE5hbWVcIjpcIuemj-W7uuWNl-aWuei3r-mdouacuuaisOaciemZkOWFrOWPuFwiLFwiZGVwYXJ0Um93SWRcIjoxNTg1MTk1Njk0ODcyNzg0ODk3LFwiZnVsbERlcHROYW1lXCI6XCJPVT3npo_lu7rljZfmlrnot6_pnaLmnLrmorDmnInpmZDlhazlj7gsREM9bmZsZ1wiLFwicXVlcnlEYXRhXCI6MixcInJlYWxOYW1lXCI6XCJhZG1pblwiLFwicm93SWRcIjoxNTQ3NTEyOTc4MDE2OTE5NTUzLFwidXNlckNvZGVcIjpcImFkbWluXCIsXCJ1c2VyTmFtZVwiOlwiYWRtaW5cIn0iLCJleHAiOjE3MDIwNTI1MzEsImp0aSI6Ijc5NmU2MjZhLWJjYzUtNDY3ZS1iNjFjLWRmOGViNGY0MDYyOSJ9.iq2dyYKpGd7Z60Mmm9ef59CF1YrkG9KLaTGr9CrGsHI";
|
||||||
// String token = SessionUtil.getSessionKey();
|
// String token = SessionUtil.getSessionKey();
|
||||||
|
|
||||||
// String token=SessionUtil.getSessionKey();
|
// String token=SessionUtil.getSessionKey();
|
||||||
// HttpUtils httpUtils = new HttpUtils();
|
// HttpUtils httpUtils = new HttpUtils();
|
||||||
|
|
@ -93,10 +102,8 @@ public class MaterialService {
|
||||||
// return s;
|
// return s;
|
||||||
|
|
||||||
|
|
||||||
ResultVO<String> r= ResultVO.success(DateUtil.format(DateUtil.date(), "yyyyMMddHHmmssSSS"));
|
ResultVO<String> r = ResultVO.success(DateUtil.format(DateUtil.date(), "yyyyMMddHHmmssSSS"));
|
||||||
return JSON.toJSONString(r);
|
return JSON.toJSONString(r);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ public class OptionalEbomConfigService extends ServiceImpl<OptionalEbomConfigMap
|
||||||
optionalEbomConfigEntity.setDeviceNo(optionalEbomMainVO.getDeviceNo());
|
optionalEbomConfigEntity.setDeviceNo(optionalEbomMainVO.getDeviceNo());
|
||||||
optionalEbomConfigEntity.setDeviceName(optionalEbomMainVO.getDeviceName());
|
optionalEbomConfigEntity.setDeviceName(optionalEbomMainVO.getDeviceName());
|
||||||
optionalEbomConfigEntity.setDeptName(SessionUtil.getDepartName());
|
optionalEbomConfigEntity.setDeptName(SessionUtil.getDepartName());
|
||||||
// optionalEbomConfigEntity.setCreatedTime(new Date());
|
optionalEbomConfigEntity.setCreatedTime(DateUtil.now());
|
||||||
optionalEbomConfigEntity.setParentRowId(dto.getRowId());
|
optionalEbomConfigEntity.setParentRowId(dto.getRowId());
|
||||||
optionalEbomConfigEntity.setUpdatedTime(optionalEbomConfigEntity.getCreatedTime());
|
optionalEbomConfigEntity.setUpdatedTime(optionalEbomConfigEntity.getCreatedTime());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ public class OptionalEbomImportChildService extends ServiceImpl<OptionalEbomImpo
|
||||||
OptionalEbomImportChildEntity entity = new OptionalEbomImportChildEntity();
|
OptionalEbomImportChildEntity entity = new OptionalEbomImportChildEntity();
|
||||||
entity.setMaterialName(nos);
|
entity.setMaterialName(nos);
|
||||||
entity.setMaterialDesc(nos);
|
entity.setMaterialDesc(nos);
|
||||||
|
optionList.add(entity);
|
||||||
} else {
|
} else {
|
||||||
//先统一后分割
|
//先统一后分割
|
||||||
String[] array = nos.replace(";", ";").split(";");
|
String[] array = nos.replace(";", ";").split(";");
|
||||||
|
|
@ -102,7 +103,7 @@ public class OptionalEbomImportChildService extends ServiceImpl<OptionalEbomImpo
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.nflg.product.bomnew.service.aggreg;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.lang.TypeReference;
|
import cn.hutool.core.lang.TypeReference;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.crypto.digest.MD5;
|
import cn.hutool.crypto.digest.MD5;
|
||||||
|
|
@ -133,7 +134,7 @@ public class PublishMaterialService {
|
||||||
String sendMaterialName = goodsDesc.concat("(发货)");
|
String sendMaterialName = goodsDesc.concat("(发货)");
|
||||||
sendPack.setRowId(IdWorker.getId());
|
sendPack.setRowId(IdWorker.getId());
|
||||||
sendPack.setCreatedBy(SessionUtil.getUserCode());
|
sendPack.setCreatedBy(SessionUtil.getUserCode());
|
||||||
sendPack.setCreatedTime(new Date());
|
sendPack.setCreatedTime(DateUtil.now());
|
||||||
sendPack.setMaterialName(sendMaterialName);
|
sendPack.setMaterialName(sendMaterialName);
|
||||||
sendPack.setMaterialDesc(sendMaterialName);
|
sendPack.setMaterialDesc(sendMaterialName);
|
||||||
sendPack.setRootRowId(rootRowId);
|
sendPack.setRootRowId(rootRowId);
|
||||||
|
|
@ -150,7 +151,7 @@ public class PublishMaterialService {
|
||||||
// }
|
// }
|
||||||
sendPack.setMaterialNo(data);
|
sendPack.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机型发货物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "机型发货," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isEmpty(sendPack.getMaterialNo())) {
|
if (StrUtil.isEmpty(sendPack.getMaterialNo())) {
|
||||||
|
|
@ -162,11 +163,12 @@ public class PublishMaterialService {
|
||||||
String makeMaterialName = goodsDesc.concat("(制作)");
|
String makeMaterialName = goodsDesc.concat("(制作)");
|
||||||
makePack.setRowId(IdWorker.getId());
|
makePack.setRowId(IdWorker.getId());
|
||||||
makePack.setCreatedBy(SessionUtil.getUserCode());
|
makePack.setCreatedBy(SessionUtil.getUserCode());
|
||||||
makePack.setCreatedTime(new Date());
|
|
||||||
makePack.setMaterialName(makeMaterialName);
|
makePack.setMaterialName(makeMaterialName);
|
||||||
makePack.setMaterialDesc(makeMaterialName);
|
makePack.setMaterialDesc(makeMaterialName);
|
||||||
makePack.setParentRowId(sendPack.getRowId()); //父级
|
makePack.setParentRowId(sendPack.getRowId()); //父级
|
||||||
makePack.setRootRowId(rootRowId);
|
makePack.setRootRowId(rootRowId);
|
||||||
|
makePack.setCreatedTime(DateUtil.now());
|
||||||
makePack.setMaterialNo("");//申请物料号
|
makePack.setMaterialNo("");//申请物料号
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -181,7 +183,7 @@ public class PublishMaterialService {
|
||||||
// }
|
// }
|
||||||
makePack.setMaterialNo(data);
|
makePack.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机型制作物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "机型制作," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -223,7 +225,7 @@ public class PublishMaterialService {
|
||||||
String signMd5 = MD5.create().digestHex(result);
|
String signMd5 = MD5.create().digestHex(result);
|
||||||
QueryWrapper<OptionalMbomCompareEntity> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<OptionalMbomCompareEntity> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(OptionalMbomCompareEntity::getSignMd5, signMd5);
|
queryWrapper.lambda().eq(OptionalMbomCompareEntity::getSignMd5, signMd5);
|
||||||
OptionalMbomCompareEntity optionalMbomCompareEntity=null ;//= optionalMbomCompareService.getOne(queryWrapper);
|
OptionalMbomCompareEntity optionalMbomCompareEntity= optionalMbomCompareService.getOne(queryWrapper);
|
||||||
OptionalMbomMaterialEntity material;
|
OptionalMbomMaterialEntity material;
|
||||||
if (optionalMbomCompareEntity == null) {
|
if (optionalMbomCompareEntity == null) {
|
||||||
material = new OptionalMbomMaterialEntity();
|
material = new OptionalMbomMaterialEntity();
|
||||||
|
|
@ -234,7 +236,7 @@ public class PublishMaterialService {
|
||||||
material.setParentRowId(parentId);
|
material.setParentRowId(parentId);
|
||||||
material.setRootRowId(rootRowId);
|
material.setRootRowId(rootRowId);
|
||||||
material.setCreatedBy(SessionUtil.getUserCode());
|
material.setCreatedBy(SessionUtil.getUserCode());
|
||||||
material.setCreatedTime(new Date());
|
material.setCreatedTime(DateUtil.now());
|
||||||
material.setMaterialName(desc);
|
material.setMaterialName(desc);
|
||||||
material.setMaterialDesc(desc);
|
material.setMaterialDesc(desc);
|
||||||
material.setMaterialNo("");//申请物料号
|
material.setMaterialNo("");//申请物料号
|
||||||
|
|
@ -250,25 +252,25 @@ public class PublishMaterialService {
|
||||||
// }
|
// }
|
||||||
material.setMaterialNo(data);
|
material.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机械部分物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "机械部分," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// try {
|
try {
|
||||||
// //数据不存在保存
|
//数据不存在保存
|
||||||
// if (StrUtil.isNotEmpty(material.getMaterialNo())) {
|
if (StrUtil.isNotEmpty(material.getMaterialNo())) {
|
||||||
// optionalMbomCompareEntity = Convert.convert(new TypeReference<OptionalMbomCompareEntity>() {
|
optionalMbomCompareEntity = Convert.convert(new TypeReference<OptionalMbomCompareEntity>() {
|
||||||
// }, material);
|
}, material);
|
||||||
// optionalMbomCompareEntity.setParentRowId(rootRowId);
|
optionalMbomCompareEntity.setParentRowId(rootRowId);
|
||||||
// optionalMbomCompareEntity.setSignMd5(signMd5);
|
optionalMbomCompareEntity.setSignMd5(signMd5);
|
||||||
// optionalMbomCompareEntity.setCreatedTime(new Date());
|
optionalMbomCompareEntity.setCreatedTime(DateUtil.now());
|
||||||
// optionalMbomCompareEntity.setChildRowIds(result);
|
optionalMbomCompareEntity.setChildRowIds(result);
|
||||||
// optionalMbomCompareService.save(optionalMbomCompareEntity);
|
optionalMbomCompareService.save(optionalMbomCompareEntity);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// } catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// e.printStackTrace();
|
e.printStackTrace();
|
||||||
// }
|
}
|
||||||
|
|
||||||
} else { //同物料号
|
} else { //同物料号
|
||||||
material = Convert.convert(new TypeReference<OptionalMbomMaterialEntity>() {
|
material = Convert.convert(new TypeReference<OptionalMbomMaterialEntity>() {
|
||||||
|
|
@ -277,7 +279,7 @@ public class PublishMaterialService {
|
||||||
material.setParentRowId(parentId);
|
material.setParentRowId(parentId);
|
||||||
material.setRootRowId(rootRowId);
|
material.setRootRowId(rootRowId);
|
||||||
material.setCreatedBy(SessionUtil.getUserCode());
|
material.setCreatedBy(SessionUtil.getUserCode());
|
||||||
material.setCreatedTime(new Date());
|
material.setCreatedTime(DateUtil.now());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isEmpty(material.getMaterialNo())) {
|
if (StrUtil.isEmpty(material.getMaterialNo())) {
|
||||||
|
|
@ -289,7 +291,7 @@ public class PublishMaterialService {
|
||||||
List<OptionalMbomMaterialEntity> optionConvertList = Convert.toList(OptionalMbomMaterialEntity.class, optionList);
|
List<OptionalMbomMaterialEntity> optionConvertList = Convert.toList(OptionalMbomMaterialEntity.class, optionList);
|
||||||
optionConvertList.forEach(item -> {
|
optionConvertList.forEach(item -> {
|
||||||
item.setCreatedBy(SessionUtil.getUserCode());
|
item.setCreatedBy(SessionUtil.getUserCode());
|
||||||
item.setCreatedTime(new Date());
|
item.setCreatedTime(DateUtil.now());
|
||||||
item.setRootRowId(rootRowId);
|
item.setRootRowId(rootRowId);
|
||||||
item.setParentRowId(material.getRowId());
|
item.setParentRowId(material.getRowId());
|
||||||
materialList.add(item);
|
materialList.add(item);
|
||||||
|
|
@ -322,7 +324,7 @@ public class PublishMaterialService {
|
||||||
makePack.setRowId(IdWorker.getId());
|
makePack.setRowId(IdWorker.getId());
|
||||||
makePack.setParentRowId(parentId);
|
makePack.setParentRowId(parentId);
|
||||||
makePack.setCreatedBy(SessionUtil.getUserCode());
|
makePack.setCreatedBy(SessionUtil.getUserCode());
|
||||||
makePack.setCreatedTime(new Date());
|
makePack.setCreatedTime(DateUtil.now());
|
||||||
makePack.setMaterialName(makeMaterialName);
|
makePack.setMaterialName(makeMaterialName);
|
||||||
makePack.setMaterialDesc(makeMaterialName);
|
makePack.setMaterialDesc(makeMaterialName);
|
||||||
makePack.setRootRowId(rootRowId);
|
makePack.setRootRowId(rootRowId);
|
||||||
|
|
@ -340,7 +342,7 @@ public class PublishMaterialService {
|
||||||
// }
|
// }
|
||||||
makePack.setMaterialNo(data);
|
makePack.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "电控制作物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "电控制作," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -354,7 +356,7 @@ public class PublishMaterialService {
|
||||||
sendPack.setRowId(IdWorker.getId());
|
sendPack.setRowId(IdWorker.getId());
|
||||||
sendPack.setParentRowId(makePack.getRowId());
|
sendPack.setParentRowId(makePack.getRowId());
|
||||||
sendPack.setCreatedBy(SessionUtil.getUserCode());
|
sendPack.setCreatedBy(SessionUtil.getUserCode());
|
||||||
sendPack.setCreatedTime(new Date());
|
sendPack.setCreatedTime(DateUtil.now());
|
||||||
sendPack.setMaterialName(sendMaterialName);
|
sendPack.setMaterialName(sendMaterialName);
|
||||||
sendPack.setMaterialDesc(sendMaterialName);
|
sendPack.setMaterialDesc(sendMaterialName);
|
||||||
sendPack.setRootRowId(rootRowId);
|
sendPack.setRootRowId(rootRowId);
|
||||||
|
|
@ -370,7 +372,7 @@ public class PublishMaterialService {
|
||||||
// }
|
// }
|
||||||
sendPack.setMaterialNo(data);
|
sendPack.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "电控发货物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "电控发货,"+e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isEmpty(sendPack.getMaterialNo())) {
|
if (StrUtil.isEmpty(sendPack.getMaterialNo())) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue