一步或两步上架配置
parent
a423b58e36
commit
a3923c9b1a
|
@ -55,6 +55,7 @@ import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.swing.text.StyledEditorKit;
|
||||||
import javax.validation.ConstraintViolation;
|
import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
|
@ -187,10 +188,26 @@ public class WmInQmIController extends BaseController {
|
||||||
message = "上架成功";
|
message = "上架成功";
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
toup(request.getParameter("id"));
|
||||||
|
|
||||||
|
systemService.addLog(message, Globals.Log_Type_DEL,
|
||||||
|
Globals.Log_Leavel_INFO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
j.setSuccess(false);
|
||||||
|
e.printStackTrace();
|
||||||
|
message = "上架失败";
|
||||||
|
throw new BusinessException(e.getMessage());
|
||||||
|
}
|
||||||
|
j.setMsg(message);
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean toup(String id ){
|
||||||
List<WmToUpGoodsEntity> wmToUpGoodsList = new ArrayList<WmToUpGoodsEntity>();
|
List<WmToUpGoodsEntity> wmToUpGoodsList = new ArrayList<WmToUpGoodsEntity>();
|
||||||
String hql0 = "from WmInQmIEntity where binSta = 'N' and id = ?";
|
String hql0 = "from WmInQmIEntity where binSta = 'N' and id = ?";
|
||||||
List<WmInQmIEntity> WmInQmIEntityList = systemService.findHql(hql0,
|
List<WmInQmIEntity> WmInQmIEntityList = systemService.findHql(hql0,
|
||||||
request.getParameter("id").toString());// 获取行项目
|
id);// 获取行项目
|
||||||
for (WmInQmIEntity wmInQmIEntity : WmInQmIEntityList) {
|
for (WmInQmIEntity wmInQmIEntity : WmInQmIEntityList) {
|
||||||
WmToUpGoodsEntity wmToUpGoodsEntity = new WmToUpGoodsEntity();
|
WmToUpGoodsEntity wmToUpGoodsEntity = new WmToUpGoodsEntity();
|
||||||
wmToUpGoodsEntity.setGoodsId(wmInQmIEntity.getGoodsId());
|
wmToUpGoodsEntity.setGoodsId(wmInQmIEntity.getGoodsId());
|
||||||
|
@ -208,15 +225,13 @@ public class WmInQmIController extends BaseController {
|
||||||
String sql = "select md.suo_shu_ke_hu as cuscode from md_bin md where md.ku_wei_bian_ma = '"
|
String sql = "select md.suo_shu_ke_hu as cuscode from md_bin md where md.ku_wei_bian_ma = '"
|
||||||
+ wmInQmIEntity.getBinId() + "'";
|
+ wmInQmIEntity.getBinId() + "'";
|
||||||
Map<String, Object> binMap = systemService.findOneForJdbc(sql);
|
Map<String, Object> binMap = systemService.findOneForJdbc(sql);
|
||||||
if(binMap==null){
|
if (binMap == null) {
|
||||||
j.setSuccess(false);
|
|
||||||
message = "储位不存在";
|
return false;
|
||||||
j.setMsg(message);
|
|
||||||
return j;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try {
|
||||||
|
|
||||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
||||||
mvgoods = systemService.findUniqueByProperty(
|
mvgoods = systemService.findUniqueByProperty(
|
||||||
|
@ -240,7 +255,7 @@ public class WmInQmIController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,17 +264,7 @@ public class WmInQmIController extends BaseController {
|
||||||
systemService.save(wmToUpGoodsEntity);
|
systemService.save(wmToUpGoodsEntity);
|
||||||
systemService.saveOrUpdate(wmInQmIEntity);
|
systemService.saveOrUpdate(wmInQmIEntity);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
systemService.addLog(message, Globals.Log_Type_DEL,
|
|
||||||
Globals.Log_Leavel_INFO);
|
|
||||||
} catch (Exception e) {
|
|
||||||
j.setSuccess(false);
|
|
||||||
e.printStackTrace();
|
|
||||||
message = "上架失败";
|
|
||||||
throw new BusinessException(e.getMessage());
|
|
||||||
}
|
|
||||||
j.setMsg(message);
|
|
||||||
return j;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -487,7 +492,10 @@ public class WmInQmIController extends BaseController {
|
||||||
wmInQmI.setImQuat(wmimnotice.getGoodsCount());
|
wmInQmI.setImQuat(wmimnotice.getGoodsCount());
|
||||||
wmInQmI.setImCusCode(wmimnotice.getImCusCode());
|
wmInQmI.setImCusCode(wmimnotice.getImCusCode());
|
||||||
// wmInQmI.setBinId(wmInQmI.getImNoticeId());
|
// wmInQmI.setBinId(wmInQmI.getImNoticeId());
|
||||||
wmInQmIService.save(wmInQmI);
|
String id = wmInQmIService.save(wmInQmI).toString();
|
||||||
|
if("on".equals(ResourceUtil.getConfigByName("onestepup"))&&StringUtil.isNotEmpty(wmInQmI.getBinId())){
|
||||||
|
toup(id);
|
||||||
|
}
|
||||||
systemService.addLog(message, Globals.Log_Type_INSERT,
|
systemService.addLog(message, Globals.Log_Type_INSERT,
|
||||||
Globals.Log_Leavel_INFO);
|
Globals.Log_Leavel_INFO);
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,6 +286,10 @@ comgroup=on
|
||||||
tijiunit=\u7ACB\u65B9\u5206\u7C73
|
tijiunit=\u7ACB\u65B9\u5206\u7C73
|
||||||
zhongliangunit=\u516C\u65A4
|
zhongliangunit=\u516C\u65A4
|
||||||
|
|
||||||
|
#\u4E00\u6B65\u4E0A\u67B6
|
||||||
|
|
||||||
|
onestepup=on
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue