优化出厂编号取值改为从序列号取值
This commit is contained in:
parent
fbcf7961a4
commit
2196d4ed54
|
@ -26,6 +26,7 @@ import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
||||||
import nccloud.commons.lang.StringUtils;
|
import nccloud.commons.lang.StringUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -322,11 +323,20 @@ public class SyncEpicMesUtil {
|
||||||
JSONArray jsonArray = new JSONArray();
|
JSONArray jsonArray = new JSONArray();
|
||||||
for (PMOItemVO item : vo.getChildrenVO()) {
|
for (PMOItemVO item : vo.getChildrenVO()) {
|
||||||
HYPubBO hybo = new HYPubBO();
|
HYPubBO hybo = new HYPubBO();
|
||||||
Object materialtype = hybo.findColValue("bd_material_v", "materialtype", "pk_source = '" + item.getCmaterialid() + "' ");
|
// List<String> materialtype =(List<String>) hybo.findColValue("mm_pmo_serialno", "vsncode", "cmoid = '" + item.getCmoid() + "' and dr = 0 ");
|
||||||
IBillcodeManage billcodeManage = NCLocator.getInstance().lookup(IBillcodeManage.class);;
|
// IBillcodeManage billcodeManage = NCLocator.getInstance().lookup(IBillcodeManage.class);;
|
||||||
String code = billcodeManage.getPreBillCode_RequiresNew("xxxxx-code-rule", hvo.getPk_group(), hvo.getPk_org());
|
// String code = billcodeManage.getPreBillCode_RequiresNew("xxxxx-code-rule", hvo.getPk_group(), hvo.getPk_org());
|
||||||
String detailItem = materialtype + hvo.getDbilldate().toStdString().substring(0, 3) + hvo.getDbilldate().toStdString().substring(5, 6) + code;
|
String vsncode = " select vsncode from mm_pmo_serialno where cmoid in ( '" + item.getCmoid() + "' ) and mm_pmo_serialno.dr = 0\t ";
|
||||||
jsonArray.add(detailItem);
|
// Map<String, Object> vsncodeList = (Map<String, Object>) dao.executeQuery(vsncode, new MapProcessor());
|
||||||
|
ArrayList<Map<String, Object>> vsncodeList = (ArrayList<Map<String, Object>>)dao.executeQuery(vsncode, new MapListProcessor());
|
||||||
|
if (vsncodeList.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (Map<String,Object> v: vsncodeList) {
|
||||||
|
jsonArray.add(v.get("vsncode"));
|
||||||
|
}
|
||||||
|
// String detailItem = (null!=materialtype ?materialtype:"") + hvo.getDbilldate().toStdString().substring(0, 3) + hvo.getDbilldate().toStdString().substring(5, 6) + code;
|
||||||
|
// jsonArray.add(detailItem);
|
||||||
}
|
}
|
||||||
obj.put("releaseNo", jsonArray);
|
obj.put("releaseNo", jsonArray);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue