出库商品
parent
c5f270978c
commit
b86248564d
|
@ -1711,9 +1711,12 @@ public class WmImNoticeHController extends BaseController {
|
||||||
if(!StringUtil.isEmpty(wmImNoticeIEntity.getGoodsCode())){
|
if(!StringUtil.isEmpty(wmImNoticeIEntity.getGoodsCode())){
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String date[]=wmImNoticeIEntity.getGoodsCode().split("-");
|
|
||||||
wmImNoticeIEntity.setGoodsCode(date[0]);
|
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class,"goodsName",wmImNoticeIEntity.getGoodsCode());
|
||||||
wmImNoticeIEntity.setGoodsName(date[1]);
|
|
||||||
|
// String date[]=wmImNoticeIEntity.getGoodsCode().split("-");
|
||||||
|
wmImNoticeIEntity.setGoodsCode(mvgoods.getGoodsCode());
|
||||||
|
wmImNoticeIEntity.setGoodsName(mvgoods.getShpMingCheng());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
}
|
}
|
||||||
|
|
|
@ -921,9 +921,16 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
for (WmOmNoticeIEntity wmomNoticeIEntity : wmOmNoticeIList) {
|
for (WmOmNoticeIEntity wmomNoticeIEntity : wmOmNoticeIList) {
|
||||||
if(!StringUtil.isEmpty(wmomNoticeIEntity.getGoodsId())){
|
if(!StringUtil.isEmpty(wmomNoticeIEntity.getGoodsId())){
|
||||||
try {
|
try {
|
||||||
String date[]=wmomNoticeIEntity.getGoodsId().split("-");
|
|
||||||
wmomNoticeIEntity.setGoodsId(date[0]);
|
|
||||||
wmomNoticeIEntity.setGoodsName(date[1]);
|
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class,"goodsName",wmomNoticeIEntity.getGoodsId());
|
||||||
|
|
||||||
|
// String date[]=wmImNoticeIEntity.getGoodsCode().split("-");
|
||||||
|
// wmImNoticeIEntity.setGoodsCode(mvgoods.getGoodsCode());
|
||||||
|
// wmImNoticeIEntity.setGoodsName(mvgoods.getShpMingCheng());
|
||||||
|
// String date[]=wmomNoticeIEntity.getGoodsId().split("-");
|
||||||
|
wmomNoticeIEntity.setGoodsId(mvgoods.getGoodsCode());
|
||||||
|
wmomNoticeIEntity.setGoodsName(mvgoods.getShpMingCheng());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
|
|
|
@ -140,6 +140,9 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
|
||||||
if(oldE.getId().equals(sendE.getId())){
|
if(oldE.getId().equals(sendE.getId())){
|
||||||
try {
|
try {
|
||||||
MyBeanUtils.copyBeanNotNull2Bean(sendE,oldE);
|
MyBeanUtils.copyBeanNotNull2Bean(sendE,oldE);
|
||||||
|
oldE.setBinOm(sendE.getBinOm());
|
||||||
|
oldE.setGoodsProData(sendE.getGoodsProData());
|
||||||
|
oldE.setBinId(sendE.getBinId());
|
||||||
MvGoodsEntity mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", oldE.getGoodsId()) ;
|
MvGoodsEntity mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", oldE.getGoodsId()) ;
|
||||||
oldE.setGoodsUnit(mvgoods.getShlDanWei());
|
oldE.setGoodsUnit(mvgoods.getShlDanWei());
|
||||||
oldE.setBaseUnit(mvgoods.getBaseunit());
|
oldE.setBaseUnit(mvgoods.getBaseunit());
|
||||||
|
@ -187,41 +190,41 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
|
||||||
}
|
}
|
||||||
|
|
||||||
//3.筛选更新明细数据-运输商品明细
|
//3.筛选更新明细数据-运输商品明细
|
||||||
String hql1 ="from TmsYwDingdanEntity where 1 = 1 AND ywkhdh = ? ";
|
// String hql1 ="from TmsYwDingdanEntity where 1 = 1 AND ywkhdh = ? ";
|
||||||
List<TmsYwDingdanEntity> wmOmtmsIOldList = this.findHql(hql1,id0);
|
// List<TmsYwDingdanEntity> wmOmtmsIOldList = this.findHql(hql1,id0);
|
||||||
|
//
|
||||||
if(wmOmtmsIList!=null&&wmOmtmsIList.size()>0){
|
// if(wmOmtmsIList!=null&&wmOmtmsIList.size()>0){
|
||||||
for(TmsYwDingdanEntity oldE:wmOmtmsIOldList){
|
// for(TmsYwDingdanEntity oldE:wmOmtmsIOldList){
|
||||||
boolean isUpdate = false;
|
// boolean isUpdate = false;
|
||||||
for(TmsYwDingdanEntity sendE:wmOmtmsIList){
|
// for(TmsYwDingdanEntity sendE:wmOmtmsIList){
|
||||||
//需要更新的明细数据-出货商品明细
|
// //需要更新的明细数据-出货商品明细
|
||||||
if(oldE.getId().equals(sendE.getId())){
|
// if(oldE.getId().equals(sendE.getId())){
|
||||||
try {
|
// try {
|
||||||
MyBeanUtils.copyBeanNotNull2Bean(sendE,oldE);
|
// MyBeanUtils.copyBeanNotNull2Bean(sendE,oldE);
|
||||||
this.saveOrUpdate(oldE);
|
// this.saveOrUpdate(oldE);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
throw new BusinessException(e.getMessage());
|
// throw new BusinessException(e.getMessage());
|
||||||
}
|
// }
|
||||||
isUpdate= true;
|
// isUpdate= true;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if(!isUpdate){
|
// if(!isUpdate){
|
||||||
//如果数据库存在的明细,前台没有传递过来则是删除-出货商品明细
|
// //如果数据库存在的明细,前台没有传递过来则是删除-出货商品明细
|
||||||
super.delete(oldE);
|
// super.delete(oldE);
|
||||||
}
|
// }
|
||||||
|
////
|
||||||
}
|
// }
|
||||||
//3.持久化新增的数据-出货商品明细
|
// //3.持久化新增的数据-出货商品明细
|
||||||
for(TmsYwDingdanEntity wmOmNoticeI:wmOmtmsIList){
|
// for(TmsYwDingdanEntity wmOmNoticeI:wmOmtmsIList){
|
||||||
if(oConvertUtils.isEmpty(wmOmNoticeI.getId())){
|
// if(oConvertUtils.isEmpty(wmOmNoticeI.getId())){
|
||||||
//外键设置
|
// //外键设置
|
||||||
wmOmNoticeI.setYwkhdh(wmOmNoticeH.getOmNoticeId());
|
// wmOmNoticeI.setYwkhdh(wmOmNoticeH.getOmNoticeId());
|
||||||
this.save(wmOmNoticeI);
|
// this.save(wmOmNoticeI);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//执行更新操作配置的sql增强
|
//执行更新操作配置的sql增强
|
||||||
this.doUpdateSql(wmOmNoticeH);
|
this.doUpdateSql(wmOmNoticeH);
|
||||||
|
|
Loading…
Reference in New Issue