|
@@ -25,10 +25,10 @@ import u8c.vo.DemandVO;
|
|
|
public class DemandPurchaseRequisitionImpl implements IDemandPurchaseRequisition {
|
|
|
|
|
|
private IUAPQueryBS iuap = NCLocator.getInstance().lookup(IUAPQueryBS.class);
|
|
|
- DemandTestUI frameUI = null;
|
|
|
+
|
|
|
|
|
|
|
|
|
- * 根据材料采购单生成请购单
|
|
|
+ * 鏍规嵁鏉愭枡閲囪喘鍗曠敓鎴愯�璐�崟
|
|
|
* @param s
|
|
|
* @throws Exception
|
|
|
*/
|
|
@@ -47,32 +47,32 @@ public class DemandPurchaseRequisitionImpl implements IDemandPurchaseRequisition
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
PraybillHeaderVO header = new PraybillHeaderVO();
|
|
|
- header.setPk_corp(demandVO.getPk_corp());
|
|
|
- header.setDpraydate(demandVO.getDbilldate());
|
|
|
- header.setIpraysource(5);
|
|
|
- header.setIpraytype(2);
|
|
|
- header.isDirecttransit(new UFBoolean(true));
|
|
|
- header.setIbillstatus(0);
|
|
|
- header.setCpraypsn(demandVO.getWorkmanid());
|
|
|
- header.setCdeptid(demandVO.getPlandeptid());
|
|
|
- header.setVmemo(demandVO.getVnote());
|
|
|
+ header.setPk_corp(demandVO.getPk_corp());
|
|
|
+ header.setDpraydate(demandVO.getDbilldate());
|
|
|
+ header.setIpraysource(5);
|
|
|
+ header.setIpraytype(2);
|
|
|
+ header.isDirecttransit(new UFBoolean(true));
|
|
|
+ header.setIbillstatus(0);
|
|
|
+ header.setCpraypsn(demandVO.getWorkmanid());
|
|
|
+ header.setCdeptid(demandVO.getPlandeptid());
|
|
|
+ header.setVmemo(demandVO.getVnote());
|
|
|
header.setDr(0);
|
|
|
- header.setCaccountyear(String.valueOf(new UFDate().getYear()));
|
|
|
- header.setCoperator(demandVO.getBillmaker());
|
|
|
+ header.setCaccountyear(String.valueOf(new UFDate().getYear()));
|
|
|
+ header.setCoperator(demandVO.getBillmaker());
|
|
|
PraybillItemVO[] items = new PraybillItemVO[demandBVOs.size()];
|
|
|
for (int i = 0; i < demandBVOs.size(); i++) {
|
|
|
DemandBVO demandBVO = demandBVOs.get(i);
|
|
|
PraybillItemVO praybillItemVO = new PraybillItemVO();
|
|
|
- praybillItemVO.setPk_corp(demandVO.getPk_corp());
|
|
|
-
|
|
|
- praybillItemVO.setRowno((i+1)*10+"");
|
|
|
- praybillItemVO.setCmangid(getCmangid(demandBVO.getCmaterialcode()));
|
|
|
- praybillItemVO.setNpraynum(demandBVO.getNum());
|
|
|
- praybillItemVO.setDdemanddate(new UFDate());
|
|
|
- String cprojectid = "";
|
|
|
+ praybillItemVO.setPk_corp(demandVO.getPk_corp());
|
|
|
+
|
|
|
+ praybillItemVO.setRowno((i+1)*10+"");
|
|
|
+ praybillItemVO.setCmangid(getCmangid(demandBVO.getCmaterialcode()));
|
|
|
+ praybillItemVO.setNpraynum(demandBVO.getNum());
|
|
|
+ praybillItemVO.setDdemanddate(new UFDate());
|
|
|
+ String cprojectid = "";
|
|
|
if(demandBVO.getPrjcode().startsWith("1001")) {
|
|
|
cprojectid = demandBVO.getPrjcode();
|
|
|
}
|
|
@@ -80,9 +80,9 @@ public class DemandPurchaseRequisitionImpl implements IDemandPurchaseRequisition
|
|
|
cprojectid = GetBaseDAOUtil.getprojectid(demandBVO.getPrjcode());
|
|
|
}
|
|
|
praybillItemVO.setCprojectid(cprojectid);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
items[i] = praybillItemVO;
|
|
|
}
|
|
|
PraybillVO vo = new PraybillVO();
|
|
@@ -92,14 +92,14 @@ public class DemandPurchaseRequisitionImpl implements IDemandPurchaseRequisition
|
|
|
praybillVOs[0] = vo;
|
|
|
IplatFormEntry iIplatFormEntry = (IplatFormEntry)NCLocator.getInstance().lookup(IplatFormEntry.class.getName());
|
|
|
ArrayList retObj = (ArrayList) iIplatFormEntry.processAction("SAVEBASE", "20", vo.getHeadVO().getDpraydate().toString(), null, vo, null, null);
|
|
|
- MessageDialog.showHintDlg(frameUI, "成功", "请购单新增成功");
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
- * 根据物料code查询主键
|
|
|
+ * 鏍规嵁鐗╂枡code鏌ヨ�涓婚敭
|
|
|
* @param code
|
|
|
* @return
|
|
|
* @throws BusinessException
|
|
@@ -109,7 +109,7 @@ public class DemandPurchaseRequisitionImpl implements IDemandPurchaseRequisition
|
|
|
String sql = " select pk_invbasdoc from bd_invbasdoc" + " where invcode ='" + code + "' and dr =0 ";
|
|
|
cmangid = (String) iuap.executeQuery(sql, new ColumnProcessor());
|
|
|
if (cmangid == null) {
|
|
|
- throw new BusinessException("U8C物料code不存在:" + code);
|
|
|
+ throw new BusinessException("U8C鐗╂枡code涓嶅瓨鍦�:" + code);
|
|
|
}
|
|
|
return cmangid;
|
|
|
}
|