反写收款单分录行
This commit is contained in:
		
							parent
							
								
									6b86745905
								
							
						
					
					
						commit
						a1041aa735
					
				|  | @ -40,6 +40,8 @@ public class ClearAccountBillOperation extends AbstractOperationServicePlugIn im | |||
|     private static final String updateDetailStatusByID = "update tk_shjh_clear_acctdetail set fbillstatus='D' where fid=?;"; | ||||
|     private static final String updateDetailClearStatus = "update tk_shjh_clear_acctdetail set fbillstatus='D',fk_shjh_clearstatus='C' where fk_shjh_clearbillid=?;"; | ||||
| 
 | ||||
|     private static final String queryRealtion = "select fsid from tk_shjh_clear_account_tc where ftbillid=?;";//查看清账单与收款单的关联关系表 | ||||
| 
 | ||||
|     private static final String entityName = "shjh_clear_acctdetail";//清账明细单 | ||||
|     private static final String userName = "bos_user";//用户 | ||||
|     private static final String pzbName = "shjh_jgqzcust";//结构性清账客户映射表 | ||||
|  | @ -135,14 +137,20 @@ public class ClearAccountBillOperation extends AbstractOperationServicePlugIn im | |||
|     } | ||||
| 
 | ||||
|     private boolean reWriteCeceBill(DynamicObject prinfo, String closingstatus){ | ||||
|         //反写收款单 | ||||
|         String receBillEntrys = prinfo.getString(""); | ||||
|         if(!JhzjUtils.isEmpty(receBillEntrys)){ | ||||
|             String[] entryids = receBillEntrys.split(","); | ||||
|         //反写收款单分录行 | ||||
|         //根据清账单id查找上游收款单分录行 | ||||
|         List<Long> entryids = DB.query(DBRoute.of("fi"),queryRealtion,new Object[]{prinfo.getPkValue()},(rs) -> { | ||||
|             List<Long> entryidList = new ArrayList<>(); | ||||
|             while(rs.next()) { | ||||
|                 entryidList.add(rs.getLong(1)); | ||||
|             } | ||||
|             return entryidList; | ||||
|         }); | ||||
|         if(!entryids.isEmpty()){ | ||||
|             StringBuffer sqlsb = new StringBuffer(); | ||||
|             sqlsb.append("update T_CAS_ReceivingBillEntry set fk_shjh_closingstatus=? where fid in ("); | ||||
|             for (int i = 0; i < entryids.length; i++) { | ||||
|                 sqlsb.append(entryids[i]); | ||||
|             sqlsb.append("update T_CAS_ReceivingBillEntry set fk_shjh_closingstatus=? where FEntryID in ("); | ||||
|             for (int i = 0; i < entryids.size(); i++) { | ||||
|                 sqlsb.append(entryids.get(i)); | ||||
|                 sqlsb.append(","); | ||||
|             } | ||||
|             sqlsb.setLength(sqlsb.length()-1); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue