出库增加整版出货配置

master
e 2018-09-19 22:24:21 +08:00
parent 2df62b503b
commit 140f573dce
2 changed files with 116 additions and 99 deletions

View File

@ -475,21 +475,25 @@ public class SmsSendTask {
+ " and ws.cus_code = ? "
+ " group by ws.ku_wei_bian_ma,ws.bin_id,ws.goods_id,mb.qu_huo_ci_xu, ws.goods_pro_data having sum(ws.base_goodscount) > 0 order by ws.goods_pro_data , ws.goods_qua ,mb.qu_huo_ci_xu,ws.create_date desc ";
List<Map<String, Object>> resultt = new ArrayList<Map<String, Object>>();
System.out.print(tsql);
if(!"off".equals(ResourceUtil.getConfigByName("hiti"))) {//不启用HITI 此处不操作
try {
resultt = systemService
.findForJdbc(tsql, mvgoods.getGoodsId(), wmOmQmIEntity.getCusCode());
} catch (Exception e) {
}
System.out.print(tsql);
if (resultt != null && resultt.size() > 0) {
String goodprodata = null;
try{
try {
goodprodata = resultt.get(0).get("goods_pro_data").toString();
}catch (Exception e){
} catch (Exception e) {
}
String hiti = "0";
@ -500,19 +504,17 @@ public class SmsSendTask {
if (Long.parseLong(hiti) <= omcountwq) {
String tsqlz = "select ws.base_unit,ws.zhong_wen_qch, ws.ku_wei_bian_ma,ws.bin_id,ws.shp_ming_cheng,cast(sum(ws.base_goodscount) as signed) as goods_qua, mb.qu_huo_ci_xu, ws.goods_pro_data"
+ " from wv_stock ws, md_bin mb where "
+ " ws.ku_wei_bian_ma = mb.ku_wei_bian_ma and mb.ku_wei_lei_xing = '良品区' and mb.ting_yong <> 'Y' and (ws.kuctype = '库存' or ws.kuctype = '待下架')"
;
if(StringUtil.isNotEmpty(tuopanma)) {
tsqlz = tsqlz + " and ws.bin_id = '"+tuopanma + "' ";
+ " ws.ku_wei_bian_ma = mb.ku_wei_bian_ma and mb.ku_wei_lei_xing = '良品区' and mb.ting_yong <> 'Y' and (ws.kuctype = '库存' or ws.kuctype = '待下架')";
if (StringUtil.isNotEmpty(tuopanma)) {
tsqlz = tsqlz + " and ws.bin_id = '" + tuopanma + "' ";
}
tsqlz = tsqlz
+ " and ws.goods_id = ? "
+ " and ws.cus_code = ? ";
if(StringUtil.isEmpty(goodprodata)){
if (StringUtil.isEmpty(goodprodata)) {
tsqlz = tsqlz
+ " and ws.goods_pro_data = '"+ goodprodata +"'";
+ " and ws.goods_pro_data = '" + goodprodata + "'";
}
tsqlz = tsqlz
@ -524,7 +526,7 @@ public class SmsSendTask {
if (resultz != null && resultz.size() > 0) {
for (int i = 0; i < resultz.size(); i++) {
try{
try {
Long bin_qua = Long.valueOf(resultz.get(i)
.get("goods_qua").toString());
if (omcountwq >= bin_qua && omcountwq > 0) {
@ -540,10 +542,15 @@ public class SmsSendTask {
.toString());
wmOmQmIEntity.setProData(resultz.get(i)
.get("goods_pro_data").toString());
try{
wmOmQmIEntity.setCusName(resultz.get(i)
.get("zhong_wen_qch").toString());
wmOmQmIEntity.setGoodsName(resultz.get(i)
.get("shp_ming_cheng").toString());
}catch (Exception e){
}
omcountwq = omcountwq - bin_qua;
if (wmOmNoticeIEntity.getGoodsUnit()
.equals(wmOmNoticeIEntity
@ -587,17 +594,19 @@ public class SmsSendTask {
systemService.save(wmOmQmIEntity);
}
}catch (Exception e){
} catch (Exception e) {
}
}
}
}
}
}
List<Map<String, Object>> result = systemService
.findForJdbc(tsql, mvgoods.getGoodsId(), wmOmQmIEntity.getCusCode());
if (result != null && result.size() > 0) {
for (int i = 0; i < result.size(); i++) {
try {
Long bin_qua = Long.valueOf(result.get(i)
.get("goods_qua").toString());
if (bin_qua > 0 && omcountwq > 0) {
@ -724,7 +733,14 @@ public class SmsSendTask {
break;
}
}
}catch (Exception e){
}
//catch jieshu
}
}
}

View File

@ -112,7 +112,8 @@ api_url_orderstatus_get = https://api.yonyouup.com/orderstatus/get?from_account=
api_url_result_get = https://api.yonyouup.com/result?requestid={requestid}
#\u542F\u7528HITI
hiti=off
#\u5141\u8BB8\u8D85\u6536 y\u5141\u8BB8 n\u4E0D\u5141\u8BB8
chaoshou=y