同步启源的累计开票数量调整
This commit is contained in:
		
							parent
							
								
									e0fa187e52
								
							
						
					
					
						commit
						710447bad3
					
				|  | @ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONObject; | |||
| import nc.bs.ic.pub.rewrite.RewriteBPTemplate; | ||||
| import nc.bs.logging.Log; | ||||
| import nc.bs.logging.Logger; | ||||
| import nc.bs.trade.business.HYPubBO; | ||||
| import nc.bs.uapbd.util.MyHelper; | ||||
| import nc.bs.uapbd.util.ThirdPartyPostRequestUtil; | ||||
| import nc.vo.ic.m45.entity.PurchaseInBodyVO; | ||||
|  | @ -24,7 +25,7 @@ import java.util.Map; | |||
| 
 | ||||
| public class Bill45For25Rewrite extends RewriteBPTemplate<PurchaseInBodyVO> { | ||||
|     private static final Log logger = Log.getInstance("qyMesLog"); | ||||
|     private static final String reqUrl = "/IF_QyErpApi.ashx?action=addRkdFpxx"; | ||||
|     private static final String reqUrl = "/IF_QyErpApi.ashx?action=addrkdfpxx"; | ||||
| 
 | ||||
|     public Bill45For25Rewrite() { | ||||
|         super(PurchaseInBodyVO.class); | ||||
|  | @ -57,14 +58,18 @@ public class Bill45For25Rewrite extends RewriteBPTemplate<PurchaseInBodyVO> { | |||
|      * @throws BusinessException | ||||
|      */ | ||||
|     protected void syncQyMes(PurchaseInBodyVO[] vos) throws BusinessException { | ||||
|         HYPubBO hy = new HYPubBO(); | ||||
|         JSONArray contentParam = new JSONArray(); | ||||
|         for (PurchaseInBodyVO vo : vos) { | ||||
|             PurchaseInBodyVO superVO = (PurchaseInBodyVO) hy.queryByPrimaryKey(PurchaseInBodyVO.class, vo.getCgeneralbid()); | ||||
|             // 启源入库单行主键 | ||||
|             String vbdef20 = vo.getVbdef20(); | ||||
|             String vbdef20 = superVO.getVbdef20(); | ||||
|             if (vbdef20 == null || vbdef20.isEmpty() || "~".equals(vbdef20)) { | ||||
|                 continue; | ||||
|             } | ||||
|             String nsignnum = vo.getNsignnum().toString(); | ||||
|             Double nsignnum = vo.getNsignnum().toDouble(); | ||||
|             // Double nnum = vo.getNnum().toDouble(); | ||||
|             // Double num = nnum + nsignnum; | ||||
|             JSONObject param = new JSONObject(); | ||||
|             param.put("rkqdid", vbdef20); // 启源入库单行主键 | ||||
|             param.put("ydyfpsl", nsignnum);// 累计开票数量 | ||||
|  | @ -91,11 +96,13 @@ public class Bill45For25Rewrite extends RewriteBPTemplate<PurchaseInBodyVO> { | |||
|         logger.error("qyMes-purchasein-url = " + requestUrl); | ||||
|         String result = ThirdPartyPostRequestUtil.sendPostRequest(requestUrl, jsonStr); | ||||
|         NCCForUAPLogger.debug("qyMes-purchasein-result = " + result); | ||||
|         JSONObject resultObj = JSONObject.parseObject(result); | ||||
|         logger.error("qyMes-purchasein-res = " + result); | ||||
| 
 | ||||
|         if (!"true".equals(resultObj.getString("success"))) { | ||||
|             Logger.error("qyMes-purchasein-error,result[" + resultObj.toJSONString() + "]"); | ||||
|         if (!result.isEmpty()) { | ||||
|             JSONObject resultObj = JSONObject.parseObject(result); | ||||
|             if (!"true".equals(resultObj.getString("success"))) { | ||||
|                 Logger.error("qyMes-purchasein-error,result[" + resultObj.toJSONString() + "]"); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue