出库增加整版出货配置

master
e 2018-09-20 23:23:55 +08:00
parent 140f573dce
commit c6292d9f39
3 changed files with 46 additions and 7 deletions

View File

@ -2070,9 +2070,11 @@ public class WmImNoticeHController extends BaseController {
// 查询-进货通知明细
String hql0 = "from WmImNoticeIEntity where 1 = 1 AND iM_NOTICE_ID = ? ";
try {
if(StringUtil.isNotEmpty(id0)){
List<WmImNoticeIEntity> wmImNoticeIEntityList = systemService
.findHql(hql0, id0);
req.setAttribute("wmImNoticeIList", wmImNoticeIEntityList);
}
} catch (Exception e) {
logger.info(e.getMessage());
}
@ -2164,6 +2166,22 @@ public class WmImNoticeHController extends BaseController {
try {
List<WmNoticeImpPage> list = ExcelImportUtil.importExcel(
file.getInputStream(), WmNoticeImpPage.class, params);
String flag = "Y";
String message="";
for(WmNoticeImpPage wmt:list){
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
MvGoodsEntity.class, "goodsCode", wmt.getGoodsId());
if(mvgoods==null){
flag = "N";
message=message+wmt.getGoodsId();
}
}
if("N".equals(flag)){
j.setMsg(message+"不存在");
return j;
}
List<WmNoticeImpPage> listheader = ExcelImportUtil.importExcel(
file.getInputStream(), WmNoticeImpPage.class, params);
for(int i=0; i<listheader.size()-1;i++){

View File

@ -1606,8 +1606,10 @@ public class WmOmNoticeHController extends BaseController {
//查询-出货商品明细
String hql0 = "from WmOmNoticeIEntity where 1 = 1 AND oM_NOTICE_ID = ? ";
try{
if(StringUtil.isNotEmpty(id0)){
List<WmOmNoticeIEntity> wmOmNoticeIEntityList = systemService.findHql(hql0,id0);
req.setAttribute("wmOmNoticeIList", wmOmNoticeIEntityList);
}
}catch(Exception e){
logger.info(e.getMessage());
}
@ -1694,6 +1696,21 @@ public class WmOmNoticeHController extends BaseController {
params.setNeedSave(true);
try {
List<WmNoticeImpPage> list = ExcelImportUtil.importExcel(file.getInputStream(), WmNoticeImpPage.class, params);
String flag = "Y";
String message="";
for(WmNoticeImpPage wmt:list){
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
MvGoodsEntity.class, "goodsCode", wmt.getGoodsId());
if(mvgoods==null){
flag = "N";
message=message+wmt.getGoodsId();
}
}
if("N".equals(flag)){
j.setMsg(message+"不存在");
return j;
}
List<WmNoticeImpPage> listheader = ExcelImportUtil.importExcel(
file.getInputStream(), WmNoticeImpPage.class, params);
for(int i=0;i<listheader.size()-1;i++){

View File

@ -5,6 +5,7 @@ import com.zzjee.md.entity.MvCusEntity;
import com.zzjee.md.entity.MvGoodsEntity;
import com.zzjee.wm.entity.WmOmNoticeHEntity;
import com.zzjee.wm.entity.WmOmNoticeIEntity;
import com.zzjee.wm.entity.WmOmQmIEntity;
import com.zzjee.wm.entity.WmToDownGoodsEntity;
import com.zzjee.wm.page.Delrowpage;
import com.zzjee.wm.service.WmToDownGoodsServiceI;
@ -274,7 +275,6 @@ public class WmToDownGoodsController extends BaseController {
/**
*
*
* @param ids
* @return
*/
@RequestMapping(params = "dofubatch")
@ -747,6 +747,7 @@ public class WmToDownGoodsController extends BaseController {
ResultDO D0 = new ResultDO();
WmToDownGoodsEntity wmToDownGoods = (WmToDownGoodsEntity)JSONHelper.json2Object(wmToDownGoodsstr,WmToDownGoodsEntity.class);
// 调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
WvGiNoticeEntity t = new WvGiNoticeEntity();
Set<ConstraintViolation<WmToDownGoodsEntity>> failures = validator
.validate(wmToDownGoods);
if (!failures.isEmpty()) {
@ -754,7 +755,7 @@ public class WmToDownGoodsController extends BaseController {
}
try{
WvGiNoticeEntity t = systemService.get(WvGiNoticeEntity.class,wmToDownGoods.getOrderIdI());
t = systemService.get(WvGiNoticeEntity.class,wmToDownGoods.getOrderIdI());
if(t!=null&&StringUtil.isEmpty(wmToDownGoods.getBinIdFrom())){
wmToDownGoods.setGoodsName(t.getShpMingCheng());
wmToDownGoods.setBinIdFrom(t.getTinId());
@ -767,6 +768,9 @@ public class WmToDownGoodsController extends BaseController {
wmToDownGoods.setCreateDate(DateUtils.getDate());
if(wmUtil.checkstcokk(wmToDownGoods.getCusCode(),wmToDownGoods.getKuWeiBianMa(),wmToDownGoods.getBinIdFrom(),wmToDownGoods.getGoodsId(),wmToDownGoods.getGoodsProData(),wmToDownGoods.getBaseGoodscount()))
{
WmOmQmIEntity wmOmQmIEntity = systemService.get(WmOmQmIEntity.class,t.getId());
wmToDownGoods.setImCusCode(wmOmQmIEntity.getImCusCode());
wmToDownGoods.setOmBeizhu(wmOmQmIEntity.getOmBeizhu());
wmToDownGoodsService.save(wmToDownGoods);
D0.setOK(true);
}else{