Merge branch 'main' of http://172.168.16.71:7070/taikai/taikai2312.git into main
This commit is contained in:
		
						commit
						20ce9f86d9
					
				
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -138,80 +138,6 @@ public class AfterSignRuleSyncInToMesProcess implements IRule<GeneralInVO> { | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     private void syncTransferIn(GeneralInVO generalInVO) throws BusinessException { | ||||
|         GeneralInHeadVO head = generalInVO.getHead(); | ||||
|         // 表体body信息拼接 | ||||
|         JSONArray details = new JSONArray(); | ||||
|         // 填充details | ||||
|         for (GeneralInBodyVO body : generalInVO.getBodys()) { | ||||
|             JSONObject temp = new JSONObject(); | ||||
|             temp.put("orderNo", head.getVbillcode()); // 通知单ID | ||||
|             temp.put("sequenceNum", body.getCrowno()); // 通知单序号 | ||||
|             temp.put("type", "DBRK"); // 事务类型 | ||||
|             MaterialVersionVO materialVersionVO = (MaterialVersionVO) IUIFSERVICE.queryByPrimaryKey(MaterialVersionVO.class, body.getCmaterialvid()); | ||||
|             if (Objects.isNull(materialVersionVO)) { | ||||
|                 throw new BusinessException("物料信息不存在, 主键:" + body.getCmaterialvid()); | ||||
|             } | ||||
|             temp.put("materialId", materialVersionVO.getCode()); // 物料ID | ||||
|             temp.put("outQty", body.getNnum() != null ? body.getNnum().doubleValue() : null); // 应发数量 | ||||
|             temp.put("actInQty", body.getNshouldnum() != null ? body.getNshouldnum().doubleValue() : null); // 实收数量 | ||||
|             temp.put("assistActInQry", body.getNassistnum() != null ? body.getNassistnum().doubleValue() : 0); // 辅助实收数量 | ||||
|             temp.put("productNum", null); // 产品编号 | ||||
|             temp.put("inStorageId", body.getClocationid()); // 库位 | ||||
|             temp.put("inBatchNum", body.getVbatchcode()); // 物料批号 | ||||
|             temp.put("customId", null); // 客户ID | ||||
|             temp.put("supplierId", null); // 供应商ID | ||||
|             temp.put("manufactureDate", null); // 生产日期 | ||||
|             temp.put("color", null); // 颜色 | ||||
|             temp.put("packLen", null); // 包装长度 | ||||
|             temp.put("packSize", null); // 包装尺寸 | ||||
|             temp.put("remark", body.getVnotebody()); // 备注 (行) | ||||
|             details.add(temp); | ||||
|         } | ||||
| 
 | ||||
|         JSONObject info = new JSONObject(); | ||||
|         info.put("details", details); // 明细 | ||||
|         // 从head中取数 | ||||
|         info.put("orderNo", head.getVbillcode()); // 通知单ID | ||||
|         info.put("type", "DBRK"); // 事务类型 | ||||
|         info.put("outDate", head.getDbilldate() != null ? head.getDbilldate().toString() : null); // 出库日期 | ||||
| 
 | ||||
|         StordocVO outWarehouse = (StordocVO) IUIFSERVICE.queryByPrimaryKey(StordocVO.class, head.getCwarehouseid()); | ||||
|         if (Objects.isNull(outWarehouse)) { | ||||
|             throw new BusinessException("拨出仓库信息不存在, 主键:" + head.getCwarehouseid()); | ||||
|         } | ||||
|         if (outWarehouse.getCode() != null && outWarehouse.getCode().length() > 4) { | ||||
|             throw new BusinessException("MES系统拨出仓库编码[" + outWarehouse.getCode() + "]不能超过4位,请选择合适的仓库!"); | ||||
|         } | ||||
|         info.put("outStoreId", outWarehouse.getCode()); // 仓库ID | ||||
| 
 | ||||
|         StordocVO inWarehouse = (StordocVO) IUIFSERVICE.queryByPrimaryKey(StordocVO.class, head.getCotherwhid()); | ||||
|         if (Objects.isNull(inWarehouse)) { | ||||
|             throw new BusinessException("拨入仓库信息不存在, 主键:" + head.getCotherwhid()); | ||||
|         } | ||||
|         if (inWarehouse.getCode() != null && inWarehouse.getCode().length() > 4) { | ||||
|             throw new BusinessException("MES系统拨入仓库编码[" + inWarehouse.getCode() + "]不能超过4位,请选择合适的仓库!"); | ||||
|         } | ||||
|         info.put("inStoreId", inWarehouse.getCode()); // 仓库ID | ||||
| 
 | ||||
|         info.put("workerNo", null); | ||||
|         info.put("worker", null); | ||||
|         info.put("storeKeeper", head.getCwhsmanagerid()); | ||||
|         info.put("returned", "N"); // 是否退库 | ||||
|         info.put("mark", "N"); // 生成标志 | ||||
|         info.put("remark", head.getVnote()); // 备注 (头) | ||||
| 
 | ||||
| 
 | ||||
|         // 拼接数据,先创建一个jsonObject | ||||
|         JSONObject requestData = new JSONObject(); | ||||
|         requestData.put("operation_type", "I"); // 操作 | ||||
|         requestData.put("info", info); | ||||
|         obmlog.debug("调拨入库requestData:" + requestData.toJSONString()); | ||||
| 
 | ||||
|         HTTP_POST_OTHER_SYS.sendToExternalSystem("/GTHINKING/AjaxService/N_KCSJJS/101527013.ashx/gt_rec_api_dbrkdj", requestData); | ||||
|         obmlog.debug("调拨入库单 " + head.getVbillcode() + " 同步成功"); | ||||
|     } | ||||
| 
 | ||||
|     private String transferCodeByPk(String tableName, String selectField, String pkField, String pk) throws BusinessException { | ||||
|         if (StringUtils.isEmpty(pk)) { | ||||
|             return null; | ||||
|  |  | |||
|  | @ -116,10 +116,10 @@ public class AfterSignRuleSyncOutToMesProcess implements IRule<GeneralOutVO> { | |||
|         if ("4I-01".equals(trantypecode)) { | ||||
|             syncOtherOut(generalOutVO); | ||||
|         } | ||||
| //        // 딧꺅놔욋/瘻욋데 | ||||
| //        else if ("4I-02".equals(trantypecode)) { | ||||
| //            syncTransferOut(generalOutVO); | ||||
| //        } | ||||
|         // 딧꺅놔욋/瘻욋데 | ||||
|         else if ("4I-02".equals(trantypecode)) { | ||||
|             syncTransferOut(generalOutVO); | ||||
|         } | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|  | @ -131,7 +131,7 @@ public class AfterSignRuleSyncOutToMesProcess implements IRule<GeneralOutVO> { | |||
|         // 填充details | ||||
|         for (GeneralOutBodyVO body : generalOutVO.getBodys()) {// body中取数 | ||||
|             JSONObject temp = new JSONObject(); | ||||
|             temp.put("orderNo", head.getVbillcode()); // 繫列데ID | ||||
| //            temp.put("orderNo", head.getVbillcode()); // 繫列데ID | ||||
|             temp.put("sequenceNum", body.getCrowno()); // 通知单序号 | ||||
|             temp.put("type", "DBCK"); // 事务类型 | ||||
|             temp.put("genType", null); | ||||
|  | @ -159,7 +159,7 @@ public class AfterSignRuleSyncOutToMesProcess implements IRule<GeneralOutVO> { | |||
|         JSONObject info = new JSONObject(); | ||||
|         info.put("details", details); | ||||
|         // 从head中取数 | ||||
|         info.put("orderNo", head.getVbillcode()); // 繫列데ID | ||||
| //        info.put("orderNo", head.getVbillcode()); // 繫列데ID | ||||
|         info.put("type", "DBCK"); // 事务类型 | ||||
|         info.put("genType", null); | ||||
|         info.put("outDate", head.getDbilldate().toString()); | ||||
|  |  | |||
|  | @ -133,6 +133,7 @@ public class IAPISaleInvMaitainImpl { | |||
|             // 数电票(增值税专用发票)=31,数电票(普通发票)=32,数电纸质发票(机动车销售统一发票)=36,数电纸质发票(增值税专用发票)=33,数电纸质发票(普通发票)=34, | ||||
|             // 增值税电子普通发票=1,增值税电子专用发票=2,增值税普通发票=3,增值税专用发票=4,增值税电子普通发票(成品油)=8,成品油普通发票(卷式)=9, | ||||
|             // 成品油普通发票=10,成品油专用发票=11,增值税普通发票(卷式)=12,增值税专用发票(机动车)=99 | ||||
|             Logger.error("vbillcode:" + saleInvoiceHVO.getVbillcode() + ",fplxStr:" + fplxStr); | ||||
|             invoiceService.issueTaxInvoice(saleInvoiceVO, fplxStr); | ||||
| 
 | ||||
|             JSONObject desc = r.getDesc(); | ||||
|  | @ -408,8 +409,8 @@ public class IAPISaleInvMaitainImpl { | |||
| 
 | ||||
|     private String getTaxcode(String taxrateStr) throws BusinessException { | ||||
|         IUAPQueryBS queryBS = NCLocator.getInstance().lookup(IUAPQueryBS.class); | ||||
|         String sql = " select code FROM bd_taxrate tt inner join bd_taxcode tc on tt.pk_taxcode=tc.pk_taxcode where taxrate='" | ||||
|                 + taxrateStr + "' AND ROWNUM = 1 "; | ||||
|         String sql = " select code FROM bd_taxrate tt inner join bd_taxcode tc on tt.pk_taxcode=tc.pk_taxcode where tc.dr = 0 " + | ||||
|                 " AND taxrate='" + taxrateStr + "' AND ROWNUM = 1 AND tc.enablestate = 2 "; | ||||
|         String taxcodeStr = (String) queryBS.executeQuery(sql, new ColumnProcessor()); | ||||
|         return taxcodeStr; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue