diff --git a/.classpath b/.classpath index 55fee7b..48cb177 100644 --- a/.classpath +++ b/.classpath @@ -60,6 +60,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java b/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java index 483b9a7..5ee0548 100644 --- a/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java +++ b/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java @@ -114,10 +114,17 @@ public class GatheringbillRestResource extends ArapBaseRestResource { headvo.setObjtype(0); // 销售订单号 csaleorderid = headvo.getDef3(); + if (StringUtils.isEmpty(csaleorderid)) { + throw new BusinessException("销售订单不能为空"); + // return ResultMessageUtil.exceptionToJSON("销售订单不能为空", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + } // 客户 Object customerid = hybo.findColValue("so_saleorder", "ccustomerid", "csaleorderid = '" + csaleorderid + "' "); Object customerCode = hybo.findColValue("bd_customer", "code", "pk_customer = '" + customerid + "' "); + if (customerid == null || customerCode == null) { + throw new BusinessException("销售订单的关联客户不能为空"); + } headvo.setCustomer(customerCode.toString()); Object tr = dao.executeQuery( @@ -222,6 +229,8 @@ public class GatheringbillRestResource extends ArapBaseRestResource { // UFDouble notax_cr = money_cr.sub(local_tax_cr); itemvo.setNotax_cr(notax_cr); + //zhangxinah增加组织本币无税金额(贷方) + itemvo.setLocal_notax_cr(notax_cr); // itemvo.setRate(UFDouble.ZERO_DBL); // diff --git a/cm/resources/.gitkeep b/cm/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cm/src/client/.gitkeep b/cm/src/client/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cm/src/test/.gitkeep b/cm/src/test/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cmp/resources/.gitkeep b/cmp/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cmp/src/client/yyconfig/modules/cmp/informer/config/userdef/36S3_userdef.xml b/cmp/src/client/yyconfig/modules/cmp/informer/config/userdef/36S3_userdef.xml new file mode 100644 index 0000000..1554bc8 --- /dev/null +++ b/cmp/src/client/yyconfig/modules/cmp/informer/config/userdef/36S3_userdef.xml @@ -0,0 +1,8 @@ + + + + cmp.cmp_informer + vdef + + + diff --git a/cmp/src/public/nc/vo/cmp/informer/InformerVO.java b/cmp/src/public/nc/vo/cmp/informer/InformerVO.java index 90157cf..111904c 100644 --- a/cmp/src/public/nc/vo/cmp/informer/InformerVO.java +++ b/cmp/src/public/nc/vo/cmp/informer/InformerVO.java @@ -105,6 +105,46 @@ public class InformerVO extends SuperVO { public static final String SRCBUSIBILL = "srcbusibill"; public static final String SRCBUSITYPE = "srcbusitype"; public static final String SRCBUSIBILLNAME = "srcbusibillname"; + private java.lang.String vdef1; + private java.lang.String vdef2; + private java.lang.String vdef3; + private java.lang.String vdef4; + private java.lang.String vdef5; + private java.lang.String vdef6; + private java.lang.String vdef7; + private java.lang.String vdef8; + private java.lang.String vdef9; + private java.lang.String vdef10; + private java.lang.String vdef11; + private java.lang.String vdef12; + private java.lang.String vdef13; + private java.lang.String vdef14; + private java.lang.String vdef15; + private java.lang.String vdef16; + private java.lang.String vdef17; + private java.lang.String vdef18; + private java.lang.String vdef19; + private java.lang.String vdef20; + public static final String VDEF1 = "vdef1"; + public static final String VDEF2 = "vdef2"; + public static final String VDEF3 = "vdef3"; + public static final String VDEF4 = "vdef4"; + public static final String VDEF5 = "vdef5"; + public static final String VDEF6 = "vdef6"; + public static final String VDEF7 = "vdef7"; + public static final String VDEF8 = "vdef8"; + public static final String VDEF9 = "vdef9"; + public static final String VDEF10 = "vdef10"; + public static final String VDEF11 = "vdef11"; + public static final String VDEF12 = "vdef12"; + public static final String VDEF13 = "vdef13"; + public static final String VDEF14 = "vdef14"; + public static final String VDEF15 = "vdef15"; + public static final String VDEF16 = "vdef16"; + public static final String VDEF17 = "vdef17"; + public static final String VDEF18 = "vdef18"; + public static final String VDEF19 = "vdef19"; + public static final String VDEF20 = "vdef20"; public static final String DEF01 = "def01"; public String getDef01() { diff --git a/cmp/src/test/.gitkeep b/cmp/src/test/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/gl/resources/.gitkeep b/gl/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/gl/src/private/.gitkeep b/gl/src/private/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/gl/src/public/.gitkeep b/gl/src/public/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/gl/src/test/.gitkeep b/gl/src/test/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/pu/src/client/nccloud/web/ic/outbound/sapplybill/action/.gitkeep b/pu/src/client/nccloud/web/ic/outbound/sapplybill/action/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sc/resources/.gitkeep b/sc/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sc/src/client/.gitkeep b/sc/src/client/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sc/src/public/.gitkeep b/sc/src/public/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sc/src/test/.gitkeep b/sc/src/test/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/so/META-INF/saleorder_saleinvoice.rest b/so/META-INF/saleorder_saleinvoice.rest index 622cd8d..0df7078 100644 --- a/so/META-INF/saleorder_saleinvoice.rest +++ b/so/META-INF/saleorder_saleinvoice.rest @@ -2,6 +2,5 @@ - \ No newline at end of file diff --git a/so/src/public/nc/vo/so/m32/saleinvoice/operator/billSaveAction.java b/so/src/public/nc/vo/so/m32/saleinvoice/operator/billSaveAction.java index 0e0b043..a46fa28 100644 --- a/so/src/public/nc/vo/so/m32/saleinvoice/operator/billSaveAction.java +++ b/so/src/public/nc/vo/so/m32/saleinvoice/operator/billSaveAction.java @@ -130,7 +130,7 @@ public class billSaveAction extends AbstractNCCRestResource { IVApplicationAggVO returnSaveIVApplicationAggVO = serviceImpl.save(iVApplicationAggVO); // Object returnIVApplicationAggVO = PfServiceScmUtil.processBatch("SAVE", "SSCIVA", new IVApplicationAggVO[] { iVApplicationAggVO }, null, null); if (returnSaveIVApplicationAggVO != null) { - return ResultMessageUtil.toJSON(null, "接口调用成功"); + return ResultMessageUtil.toJSON(returnApproveSaleInvoiceVOs, "接口调用成功"); } else { Exception e = new Exception("接口调用失败"); return ResultMessageUtil.exceptionToJSON(e); diff --git a/so/src/public/nccloud/api/so/saleinvoice/operator/saveCommitAction.java b/so/src/public/nccloud/api/so/saleinvoice/operator/saveCommitAction.java index f2d65d1..b721579 100644 --- a/so/src/public/nccloud/api/so/saleinvoice/operator/saveCommitAction.java +++ b/so/src/public/nccloud/api/so/saleinvoice/operator/saveCommitAction.java @@ -138,7 +138,10 @@ public class saveCommitAction extends AbstractNCCRestResource { // 销售发票审核结束 ISaleInvoiceToTaxInvService invoiceService = NCLocator.getInstance() .lookup(ISaleInvoiceToTaxInvService.class); - invoiceService.issueTaxInvoice(saleInvoiceVO, "1"); + // 数电票(增值税专用发票)=31,数电票(普通发票)=32,数电纸质发票(机动车销售统一发票)=36,数电纸质发票(增值税专用发票)=33,数电纸质发票(普通发票)=34, + // 增值税电子普通发票=1,增值税电子专用发票=2,增值税普通发票=3,增值税专用发票=4,增值税电子普通发票(成品油)=8,成品油普通发票(卷式)=9, + // 成品油普通发票=10,成品油专用发票=11,增值税普通发票(卷式)=12,增值税专用发票(机动车)=99 + invoiceService.issueTaxInvoice(saleInvoiceVO, fplxStr); JSONObject desc = r.getDesc(); if (desc != null) { @@ -193,11 +196,11 @@ public class saveCommitAction extends AbstractNCCRestResource { // 2025-2-8付业要求修改,根据发票类型Q(自定义档案)对照发票类型 String ctrantypeidStr = "32-02";// 默认普通发票 if (fplxStr != null && fplxStr.equals("31")) { - ctrantypeidStr = "32-01"; + ctrantypeidStr = "32-01";// 数电票(增值税专用发票) } else if (fplxStr != null && fplxStr.equals("32")) { - ctrantypeidStr = "32-02"; + ctrantypeidStr = "32-02";// 数电票(普通发票) } else if (fplxStr != null && fplxStr.equals("36")) { - ctrantypeidStr = "32-Cxx-03"; + ctrantypeidStr = "32-Cxx-03";// 机动车销售发票 } billhead.put("ctrantypeid", ctrantypeidStr);// 发票类型 // billhead.put("ctrantypeid", "32-02");//发票类型 diff --git a/so/src/public/nccloud/openapi/so/m30/SaleOrderResource.java b/so/src/public/nccloud/openapi/so/m30/SaleOrderResource.java index df25a03..5f6292e 100644 --- a/so/src/public/nccloud/openapi/so/m30/SaleOrderResource.java +++ b/so/src/public/nccloud/openapi/so/m30/SaleOrderResource.java @@ -1,18 +1,17 @@ package nccloud.openapi.so.m30; -import nc.itf.bd.defdoc.IDefdocService; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import nc.jdbc.framework.processor.*; +import nc.bd.itf.tools.BFPubTools; +import nc.bs.dao.BaseDAO; import nc.bs.framework.common.InvocationInfoProxy; import nc.bs.framework.common.NCLocator; +import nc.itf.bd.defdoc.IDefdocService; +import nc.itf.pim.project.prv.IProject; +import nc.jdbc.framework.processor.ColumnListProcessor; +import nc.jdbc.framework.processor.ColumnProcessor; +import nc.jdbc.framework.processor.MapProcessor; import nc.vo.bd.defdoc.DefdocVO; +import nc.vo.pim.project.ProjectHeadVO; import nc.vo.pub.BusinessException; import nc.vo.pub.lang.UFDateTime; import nc.vo.pubapp.AppContext; @@ -26,11 +25,15 @@ import nccloud.openapi.scmpub.pub.NCCPubRestResource; import nccloud.openapi.scmpub.pub.TransferCodeToPKTool; import nccloud.openapi.scmpub.pub.TransferMapToVOTool; import nccloud.openapi.scmpub.util.CallReturnBuildUtil; -import nc.bs.dao.BaseDAO; -import nc.bd.itf.tools.BFPubTools; import org.json.JSONString; -import nc.vo.pim.project.ProjectHeadVO; -import nc.itf.pim.project.prv.IProject; + +import javax.ws.rs.Consumes; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; /** @@ -41,441 +44,443 @@ import nc.itf.pim.project.prv.IProject; @Path("so/saleorder") public class SaleOrderResource extends NCCPubRestResource { - private static String BODYTABLE = "so_saleorder_b"; - private static String HEADTABLE = "so_saleorder"; - public BaseDAO dao; + private static String BODYTABLE = "so_saleorder_b"; + private static String HEADTABLE = "so_saleorder"; + public BaseDAO dao; - public BaseDAO getDao() { - if (dao == null) { - dao = new BaseDAO(); - } - return dao; - } + public BaseDAO getDao() { + if (dao == null) { + dao = new BaseDAO(); + } + return dao; + } - @POST - @Path("operation/save") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString save(Map paramMap) { - List> paramList = (List) paramMap.get("array"); - return saveold(paramList); - } + @POST + @Path("operation/save") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString save(Map paramMap) { + List> paramList = (List) paramMap.get("array"); + return saveold(paramList); + } - public JSONString saveold(List> paramList) { - try { - for (Map map : paramList) { - if (!map.containsKey(HEADTABLE) || !map.containsKey(BODYTABLE)) { - return ResultMessageUtil.exceptionToJSON("传入参数不能为空", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); - } - } + public JSONString saveold(List> paramList) { + try { + for (Map map : paramList) { + if (!map.containsKey(HEADTABLE) || !map.containsKey(BODYTABLE)) { + return ResultMessageUtil.exceptionToJSON("传入参数不能为空", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + } + } - IAPISaleOrderMaitain service = (IAPISaleOrderMaitain) NCLocator.getInstance() - .lookup(IAPISaleOrderMaitain.class); - SaleOrderVO[] results = service.save(paramList); + IAPISaleOrderMaitain service = (IAPISaleOrderMaitain) NCLocator.getInstance() + .lookup(IAPISaleOrderMaitain.class); + SaleOrderVO[] results = service.save(paramList); - return ResultMessageUtil.toJSON(results, "销售订单新增保存成功"); - } catch (Exception e) { - return ResultMessageUtil.exceptionToJSON(e); - } - } + return ResultMessageUtil.toJSON(results, "销售订单新增保存成功"); + } catch (Exception e) { + return ResultMessageUtil.exceptionToJSON(e); + } + } - /** - * - * @Description: 在2312基础上适配2005代码 - * @date: 2025年3月19日 18点11分 - * @version NCC2312 - */ - @SuppressWarnings("unchecked") - @POST - @Path("save") - @Consumes("application/json") - @Produces("application/json") - public JSONString save(List> paramList) { - InvocationInfoProxy.getInstance().setGroupId("0001A110000000000677"); - try { - for (Map map : paramList) { - if (!map.containsKey(HEADTABLE) || !map.containsKey(BODYTABLE)) { - return NCCRestUtils.toJSONString(CallReturnBuildUtil.buildHeadBodyResult()); - } - // 设置集团 - Map headdata = (Map) map.get(HEADTABLE); - headdata.put("pk_org", headdata.get("pk_org_v")); - headdata.put("cdeptid", headdata.get("cdeptvid")); - headdata.put("fstatusflag", 1); - headdata.put("dmakedate", headdata.get("dbilldate")); - headdata.put("dmakedate", headdata.get("dbilldate")); - headdata.put("cinvoicecustid", headdata.get("ccustomerid")); - headdata.put("ccustomervid", headdata.get("ccustomerid")); - String pk_group = AppContext.getInstance().getPkGroup(); - headdata.put("pk_group", pk_group); - List bodyArr = (List) map.get(BODYTABLE); - for (Object body : bodyArr) { - Map bodydata = (Map) body; - bodydata.put("pk_group", pk_group); - bodydata.put("cprojectid", headdata.get("vdef6")); - //bodydata.put("ctrafficorgvid", headdata.get("pk_org_v")); - bodydata.put("csendstockorgvid", headdata.get("pk_org_v")); - //bodydata.put("csendstordocid", headdata.get("pk_org_v")); - bodydata.put("csendstockorgid", headdata.get("pk_org_v")); - bodydata.put("carorgid", headdata.get("pk_org_v")); - bodydata.put("carorgvid", headdata.get("pk_org_v")); - bodydata.put("csettleorgid", headdata.get("pk_org_v")); - bodydata.put("csettleorgvid", headdata.get("pk_org_v")); - bodydata.put("ctaxcountryid", "CN"); - bodydata.put("crececountryid", "CN"); - bodydata.put("csendcountryid", "CN"); - bodydata.put("fbuysellflag", 1); - // 根据物料编码查询物料信息 - setMaterl(bodydata); - } - } - // 新增自定义档案 - SaleOrderVO[] salevos = OpenAPIParaUtil.changeVO(paramList, HEADTABLE, BODYTABLE); - genDef(salevos); - for (Map map : paramList) { - BaseDAO baseDAO = new BaseDAO(); - Map headdata = (Map) map.get(HEADTABLE); - List bodyArr = (List) map.get(BODYTABLE); - for (Object body : bodyArr) { - Map bodydata = (Map) body; - String sql = " select pk_project from bd_project where project_code='" + headdata.get("vdef6") - + "' and nvl(dr,0)=0 "; - String o_pk_project = (String) baseDAO.executeQuery(sql, new ColumnProcessor()); - bodydata.put("cprojectid", o_pk_project); - } - } + /** + * @Description: 在2312基础上适配2005代码 + * @date: 2025年3月19日 18点11分 + * @version NCC2312 + */ + @SuppressWarnings("unchecked") + @POST + @Path("save") + @Consumes("application/json") + @Produces("application/json") + public JSONString save(List> paramList) { + InvocationInfoProxy.getInstance().setGroupId("0001A110000000000677"); + try { + for (Map map : paramList) { + if (!map.containsKey(HEADTABLE) || !map.containsKey(BODYTABLE)) { + return NCCRestUtils.toJSONString(CallReturnBuildUtil.buildHeadBodyResult()); + } + // 设置集团 + Map headdata = (Map) map.get(HEADTABLE); + headdata.put("pk_org", headdata.get("pk_org_v")); + headdata.put("cdeptid", headdata.get("cdeptvid")); + headdata.put("fstatusflag", 1); + headdata.put("dmakedate", headdata.get("dbilldate")); + headdata.put("dmakedate", headdata.get("dbilldate")); + headdata.put("cinvoicecustid", headdata.get("ccustomerid")); + headdata.put("ccustomervid", headdata.get("ccustomerid")); + String pk_group = AppContext.getInstance().getPkGroup(); + headdata.put("pk_group", pk_group); + List bodyArr = (List) map.get(BODYTABLE); + for (Object body : bodyArr) { + Map bodydata = (Map) body; + bodydata.put("pk_group", pk_group); + bodydata.put("cprojectid", headdata.get("vdef6")); + // bodydata.put("ctrafficorgvid", headdata.get("pk_org_v")); + bodydata.put("csendstockorgvid", headdata.get("pk_org_v")); + // bodydata.put("csendstordocid", headdata.get("pk_org_v")); + bodydata.put("csendstockorgid", headdata.get("pk_org_v")); + bodydata.put("carorgid", headdata.get("pk_org_v")); + bodydata.put("carorgvid", headdata.get("pk_org_v")); + bodydata.put("csettleorgid", headdata.get("pk_org_v")); + bodydata.put("csettleorgvid", headdata.get("pk_org_v")); + bodydata.put("ctaxcountryid", "CN"); + bodydata.put("crececountryid", "CN"); + bodydata.put("csendcountryid", "CN"); + bodydata.put("fbuysellflag", 1); + // 根据物料编码查询物料信息 + setMaterl(bodydata); + } + } + // 新增自定义档案 + SaleOrderVO[] salevos = OpenAPIParaUtil.changeVO(paramList, HEADTABLE, BODYTABLE); + genDef(salevos); + for (Map map : paramList) { + BaseDAO baseDAO = new BaseDAO(); + Map headdata = (Map) map.get(HEADTABLE); + List bodyArr = (List) map.get(BODYTABLE); + for (Object body : bodyArr) { + Map bodydata = (Map) body; + String sql = " select pk_project from bd_project where project_code='" + headdata.get("vdef6") + + "' and nvl(dr,0)=0 "; + String o_pk_project = (String) baseDAO.executeQuery(sql, new ColumnProcessor()); + bodydata.put("cprojectid", o_pk_project); + } + } - // 参数形式转换为vo并翻译 - List vosList = - TransferMapToVOTool.transferMapToAggVO(paramList, SaleOrderVO.class); - vosList = TransferCodeToPKTool.transferAggVO(vosList); - SaleOrderVO[] vos = vosList.toArray(new SaleOrderVO[vosList.size()]); + // 参数形式转换为vo并翻译 + List vosList = + TransferMapToVOTool.transferMapToAggVO(paramList, SaleOrderVO.class); + vosList = TransferCodeToPKTool.transferAggVO(vosList); + SaleOrderVO[] vos = vosList.toArray(new SaleOrderVO[vosList.size()]); - // 调用接口保存 - IAPISaleOrderMaitain service = NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class); - SaleOrderVO[] results = service.save(vos); - // 包装返回信息 - return NCCRestUtils.toJSONString(CallReturnBuildUtil.buildSuccessResult(results, "销售订单保存成功")); - } catch (Exception e) { - return NCCRestUtils.toJSONString(CallReturnBuildUtil.buildFailResult(null, "销售单保存异常:" + e.getMessage())); - } - } + // 调用接口保存 + IAPISaleOrderMaitain service = NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class); + SaleOrderVO[] results = service.save(vos); + // 包装返回信息 + return NCCRestUtils.toJSONString(CallReturnBuildUtil.buildSuccessResult(results, "销售订单保存成功")); + } catch (Exception e) { + return NCCRestUtils.toJSONString(CallReturnBuildUtil.buildFailResult(null, "销售单保存异常:" + e.getMessage())); + } + } - private void genDef(SaleOrderVO[] salevos) throws BusinessException { - BaseDAO baseDAO = new BaseDAO(); - ArrayList arrhth = new ArrayList(); - ArrayList arrxmh = new ArrayList(); - ArrayList arrxsddh = new ArrayList(); - String sql = " select pk_org,pk_vid from org_orgs where org_orgs.code='" + salevos[0].getParentVO().getPk_org() - + "' and nvl(dr,0)=0 and isbusinessunit='Y' "; + private void genDef(SaleOrderVO[] salevos) throws BusinessException { + BaseDAO baseDAO = new BaseDAO(); + ArrayList arrhth = new ArrayList(); + ArrayList arrxmh = new ArrayList(); + ArrayList arrxsddh = new ArrayList(); + String sql = " select pk_org,pk_vid from org_orgs where org_orgs.code='" + salevos[0].getParentVO().getPk_org() + + "' and nvl(dr,0)=0 and isbusinessunit='Y' "; - Map map = (Map) baseDAO.executeQuery(sql, new MapProcessor()); - if (map == null) { - throw new BusinessException("采购组织档案未查到"); - } - String o = (String) map.get("pk_org"); + Map map = (Map) baseDAO.executeQuery(sql, new MapProcessor()); + if (map == null) { + throw new BusinessException("采购组织档案未查到"); + } + String o = (String) map.get("pk_org"); - String cprocode = salevos[0].getChildrenVO()[0].getCprojectid(); - String cproname = salevos[0].getChildrenVO()[0].getVbdef10(); - if (!BFPubTools.getString_TrimAsNull(cprocode).equals("")) { - sql = " select pk_project from bd_project where project_code='" + cprocode + "' and pk_duty_org='" + o - + "' and nvl(dr,0)=0 "; - String o_pk_project = (String) baseDAO.executeQuery(sql, new ColumnProcessor()); - if (o_pk_project == null) { - // 新增项目档案 - createPro(cprocode, cproname, map); - } - } + String cprocode = salevos[0].getChildrenVO()[0].getCprojectid(); + String cproname = salevos[0].getChildrenVO()[0].getVbdef10(); + if (!BFPubTools.getString_TrimAsNull(cprocode).equals("")) { + sql = " select pk_project from bd_project where project_code='" + cprocode + "' and pk_duty_org='" + o + + "' and nvl(dr,0)=0 "; + String o_pk_project = (String) baseDAO.executeQuery(sql, new ColumnProcessor()); + if (o_pk_project == null) { + // 新增项目档案 + createPro(cprocode, cproname, map); + } + } - for (int i = 0; i < salevos.length; i++) { - String vdef6 = BFPubTools.getString_TrimAsNull(salevos[i].getParentVO().getVdef6()); - if (vdef6 != "" && !arrhth.contains(vdef6)) { - arrhth.add(vdef6); - } + for (int i = 0; i < salevos.length; i++) { + String vdef6 = BFPubTools.getString_TrimAsNull(salevos[i].getParentVO().getVdef6()); + if (vdef6 != "" && !arrhth.contains(vdef6)) { + arrhth.add(vdef6); + } - String vdef2 = BFPubTools.getString_TrimAsNull(salevos[i].getParentVO().getVdef2()); - if (vdef2 != "" && !arrxmh.contains(vdef2)) { - arrxmh.add(vdef2); - } + String vdef2 = BFPubTools.getString_TrimAsNull(salevos[i].getParentVO().getVdef2()); + if (vdef2 != "" && !arrxmh.contains(vdef2)) { + arrxmh.add(vdef2); + } - String vdef13 = BFPubTools.getString_TrimAsNull(salevos[i].getParentVO().getVdef13()); - if (vdef13 != "" && !arrxsddh.contains(vdef13)) { - arrxsddh.add(vdef13); - } + String vdef13 = BFPubTools.getString_TrimAsNull(salevos[i].getParentVO().getVdef13()); + if (vdef13 != "" && !arrxsddh.contains(vdef13)) { + arrxsddh.add(vdef13); + } - } - if (arrhth.size() > 0) { - sql = " select code from bd_defdoc where pk_defdoclist in(select pk_defdoclist from bd_defdoclist where code='zdy-001') and pk_org='" - + o + "' and "; - sql += BFPubTools.getInSqlWithOutAnd("code", arrhth, 0, arrhth.size()); - ArrayList obj_arrhth = (ArrayList) baseDAO.executeQuery(sql, new ColumnListProcessor()); - if (obj_arrhth != null && obj_arrhth.size() > 0) { - arrhth.removeAll(obj_arrhth); - } - } + } + if (arrhth.size() > 0) { + sql = " select code from bd_defdoc where pk_defdoclist in(select pk_defdoclist from bd_defdoclist where code='zdy-001') and pk_org='" + + o + "' and "; + sql += BFPubTools.getInSqlWithOutAnd("code", arrhth, 0, arrhth.size()); + ArrayList obj_arrhth = (ArrayList) baseDAO.executeQuery(sql, new ColumnListProcessor()); + if (obj_arrhth != null && obj_arrhth.size() > 0) { + arrhth.removeAll(obj_arrhth); + } + } - // 组装销售订单数据 - if (arrhth.size() > 0) { - NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(o, - createDefVO(arrhth, "zdy-001", o.toString())); - } + // 组装销售订单数据 + if (arrhth.size() > 0) { + NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(o, + createDefVO(arrhth, "zdy-001", o.toString())); + } - if (arrxmh.size() > 0) { - sql = " select code from bd_defdoc where pk_defdoclist in(select pk_defdoclist from bd_defdoclist where code='BQxmh') and pk_org='" - + o + "' and "; - sql += BFPubTools.getInSqlWithOutAnd("code", arrxmh, 0, arrxmh.size()); - ArrayList obj_arrhth = (ArrayList) baseDAO.executeQuery(sql, new ColumnListProcessor()); + if (arrxmh.size() > 0) { + sql = " select code from bd_defdoc where pk_defdoclist in(select pk_defdoclist from bd_defdoclist where code='BQxmh') and pk_org='" + + o + "' and "; + sql += BFPubTools.getInSqlWithOutAnd("code", arrxmh, 0, arrxmh.size()); + ArrayList obj_arrhth = (ArrayList) baseDAO.executeQuery(sql, new ColumnListProcessor()); - if (obj_arrhth != null && obj_arrhth.size() > 0) { + if (obj_arrhth != null && obj_arrhth.size() > 0) { - arrxmh.removeAll(obj_arrhth); - } + arrxmh.removeAll(obj_arrhth); + } - } - if (arrxmh.size() > 0) { - NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(o, - createDefVO(arrxmh, "BQxmh", o.toString())); - } + } + if (arrxmh.size() > 0) { + NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(o, + createDefVO(arrxmh, "BQxmh", o.toString())); + } - if (arrxsddh.size() > 0) { - sql = " select code from bd_defdoc where pk_defdoclist in( select pk_defdoclist from bd_defdoclist where code='BIP-ddh') and pk_org='" - + o + "' and "; - sql += BFPubTools.getInSqlWithOutAnd("code", arrxsddh, 0, arrxsddh.size()); - ArrayList obj_arrhth = (ArrayList) baseDAO.executeQuery(sql, new ColumnListProcessor()); - if (obj_arrhth != null && obj_arrhth.size() > 0) { - arrxsddh.removeAll(obj_arrhth); - } - } - if (arrxsddh.size() > 0) { - NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(o, - createDefVO(arrxsddh, "BIP-ddh", o.toString())); - } + if (arrxsddh.size() > 0) { + sql = " select code from bd_defdoc where pk_defdoclist in( select pk_defdoclist from bd_defdoclist where code='BIP-ddh') and pk_org='" + + o + "' and "; + sql += BFPubTools.getInSqlWithOutAnd("code", arrxsddh, 0, arrxsddh.size()); + ArrayList obj_arrhth = (ArrayList) baseDAO.executeQuery(sql, new ColumnListProcessor()); + if (obj_arrhth != null && obj_arrhth.size() > 0) { + arrxsddh.removeAll(obj_arrhth); + } + } + if (arrxsddh.size() > 0) { + NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(o, + createDefVO(arrxsddh, "BIP-ddh", o.toString())); + } - } + } - private void createPro(String cprocode, String cproname, Map map) throws BusinessException { - String pk_org = (String) map.get("pk_org"); - String pk_org_v = (String) map.get("pk_vid"); + private void createPro(String cprocode, String cproname, Map map) throws BusinessException { + String pk_org = (String) map.get("pk_org"); + String pk_org_v = (String) map.get("pk_vid"); - ProjectHeadVO hvo = new ProjectHeadVO(); - hvo.setProject_code(cprocode); - hvo.setProject_name(cproname); - hvo.setPk_org(pk_org); - hvo.setPk_org_v(pk_org_v); + ProjectHeadVO hvo = new ProjectHeadVO(); + hvo.setProject_code(cprocode); + hvo.setProject_name(cproname); + hvo.setPk_org(pk_org); + hvo.setPk_org_v(pk_org_v); - hvo.setBill_type("4D10"); - hvo.setCreationtime(new UFDateTime()); - hvo.setCreator(InvocationInfoProxy.getInstance().getUserId()); - hvo.setPk_group(InvocationInfoProxy.getInstance().getGroupId()); - hvo.setDr(0); - hvo.setPk_duty_org(pk_org); - hvo.setTransi_type("4D10-01"); - hvo.setPk_eps("1001A110000000004K64"); - hvo.setPk_duty_dept_v(pk_org_v); - hvo.setEnablestate(2); - NCLocator.getInstance().lookup(IProject.class).insertProject(hvo); - } + hvo.setBill_type("4D10"); + hvo.setCreationtime(new UFDateTime()); + hvo.setCreator(InvocationInfoProxy.getInstance().getUserId()); + hvo.setPk_group(InvocationInfoProxy.getInstance().getGroupId()); + hvo.setDr(0); + hvo.setPk_duty_org(pk_org); + hvo.setTransi_type("4D10-01"); + hvo.setPk_eps("1001A110000000004K64"); + hvo.setPk_duty_dept_v(pk_org_v); + hvo.setEnablestate(2); + NCLocator.getInstance().lookup(IProject.class).insertProject(hvo); + } - private DefdocVO[] createDefVO(List newhth, String defdoclistcode, String pk_org) throws BusinessException { - String sql = " select pk_defdoclist from bd_defdoclist where code='" + defdoclistcode + "' "; - String o = (String) getDao().executeQuery(sql, new ColumnProcessor()); + private DefdocVO[] createDefVO(List newhth, String defdoclistcode, String pk_org) throws BusinessException { + String sql = " select pk_defdoclist from bd_defdoclist where code='" + defdoclistcode + "' "; + String o = (String) getDao().executeQuery(sql, new ColumnProcessor()); - ArrayList arrvo = new ArrayList(); - for (int i = 0; i < newhth.size(); i++) { - DefdocVO vo = new DefdocVO(); - vo.setEnablestate(2); - vo.setPk_defdoclist(o); - vo.setPk_org(pk_org); - vo.setCode(newhth.get(i)); - vo.setName(newhth.get(i)); - vo.setDataoriginflag(0); - vo.setDr(0); - vo.setPk_group(InvocationInfoProxy.getInstance().getGroupId()); - vo.setCreator(InvocationInfoProxy.getInstance().getUserId()); - vo.setCreationtime(new UFDateTime()); + ArrayList arrvo = new ArrayList(); + for (int i = 0; i < newhth.size(); i++) { + DefdocVO vo = new DefdocVO(); + vo.setEnablestate(2); + vo.setPk_defdoclist(o); + vo.setPk_org(pk_org); + vo.setCode(newhth.get(i)); + vo.setName(newhth.get(i)); + vo.setDataoriginflag(0); + vo.setDr(0); + vo.setPk_group(InvocationInfoProxy.getInstance().getGroupId()); + vo.setCreator(InvocationInfoProxy.getInstance().getUserId()); + vo.setCreationtime(new UFDateTime()); - arrvo.add(vo); - } + arrvo.add(vo); + } - return arrvo.toArray(new DefdocVO[arrvo.size()]); + return arrvo.toArray(new DefdocVO[arrvo.size()]); - } + } - private void setMaterl(Map bodydata) throws BusinessException { - String sql = " select a.pk_material,a.pk_source, a.pk_measdoc cunitid,nvl(b.pk_measdoc,a.pk_measdoc) castunitid,nvl(b.measrate,'1/1') measrate from bd_material a left join bd_materialconvert b on a.pk_material=b.pk_material where a.code='" - + bodydata.get("cmaterialvid") + "' "; - Map map = (Map) getDao().executeQuery(sql, new MapProcessor()); - if (map == null) { - throw new BusinessException(bodydata.get("cmaterialvid") + "物料未查到"); - } - bodydata.put("castunitid", map.get("castunitid")); - bodydata.put("vchangerate", map.get("measrate")); - // 重新计算金额 - bodydata.put("cqtunitid", map.get("castunitid")); - bodydata.put("cunitid", map.get("cunitid")); + private void setMaterl(Map bodydata) throws BusinessException { + String sql = " select a.pk_material,a.pk_source, a.pk_measdoc cunitid,nvl(b.pk_measdoc,a.pk_measdoc) castunitid,nvl(b.measrate,'1/1') measrate from bd_material a left join bd_materialconvert b on a.pk_material=b.pk_material where a.code='" + + bodydata.get("cmaterialvid") + "' "; + Map map = (Map) getDao().executeQuery(sql, new MapProcessor()); + if (map == null) { + throw new BusinessException(bodydata.get("cmaterialvid") + "物料未查到"); + } + bodydata.put("castunitid", map.get("castunitid")); + bodydata.put("vchangerate", map.get("measrate")); + // 重新计算金额 + bodydata.put("cqtunitid", map.get("castunitid")); + bodydata.put("cunitid", map.get("cunitid")); - bodydata.put("cmaterialid", map.get("pk_material")); - bodydata.put("cmaterialvid", map.get("pk_source")); + bodydata.put("cmaterialid", map.get("pk_material")); + bodydata.put("cmaterialvid", map.get("pk_source")); - bodydata.put("nqtunitnum", BFPubTools.getUFDouble_NullAsZero(bodydata.get("nnum")) - .div(BFPubTools.getUFDouble_NullAsZero(map.get("measrate").toString().split("/")[0]))); - - bodydata.put("nastnum", BFPubTools.getUFDouble_NullAsZero(bodydata.get("nnum")) - .div(BFPubTools.getUFDouble_NullAsZero(map.get("measrate").toString().split("/")[0]))); - sql = "select sl.pk_taxcode from bd_taxrate sl inner join bd_taxcode sm on sl.pk_taxcode=sm.pk_taxcode where sl.taxrate=" - + bodydata.get("ntaxrate") + " and sm.pk_group<>'~' " + ""; + bodydata.put("nqtunitnum", BFPubTools.getUFDouble_NullAsZero(bodydata.get("nnum")) + .div(BFPubTools.getUFDouble_NullAsZero(map.get("measrate").toString().split("/")[0]))); - String o_pk_project = (String) getDao().executeQuery(sql, new ColumnProcessor()); - bodydata.put("ctaxcodeid", o_pk_project); + bodydata.put("nastnum", BFPubTools.getUFDouble_NullAsZero(bodydata.get("nnum")) + .div(BFPubTools.getUFDouble_NullAsZero(map.get("measrate").toString().split("/")[0]))); + sql = "select sl.pk_taxcode from bd_taxrate sl inner join bd_taxcode sm on sl.pk_taxcode=sm.pk_taxcode where sl.taxrate=" + + bodydata.get("ntaxrate") + " and sm.pk_group<>'~' " + ""; - } + String o_pk_project = (String) getDao().executeQuery(sql, new ColumnProcessor()); + bodydata.put("ctaxcodeid", o_pk_project); - @POST - @Path("update") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString update(Map paramMap) { - try { - if (paramMap == null || !paramMap.containsKey(HEADTABLE) || !paramMap.containsKey(BODYTABLE)) { - return ResultMessageUtil.exceptionToJSON("传入参数不能为空", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); - } - List> paramList = new ArrayList>(); + } - paramList.add(paramMap); + @POST + @Path("update") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString update(Map paramMap) { + try { + if (paramMap == null || !paramMap.containsKey(HEADTABLE) || !paramMap.containsKey(BODYTABLE)) { + return ResultMessageUtil.exceptionToJSON("传入参数不能为空", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + } + List> paramList = new ArrayList>(); - IAPISaleOrderMaitain service = (IAPISaleOrderMaitain) NCLocator.getInstance() - .lookup(IAPISaleOrderMaitain.class); - SaleOrderVO[] results = service.update(paramList); + paramList.add(paramMap); - return ResultMessageUtil.toJSON(results, "销售订单修改成功"); - } catch (Exception e) { - return ResultMessageUtil.exceptionToJSON(e); - } - } + IAPISaleOrderMaitain service = (IAPISaleOrderMaitain) NCLocator.getInstance() + .lookup(IAPISaleOrderMaitain.class); + SaleOrderVO[] results = service.update(paramList); - @POST - @Path("operation/delete") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString delete(Map paramMap) { - ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); - String[] hids = (String[]) paramArray.toArray(new String[0]); - return delete(hids); - } + // return ResultMessageUtil.toJSON(results, "销售订单修改成功"); + // 包装返回信息 + return NCCRestUtils.toJSONString(CallReturnBuildUtil.buildSuccessResult( + results, "销售订单修改成功")); + } catch (Exception e) { + return ResultMessageUtil.exceptionToJSON(e); + } + } - @POST - @Path("delete") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString delete(String[] hids) { - if (hids == null || hids.length == 0) { - return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); - } + @POST + @Path("operation/delete") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString delete(Map paramMap) { + ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); + String[] hids = (String[]) paramArray.toArray(new String[0]); + return delete(hids); + } - try { - ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)).delete(hids); - String[] arr = new String[0]; - return ResultMessageUtil.toJSON(arr, "销售订单删除成功"); - } catch (Exception e) { - return ResultMessageUtil.exceptionToJSON(new BusinessException("删除销售订单出现异常", e)); - } - } + @POST + @Path("delete") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString delete(String[] hids) { + if (hids == null || hids.length == 0) { + return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + } - @POST - @Path("querybyscheme") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString queryByScheme(Map paramMap) { - SaleOrderVO[] resultVOs = null; + try { + ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)).delete(hids); + String[] arr = new String[0]; + return ResultMessageUtil.toJSON(arr, "销售订单删除成功"); + } catch (Exception e) { + return ResultMessageUtil.exceptionToJSON(new BusinessException("删除销售订单出现异常", e)); + } + } - try { - resultVOs = ((IAPISaleOrderQuery) NCLocator.getInstance().lookup(IAPISaleOrderQuery.class)) - .queryByScheme(paramMap); + @POST + @Path("querybyscheme") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString queryByScheme(Map paramMap) { + SaleOrderVO[] resultVOs = null; - return ResultMessageUtil.toJSON(resultVOs, "查询销售订单成功"); - } catch (Exception e) { - return ResultMessageUtil.exceptionToJSON(e); - } - } + try { + resultVOs = ((IAPISaleOrderQuery) NCLocator.getInstance().lookup(IAPISaleOrderQuery.class)) + .queryByScheme(paramMap); - @POST - @Path("sendapprove") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString sendApprove(Map paramMap) { - SaleOrderVO[] sendApprove = null; - ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); - String[] hids = (String[]) paramArray.toArray(new String[0]); - if (hids == null || hids.length == 0) { - return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); - } + return ResultMessageUtil.toJSON(resultVOs, "查询销售订单成功"); + } catch (Exception e) { + return ResultMessageUtil.exceptionToJSON(e); + } + } - try { - sendApprove = ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)) - .sendApprove(hids); - return ResultMessageUtil.toJSON(sendApprove, "销售订单提交成功"); - } catch (BusinessException e) { - return ResultMessageUtil.exceptionToJSON(e); - } - } + @POST + @Path("sendapprove") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString sendApprove(Map paramMap) { + SaleOrderVO[] sendApprove = null; + ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); + String[] hids = (String[]) paramArray.toArray(new String[0]); + if (hids == null || hids.length == 0) { + return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + } - @POST - @Path("unsend") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString unSendApprove(Map paramMap) { - SaleOrderVO[] unSend = null; - ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); - String[] hids = (String[]) paramArray.toArray(new String[0]); - if (hids == null || hids.length == 0) { - return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); - } + try { + sendApprove = ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)) + .sendApprove(hids); + return ResultMessageUtil.toJSON(sendApprove, "销售订单提交成功"); + } catch (BusinessException e) { + return ResultMessageUtil.exceptionToJSON(e); + } + } - try { - unSend = ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)) - .unSendApprove(hids); - return ResultMessageUtil.toJSON(unSend, "销售订单收回成功"); - } catch (BusinessException e) { - return ResultMessageUtil.exceptionToJSON(e); - } - } + @POST + @Path("unsend") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString unSendApprove(Map paramMap) { + SaleOrderVO[] unSend = null; + ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); + String[] hids = (String[]) paramArray.toArray(new String[0]); + if (hids == null || hids.length == 0) { + return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + } - @POST - @Path("approve") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString approve(Map paramMap) { - SaleOrderVO[] aprove = null; - ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); - String[] hids = (String[]) paramArray.toArray(new String[0]); - if (hids == null || hids.length == 0) { - return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); - } - try { - aprove = ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)).approve(hids); - return ResultMessageUtil.toJSON(aprove, "销售订单审批成功"); - } catch (BusinessException e) { - return ResultMessageUtil.exceptionToJSON(e); - } - } + try { + unSend = ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)) + .unSendApprove(hids); + return ResultMessageUtil.toJSON(unSend, "销售订单收回成功"); + } catch (BusinessException e) { + return ResultMessageUtil.exceptionToJSON(e); + } + } - @POST - @Path("unapprove") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - public JSONString unApprove(Map paramMap) { - SaleOrderVO[] unaprove = null; - ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); - String[] hids = (String[]) paramArray.toArray(new String[0]); - if (hids == null || hids.length == 0) { - return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); - } - try { - unaprove = ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)) - .unApprove(hids); - return ResultMessageUtil.toJSON(unaprove, "销售订单取消审批成功"); - } catch (BusinessException e) { - return ResultMessageUtil.exceptionToJSON(e); - } - } + @POST + @Path("approve") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString approve(Map paramMap) { + SaleOrderVO[] aprove = null; + ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); + String[] hids = (String[]) paramArray.toArray(new String[0]); + if (hids == null || hids.length == 0) { + return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + } + try { + aprove = ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)).approve(hids); + return ResultMessageUtil.toJSON(aprove, "销售订单审批成功"); + } catch (BusinessException e) { + return ResultMessageUtil.exceptionToJSON(e); + } + } + + @POST + @Path("unapprove") + @Consumes({"application/json"}) + @Produces({"application/json"}) + public JSONString unApprove(Map paramMap) { + SaleOrderVO[] unaprove = null; + ArrayList paramArray = (ArrayList) paramMap.get("csaleorderid"); + String[] hids = (String[]) paramArray.toArray(new String[0]); + if (hids == null || hids.length == 0) { + return ResultMessageUtil.exceptionToJSON("传入参数为空,请检查", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + } + try { + unaprove = ((IAPISaleOrderMaitain) NCLocator.getInstance().lookup(IAPISaleOrderMaitain.class)) + .unApprove(hids); + return ResultMessageUtil.toJSON(unaprove, "销售订单取消审批成功"); + } catch (BusinessException e) { + return ResultMessageUtil.exceptionToJSON(e); + } + } } diff --git a/ssctp/resources/.gitkeep b/ssctp/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ssctp/src/client/.gitkeep b/ssctp/src/client/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ssctp/src/private/.gitkeep b/ssctp/src/private/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ssctp/src/test/.gitkeep b/ssctp/src/test/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/yxy/resources/.gitkeep b/yxy/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/yxy/src/client/.gitkeep b/yxy/src/client/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/yxy/src/private/.gitkeep b/yxy/src/private/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/yxy/src/public/.gitkeep b/yxy/src/public/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/yxy/src/test/.gitkeep b/yxy/src/test/.gitkeep new file mode 100644 index 0000000..e69de29