|
@@ -22,6 +22,8 @@ import nc.bs.framework.common.NCLocator;
|
|
|
import nc.hr.utils.PubEnv;
|
|
|
import nc.itf.uap.IUAPQueryBS;
|
|
|
import nc.jdbc.framework.processor.BeanListProcessor;
|
|
|
+import nc.jdbc.framework.processor.ColumnProcessor;
|
|
|
+import nc.jdbc.framework.processor.MapProcessor;
|
|
|
import nc.ui.pub.ClientEnvironment;
|
|
|
import nc.ui.pub.beans.MessageDialog;
|
|
|
import nc.ui.pub.beans.UIButton;
|
|
@@ -69,6 +71,7 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
private OrderMainVO headvo;
|
|
|
private OrderInVO[] inArrays = null;
|
|
|
private IOrderTotalInfo iorder = NCLocator.getInstance().lookup(IOrderTotalInfo.class);
|
|
|
+ private IUAPQueryBS iuap=(IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
|
|
|
// public GxCLCDialog() {
|
|
|
// super();
|
|
|
// initialize();
|
|
@@ -261,7 +264,44 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
|
|
|
@Override
|
|
|
public void afterEdit(BillEditEvent arg0) {
|
|
|
- // TODO Auto-generated method stub
|
|
|
+
|
|
|
+ Object objbdef6=this.jlcardPanel.getBodyValueAt(arg0.getRow(), "bdef6");//换算率
|
|
|
+ Object objnastnum=this.jlcardPanel.getBodyValueAt(arg0.getRow(), "nastnum");//辅数量
|
|
|
+ Object objnum=this.jlcardPanel.getBodyValueAt(arg0.getRow(), "num");//主数量
|
|
|
+
|
|
|
+ if(null!=objnastnum && "".equals(objnastnum.toString()) && (null==objbdef6 || "".equals(objbdef6.toString()))) {
|
|
|
+ MessageDialog.showErrorDlg(mainpanel, "错误", "请检查换算率不能为空!");
|
|
|
+ this.jlcardPanel.setBodyValueAt(false, arg0.getRow(), "bdef4");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //本次执行主数量
|
|
|
+ if("bdef5".equals(arg0.getKey())) {
|
|
|
+ String value=arg0.getValue().toString();//填写的主数量
|
|
|
+
|
|
|
+ UFDouble ufbdef7=new UFDouble(value).div
|
|
|
+ (new UFDouble(objnum.toString()).div(new UFDouble(objnastnum.toString()))).setScale(2, UFDouble.ROUND_HALF_UP);
|
|
|
+
|
|
|
+ this.jlcardPanel.setBodyValueAt(ufbdef7, arg0.getRow(), "bdef7");//本次执行辅数量
|
|
|
+ }
|
|
|
+
|
|
|
+ //本次执行辅数量
|
|
|
+ if("bdef7".equals(arg0.getKey())) {
|
|
|
+ String value=arg0.getValue().toString();//填写的辅数量
|
|
|
+
|
|
|
+ if(null!=objnastnum && !"".equals(objnastnum.toString())) {
|
|
|
+
|
|
|
+ UFDouble ufbdef5=new UFDouble(value).multiply
|
|
|
+ (new UFDouble(objnum.toString()).div(new UFDouble(objnastnum.toString()))).setScale(2, UFDouble.ROUND_HALF_UP);
|
|
|
+
|
|
|
+ this.jlcardPanel.setBodyValueAt(ufbdef5, arg0.getRow(), "bdef5");//本次执行辅数量
|
|
|
+ }else {
|
|
|
+ MessageDialog.showHintDlg(mainpanel, "提示", "此存货没有辅计量单位!");
|
|
|
+ this.jlcardPanel.setBodyValueAt(null, arg0.getRow(), "bdef7");//本次执行辅数量
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -305,14 +345,14 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
Vector<Object> vector = (Vector<Object>)vectors.get(i);
|
|
|
if(null!=vector.get(0) && "Y".equals(vector.get(0).toString())){
|
|
|
if(vector.get(1) == null) {
|
|
|
- errmsg.append("第"+(i+1)+"行本次执行数量为空!");
|
|
|
+ errmsg.append("第"+(i+1)+"行本次执行主数量为空!");
|
|
|
continue;
|
|
|
}
|
|
|
UFDouble execnum = new UFDouble(vector.get(1).toString());//本次执行数量
|
|
|
- UFDouble nnum = new UFDouble(vector.get(22).toString());//主数量
|
|
|
- UFDouble usednum = vector.get(30) == null?new UFDouble(0):new UFDouble(vector.get(30).toString());//已执行主数量
|
|
|
- if(execnum.compareTo(nnum.sub(usednum)) > 0) {
|
|
|
- errmsg.append("第"+(i+1)+"行本次执行数量超过订单剩余数量!");
|
|
|
+ UFDouble nnum = new UFDouble(vector.get(23).toString());//主数量
|
|
|
+ UFDouble usednum = vector.get(31) == null?new UFDouble(0):new UFDouble(vector.get(31).toString());//已执行主数量
|
|
|
+ if(execnum.compareTo(nnum.sub(usednum)) > 0 && nnum.compareTo(UFDouble.ZERO_DBL)>0) {
|
|
|
+ errmsg.append("第"+(i+1)+"行本次执行主数量超过订单剩余数量!");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -342,16 +382,36 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
icheadvo.setDbilldate(dbilldate);
|
|
|
//制单人
|
|
|
icheadvo.setCoperatorid(PubEnv.getPk_user());
|
|
|
- //项目编码 pk_defdoc9
|
|
|
- icheadvo.setAttributeValue("pk_defdoc9", prjcode);
|
|
|
- //项目名称pk_defdoc10
|
|
|
- icheadvo.setAttributeValue("pk_defdoc10", prjcode);
|
|
|
- //加工单号pk_defdoc2
|
|
|
- icheadvo.setAttributeValue("pk_defdoc2", headvo.getDef1());
|
|
|
//收发类别
|
|
|
icheadvo.setCdispatcherid(GetBaseDAOUtil.getpkrdcl("08"));
|
|
|
+
|
|
|
+// //项目编码 pk_defdoc9
|
|
|
+// icheadvo.setAttributeValue("pk_defdoc9", prjcode);
|
|
|
+// //项目名称pk_defdoc10
|
|
|
+// icheadvo.setAttributeValue("pk_defdoc10", prjcode);
|
|
|
+// //加工单号pk_defdoc2
|
|
|
+// icheadvo.setAttributeValue("pk_defdoc2", headvo.getDef1());
|
|
|
+// //业务类型
|
|
|
+// icheadvo.setAttributeValue("pk_defdoc8", billtype);
|
|
|
+
|
|
|
+ Map<String,String> mapcodename=getprojectmap(prjcode);
|
|
|
+ //项目编码
|
|
|
+ // icheadvo.setAttributeValue("vuserdef9",mapcodename.get("jobcode") );
|
|
|
+ //项目编码 pk_defdoc9
|
|
|
+ // icheadvo.setAttributeValue("pk_defdoc9", prjcode);
|
|
|
+ //项目名称
|
|
|
+ icheadvo.setAttributeValue("vuserdef10", mapcodename.get("jobname"));
|
|
|
+ //项目名称pk_defdoc10
|
|
|
+ icheadvo.setAttributeValue("pk_defdoc10", prjcode);
|
|
|
+ //加工单号
|
|
|
+ icheadvo.setAttributeValue("vuserdef1", headvo.getDef1());
|
|
|
+
|
|
|
//业务类型
|
|
|
- icheadvo.setAttributeValue("pk_defdoc8", billtype);
|
|
|
+ icheadvo.setAttributeValue("vuserdef7", billtype.trim());
|
|
|
+
|
|
|
+ icheadvo.setAttributeValue("pk_defdoc7",getpkdefdoc(billtype.trim()));
|
|
|
+
|
|
|
+
|
|
|
//仓库ID
|
|
|
if("工装".equals(billtype)) {
|
|
|
icheadvo.setCwarehouseid(GetBaseDAOUtil.getstordocpk("GZ001"));//仓库必填
|
|
@@ -368,12 +428,13 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
icheadvo.setCoperatoridnow(PubEnv.getPk_user());
|
|
|
aggvo.setParentVO(icheadvo);
|
|
|
Map<String, UFDouble> updatemap = new HashMap<>();
|
|
|
+ Map<String, UFDouble> updatfzemap = new HashMap<>();
|
|
|
for(int j = 0; j < vectors.size(); j++) {
|
|
|
Vector<Object> vector = (Vector<Object>)vectors.get(j);
|
|
|
//自定义项4 为勾选按钮 :勾选为Y 没有勾选是null
|
|
|
if(null!=vector.get(0) && "Y".equals(vector.get(0).toString())){
|
|
|
GeneralBillItemVO itemvo = new GeneralBillItemVO();
|
|
|
- String cmaterialcode = vector.get(8).toString();
|
|
|
+ String cmaterialcode = vector.get(9).toString();
|
|
|
String pk_invbasdoc = "";//存货pk
|
|
|
if(cmaterialcode.startsWith("0001")) {
|
|
|
pk_invbasdoc = cmaterialcode;
|
|
@@ -440,19 +501,28 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
//应入数量
|
|
|
itemvo.setNshouldinnum(ninnum);
|
|
|
//辅计量单位ID
|
|
|
- itemvo.setCastunitid(vector.get(28) == null ? null : GetBaseDAOUtil.getMeasidByNames(vector.get(28).toString()));
|
|
|
- UFDouble Hsl = vector.get(49) == null ? null : new UFDouble(vector.get(49).toString());
|
|
|
+ itemvo.setCastunitid(vector.get(29) == null ? null : GetBaseDAOUtil.getMeasidByNames(vector.get(29).toString()));
|
|
|
+ UFDouble Hsl = vector.get(50) == null ? null : new UFDouble(vector.get(50).toString());
|
|
|
//换算率
|
|
|
itemvo.setHsl(Hsl);
|
|
|
|
|
|
//没有换算率则辅数量为空
|
|
|
- if(Hsl != null) {
|
|
|
- UFDouble ninassistnum = new UFDouble(ninnum.div(Hsl).toString(),2);
|
|
|
- //实入辅数量
|
|
|
- itemvo.setNinassistnum(ninassistnum);
|
|
|
- //应入辅数量
|
|
|
- itemvo.setNneedinassistnum(ninassistnum);
|
|
|
- }
|
|
|
+// if(Hsl != null) {
|
|
|
+// UFDouble ninassistnum = new UFDouble(ninnum.div(Hsl).toString(),2);
|
|
|
+// //实入辅数量
|
|
|
+// itemvo.setNinassistnum(ninassistnum);
|
|
|
+// //应入辅数量
|
|
|
+// itemvo.setNneedinassistnum(ninassistnum);
|
|
|
+// }
|
|
|
+
|
|
|
+ UFDouble ninassistnum = vector.get(2) == null ? null : new UFDouble(vector.get(2).toString());
|
|
|
+ //实入辅数量
|
|
|
+ itemvo.setNinassistnum(ninassistnum);
|
|
|
+ //应入辅数量
|
|
|
+ itemvo.setNneedinassistnum(ninassistnum);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// //金额
|
|
|
// itemvo.setNmny(vector.get(25)== null ? null : new UFDouble(vector.get(25).toString()));
|
|
|
// //单价
|
|
@@ -462,7 +532,7 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
//源头单据表头ID
|
|
|
itemvo.setCfirstbillhid(pk_order);
|
|
|
//源头单据表体ID
|
|
|
- itemvo.setCfirstbillbid(vector.get(34).toString());
|
|
|
+ itemvo.setCfirstbillbid(vector.get(35).toString());
|
|
|
//源头单据类型
|
|
|
itemvo.setCfirsttype("55A2");
|
|
|
//项目ID
|
|
@@ -470,7 +540,7 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
//来源单据表头序列号
|
|
|
itemvo.setCsourcebillhid(pk_order);
|
|
|
//来源单据表体序列号
|
|
|
- itemvo.setCsourcebillbid(vector.get(34).toString());
|
|
|
+ itemvo.setCsourcebillbid(vector.get(35).toString());
|
|
|
//来源单据类型
|
|
|
itemvo.setCsourcetype("55A2");
|
|
|
//原币无税金额
|
|
@@ -487,37 +557,72 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
// itemvo.setNtaxprice(vector.get(22) == null ? null : new UFDouble(vector.get(22).toString()));
|
|
|
//itemvo.setPk_calbody(GetBaseDAOUtil.getcalpk(pk_corp));
|
|
|
//批次号
|
|
|
- itemvo.setVbatchcode(vector.get(7) == null ? null : vector.get(7).toString());
|
|
|
- itemvo.setAttributeValue("pk_defdoc1", vector.get(37)==null?null:vector.get(37).toString());//楼号楼层
|
|
|
- itemvo.setAttributeValue("pk_defdoc2", vector.get(38)==null?null:vector.get(38).toString());//樘数(数量)
|
|
|
- itemvo.setAttributeValue("pk_defdoc3", vector.get(39)==null?null:vector.get(39).toString());//框统计
|
|
|
- itemvo.setAttributeValue("pk_defdoc4", vector.get(40)==null?null:vector.get(40).toString());//扇统计
|
|
|
- itemvo.setAttributeValue("pk_defdoc5", vector.get(41)==null?null:vector.get(41).toString());//半成品分类
|
|
|
- itemvo.setAttributeValue("pk_defdoc6", vector.get(42)==null?null:vector.get(42).toString());//面积
|
|
|
- itemvo.setAttributeValue("pk_defdoc7", vector.get(43)==null?null:vector.get(43).toString());//切割长度
|
|
|
- itemvo.setAttributeValue("pk_defdoc8", vector.get(44)==null?null:vector.get(44).toString());//切割角度左下
|
|
|
- itemvo.setAttributeValue("pk_defdoc9", vector.get(45)==null?null:vector.get(45).toString());//切割角度右上
|
|
|
- itemvo.setAttributeValue("pk_defdoc10", vector.get(46)==null?null:vector.get(46).toString());//备注
|
|
|
- itemvo.setAttributeValue("pk_defdoc11", vector.get(18)==null?null:vector.get(18).toString());//宽度
|
|
|
- itemvo.setAttributeValue("pk_defdoc12", vector.get(19)==null?null:vector.get(19).toString());//高度
|
|
|
- itemvo.setAttributeValue("pk_defdoc13", vector.get(47)==null?null:vector.get(47).toString());//系列
|
|
|
- itemvo.setAttributeValue("pk_defdoc14", vector.get(48)==null?null:vector.get(48).toString());//玻璃编号
|
|
|
+ itemvo.setVbatchcode(vector.get(8) == null ? null : vector.get(8).toString());
|
|
|
+
|
|
|
+// itemvo.setAttributeValue("pk_defdoc1", vector.get(37)==null?null:vector.get(37).toString());//楼号楼层
|
|
|
+// itemvo.setAttributeValue("pk_defdoc2", vector.get(38)==null?null:vector.get(38).toString());//樘数(数量)
|
|
|
+// itemvo.setAttributeValue("pk_defdoc3", vector.get(39)==null?null:vector.get(39).toString());//框统计
|
|
|
+// itemvo.setAttributeValue("pk_defdoc4", vector.get(40)==null?null:vector.get(40).toString());//扇统计
|
|
|
+// itemvo.setAttributeValue("pk_defdoc5", vector.get(41)==null?null:vector.get(41).toString());//半成品分类
|
|
|
+// itemvo.setAttributeValue("pk_defdoc6", vector.get(42)==null?null:vector.get(42).toString());//面积
|
|
|
+// itemvo.setAttributeValue("pk_defdoc7", vector.get(43)==null?null:vector.get(43).toString());//切割长度
|
|
|
+// itemvo.setAttributeValue("pk_defdoc8", vector.get(44)==null?null:vector.get(44).toString());//切割角度左下
|
|
|
+// itemvo.setAttributeValue("pk_defdoc9", vector.get(45)==null?null:vector.get(45).toString());//切割角度右上
|
|
|
+// itemvo.setAttributeValue("pk_defdoc10", vector.get(46)==null?null:vector.get(46).toString());//备注
|
|
|
+// itemvo.setAttributeValue("pk_defdoc11", vector.get(18)==null?null:vector.get(18).toString());//宽度
|
|
|
+// itemvo.setAttributeValue("pk_defdoc12", vector.get(19)==null?null:vector.get(19).toString());//高度
|
|
|
+// itemvo.setAttributeValue("pk_defdoc13", vector.get(47)==null?null:vector.get(47).toString());//系列
|
|
|
+// itemvo.setAttributeValue("pk_defdoc14", vector.get(48)==null?null:vector.get(48).toString());//玻璃编号
|
|
|
+
|
|
|
+
|
|
|
+ itemvo.setAttributeValue("vuserdef1", vector.get(38)==null?null:vector.get(38).toString());//楼号楼层
|
|
|
+ itemvo.setAttributeValue("vuserdef2", vector.get(39)==null?null:vector.get(39).toString());//樘数(数量)
|
|
|
+ itemvo.setAttributeValue("vuserdef3", vector.get(40)==null?null:vector.get(40).toString());//框统计
|
|
|
+ itemvo.setAttributeValue("vuserdef4", vector.get(41)==null?null:vector.get(41).toString());//扇统计
|
|
|
+ itemvo.setAttributeValue("vuserdef5", vector.get(42)==null?null:vector.get(42).toString());//半成品分类
|
|
|
+ itemvo.setAttributeValue("vuserdef6", vector.get(43)==null?null:vector.get(43).toString());//面积
|
|
|
+ itemvo.setAttributeValue("vuserdef7", vector.get(44)==null?null:vector.get(44).toString());//切割长度
|
|
|
+ itemvo.setAttributeValue("vuserdef8", vector.get(45)==null?null:vector.get(45).toString());//切割角度左下
|
|
|
+ itemvo.setAttributeValue("vuserdef9", vector.get(46)==null?null:vector.get(46).toString());//切割角度右上
|
|
|
+ itemvo.setAttributeValue("vuserdef10",vector.get(47)==null?null:vector.get(47).toString());//备注
|
|
|
+ itemvo.setAttributeValue("vuserdef11",vector.get(20)==null?null:vector.get(20).toString());//宽度
|
|
|
+ itemvo.setAttributeValue("vuserdef12",vector.get(21)==null?null:vector.get(21).toString());//高度
|
|
|
+ itemvo.setAttributeValue("vuserdef13",vector.get(48)==null?null:vector.get(48).toString());//系列
|
|
|
+ itemvo.setAttributeValue("vuserdef14",vector.get(49)==null?null:vector.get(49).toString());//玻璃编号
|
|
|
+
|
|
|
+// itemvo.setAttributeValue("vuserdef15",vector.get()==null?null:vector.get().toString());//开票类型
|
|
|
+ itemvo.setAttributeValue("vuserdef17",vector.get(19)==null?null:vector.get(19).toString());//窗号
|
|
|
+ itemvo.setAttributeValue("vuserdef18",vector.get(17)==null?null:vector.get(17).toString());//米重
|
|
|
+ itemvo.setAttributeValue("vuserdef19",vector.get(18)==null?null:vector.get(18).toString());//装饰面周长
|
|
|
+ itemvo.setAttributeValue("vuserdef20",vector.get(6)==null?null:vector.get(6).toString());//专用区
|
|
|
+ itemvo.setAttributeValue("pk_defdoc20",getzyqpk("专用区",vector.get(6)==null?null:vector.get(6).toString()));//专用区
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//源头单据号
|
|
|
itemvo.setVfirstbillcode(headvo.getVbillno());
|
|
|
//来源单据号
|
|
|
itemvo.setVsourcebillcode(headvo.getVbillno());
|
|
|
itemvo.setStatus(2);
|
|
|
listGeneralBillItemVO.add(itemvo);
|
|
|
- itemvo.setVfree1(vector.get(12) == null ? null : vector.get(12).toString());//颜色
|
|
|
- itemvo.setVfree2(vector.get(13) == null ? null : vector.get(14).toString());//合金
|
|
|
- itemvo.setVfree3(vector.get(14) == null ? null : vector.get(13).toString());//定尺
|
|
|
- itemvo.setVfree4(vector.get(15) == null ? null : vector.get(15).toString());//标准
|
|
|
- UFDouble updatenum = new UFDouble(vector.get(30)==null?"0":vector.get(30).toString()).add(new UFDouble(vector.get(1)==null?"0":vector.get(1).toString()));
|
|
|
- updatemap.put(vector.get(34).toString(), updatenum);
|
|
|
+ itemvo.setVfree1(vector.get(13) == null ? null : vector.get(13).toString());//颜色
|
|
|
+ itemvo.setVfree2(vector.get(15) == null ? null : vector.get(15).toString());//合金
|
|
|
+ itemvo.setVfree3(vector.get(14) == null ? null : vector.get(14).toString());//定尺
|
|
|
+ itemvo.setVfree4(vector.get(16) == null ? null : vector.get(16).toString());//标准
|
|
|
+ UFDouble updatenum = new UFDouble(vector.get(31)==null?"0":
|
|
|
+ vector.get(31).toString()).add(new UFDouble(vector.get(1)==null?"0":vector.get(1).toString()));//已执行主数量+本次执行主数量
|
|
|
+ updatemap.put(vector.get(35).toString(), updatenum);//子表主键:已执行主数量+本次执行主数量
|
|
|
+
|
|
|
+ UFDouble updatefznum = new UFDouble(vector.get(32)==null?"0":
|
|
|
+ vector.get(32).toString()).add(new UFDouble(vector.get(2)==null?"0":vector.get(2).toString()));//已执行辅数量+本次执行辅数量
|
|
|
+
|
|
|
+ updatfzemap.put(vector.get(35).toString(), updatefznum);
|
|
|
}
|
|
|
}
|
|
|
aggvo.setChildrenVO(listGeneralBillItemVO.toArray(new GeneralBillItemVO[listGeneralBillItemVO.size()]));
|
|
|
iorder.insertProduct(new GeneralBillVO[]{aggvo},updatemap);
|
|
|
+ iorder.UpdatefzccpExecNum(updatfzemap);
|
|
|
MessageDialog.showHintDlg(mainpanel, "成功", "产成品入库新增成功!");
|
|
|
this.closeCancel();
|
|
|
}
|
|
@@ -591,15 +696,63 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
} catch (Exception e1) {
|
|
|
MessageDialog.showErrorDlg(mainpanel, "错误", e1.getMessage());
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //项目管理档案-编码和名称
|
|
|
+ public Map<String,String> getprojectmap(String pk_jobmngfil ) throws Exception {
|
|
|
+ String sql = "select jobcode,jobname from bd_jobbasfil where "
|
|
|
+ + "pk_jobbasfil = (select pk_jobbasfil from bd_jobmngfil where pk_jobmngfil ='"+pk_jobmngfil+"' and dr = 0) "
|
|
|
+ + "and dr=0";
|
|
|
+ Map<String,String> map = (Map<String, String>) iuap.executeQuery(sql, new MapProcessor());
|
|
|
+ if (map == null || map.size()==0) {
|
|
|
+ throw new Exception("项目管理档案"+pk_jobmngfil+"未查到,请检查");
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ //业务类型自定义档案查询
|
|
|
+ private String getpkdefdoc(String docname ) throws Exception {
|
|
|
+ String sql="select pk_defdoc from bd_defdoc where pk_defdoclist = "
|
|
|
+ + "(select pk_defdoclist from bd_defdef where defname = '业务类型' and dr=0 ) and dr=0 "
|
|
|
+ + "and docname='"+docname+"'";
|
|
|
+
|
|
|
+ Object pkdefdoc = iuap.executeQuery(sql, new ColumnProcessor());
|
|
|
+ if(pkdefdoc == null || "".equals(pkdefdoc)) {
|
|
|
+ throw new Exception("业务类型【"+docname+"】未查到,请检查");
|
|
|
+ }
|
|
|
+
|
|
|
+ return pkdefdoc.toString();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private String getzyqpk(String doclistname,String docname) throws BusinessException {
|
|
|
+
|
|
|
+ if(null==docname || "".equals(docname)) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ //取到自定义档案列表主键
|
|
|
+ String sql = "select pk_defdoclist from bd_defdoclist where doclistname = '"+doclistname+"'";
|
|
|
+ Object pk_defdoclist = iuap.executeQuery(sql, new ColumnProcessor());
|
|
|
+ if(pk_defdoclist == null) {
|
|
|
+ throw new BusinessException("以下档案在U8cloud系统中根据公司或者账簿信息找不到,请检查!详细信息:1、档案类型:自定义档案列表,档案名称:"+doclistname);
|
|
|
+ }
|
|
|
+ String sql1 = "select pk_defdoc from bd_defdoc where pk_defdoclist = '"+pk_defdoclist.toString()+"' and docname ='"+docname+"'";
|
|
|
+ String pk_defdoc = (String) iuap.executeQuery(sql1, new ColumnProcessor());
|
|
|
+
|
|
|
+ return pk_defdoc;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|