2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								package tqq9.lc123.cloud.app.plugin.form.pm;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-16 08:05:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import com.alibaba.fastjson.JSONArray;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import com.alibaba.fastjson.JSONObject;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import com.google.gson.Gson;
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.bill.AbstractBillPlugIn;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.dataentity.entity.DynamicObject;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import kd.bos.dataentity.entity.DynamicObjectCollection;
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.dataentity.utils.StringUtils;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.entity.datamodel.IDataModel;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import kd.bos.entity.datamodel.events.ChangeData;
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.entity.datamodel.events.PropertyChangedArgs;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-16 08:05:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import kd.bos.form.FormShowParameter;
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.form.IFormView;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import kd.bos.orm.query.QCP;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.orm.query.QFilter;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.servicehelper.BusinessDataServiceHelper;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-16 08:05:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import kd.bos.servicehelper.user.UserServiceHelper;
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.sdk.plugin.Plugin;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import org.springframework.http.ResponseEntity;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import tqq9.lc123.cloud.app.api.utils.Constants;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import tqq9.lc123.cloud.app.api.utils.HttpClient;
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import tqq9.lc123.cloud.app.plugin.utils.EntryFieldRefresher;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import java.io.IOException;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import java.math.BigDecimal;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import java.net.ConnectException;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-16 08:05:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import java.util.*;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/**
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * 单据界面插件
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    private static String URL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-16 08:05:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    private static DynamicObject BILLTYPE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    private static DynamicObject BIZTYPE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    private static DynamicObject LINETYPE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    static {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        DynamicObject url = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                new QFilter[]{new QFilter("number", QCP.equals, "FLXT_Balance_Url")});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        URL = url != null ? url.getString("name") : null;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-16 08:05:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        // 申请单
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        DynamicObject billtype = BusinessDataServiceHelper.loadSingle("bos_billtype", new QFilter[]{new QFilter("number", QCP.equals, "pm_PurApplyBill_STD_BT_S")});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        BILLTYPE = billtype;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        DynamicObject biztype = BusinessDataServiceHelper.loadSingle("bd_biztype", new QFilter[]{new QFilter("number", QCP.equals, "110")});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        BIZTYPE = biztype;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        DynamicObject linetype = BusinessDataServiceHelper.loadSingle("bd_linetype", new QFilter[]{new QFilter("number", QCP.equals, "010")});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        LINETYPE = linetype;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    private final static String ENTRYENTITY = "billentry";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    private final static String SH_ORGNUMBER = "SHLC";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    private final static String BJ_ORGNUMBER = "BJLC";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    private final static String GZ_ORGNUMBER = "GZLC";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    private final static HashMap<String, String> tokenMap = new HashMap<String, String>() {{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        put("Authorization", "Bearer b96dad1eb4f84c41bae651162aeacdd3");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    @Override
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    public void propertyChanged(PropertyChangedArgs e) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        super.propertyChanged(e);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        String name = e.getProperty().getName();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        DynamicObject dataEntity = this.getModel().getDataEntity(true);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        IDataModel model = this.getModel();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        IFormView view = this.getView();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        //--------------上海------------------
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //集采供应商
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_sup_sh", name)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DynamicObject tqq9_sup_sh = (DynamicObject) model.getValue("tqq9_sup_sh");//供应商
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, SH_ORGNUMBER)});
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateDynamicObjectByOrg(SH_ORGNUMBER, "supplier", tqq9_sup_sh, model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            String tqq9_mulcombofield1 = tqq9_sup_sh.getString("tqq9_mulcombofield1");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            model.setValue("tqq9_suparea_sh", tqq9_mulcombofield1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            HashMap<String, String> queryMap = new HashMap<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            queryMap.put("supplierId", tqq9_sup_sh.getString("number"));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            queryMap.put("companyId", org.getString("number"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Gson gson = new Gson();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            try {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                String bodyString = HttpRequestUtils.doGet(URL, queryMap, tokenMap);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                HashMap map = gson.fromJson(bodyString, HashMap.class);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ArrayList<Map<String, Object>> data = (ArrayList) map.get("data");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (data != null) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (Map datum : data) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        Map<String, Object> dataMap = datum;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        String type = dataMap.get("type").toString();//类型
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        if (StringUtils.equals(type, "1.0")) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            //货返
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hshfzje_sh", totalMoney);//含税货返总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hshfkyje_sh", totalMoneyAvailable);//含税货返可用金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        } else if (StringUtils.equals(type, "0.0")) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            //现返
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hsxfzje_sh", totalMoney);//含税现返总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hsxfkyje_sh", totalMoneyAvailable);//含税现返可用金额
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            } catch (IOException ex) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                throw new RuntimeException(ex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //收货仓库
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_rewares_sh", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject tqq9_rewares_sh = (DynamicObject) model.getValue("tqq9_rewares_sh");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateDynamicObjectByOrg(SH_ORGNUMBER, "warehouse", tqq9_rewares_sh, model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        //采购数量
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("applyqty", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal applyqty = (BigDecimal) model.getValue("applyqty");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.sumEntrByOrg(SH_ORGNUMBER, "applyqty", "tqq9_purqty_sh", model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //应付金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_yfje", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_yfje = (BigDecimal) model.getValue("tqq9_yfje");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.sumEntrByOrg(SH_ORGNUMBER, "tqq9_yfje", "tqq9_payamount_sh", model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //优惠金额_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_discountamt_sh", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_discountamt_sh = (BigDecimal) model.getValue("tqq9_discountamt_sh");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_sh, model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //货返_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_hshfsyje_sh", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hshfsyje_sh = (BigDecimal) model.getValue("tqq9_hshfsyje_sh");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_sh, model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //现返_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_hsxfsyje_sh", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hsxfsyje_sh = (BigDecimal) model.getValue("tqq9_hsxfsyje_sh");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_sh, model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //--------------北京------------------
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //集采供应商
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_sup_bj", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject tqq9_sup_bj = (DynamicObject) model.getValue("tqq9_sup_bj");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, BJ_ORGNUMBER)});
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateDynamicObjectByOrg(BJ_ORGNUMBER, "supplier", tqq9_sup_bj, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            String tqq9_mulcombofield1 = tqq9_sup_bj.getString("tqq9_mulcombofield1");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            model.setValue("tqq9_suparea_bj", tqq9_mulcombofield1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            HashMap<String, String> queryMap = new HashMap<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            queryMap.put("supplierId", tqq9_sup_bj.getString("number"));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            queryMap.put("companyId", org.getString("number"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Gson gson = new Gson();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            try {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                String bodyString = HttpRequestUtils.doGet(URL, queryMap, tokenMap);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                HashMap map = gson.fromJson(bodyString, HashMap.class);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ArrayList<Map<String, Object>> data = (ArrayList) map.get("data");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (data != null) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (Map datum : data) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        Map<String, Object> dataMap = datum;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        String type = dataMap.get("type").toString();//类型
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        if (StringUtils.equals(type, "1.0")) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            //货返
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hshfzje_bj", totalMoney);//含税货返总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hshfkyje_bj", totalMoneyAvailable);//含税货返可用金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        } else if (StringUtils.equals(type, "0.0")) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            //现返
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hsxfzje_bj", totalMoney);//含税现返总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hsxfkyje_bj", totalMoneyAvailable);//含税现返可用金额
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            } catch (IOException ex) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                throw new RuntimeException(ex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //收货仓库
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_rewares_bj", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject tqq9_rewares_bj = (DynamicObject) model.getValue("tqq9_rewares_bj");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateDynamicObjectByOrg(BJ_ORGNUMBER, "warehouse", tqq9_rewares_bj, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //采购数量
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("applyqty", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal applyqty = (BigDecimal) model.getValue("applyqty");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.sumEntrByOrg(BJ_ORGNUMBER, "applyqty", "tqq9_purqty_bj", model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //应付金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_yfje", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_yfje = (BigDecimal) model.getValue("tqq9_yfje");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.sumEntrByOrg(BJ_ORGNUMBER, "tqq9_yfje", "tqq9_payamount_bj", model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //优惠金额_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_discountamt_bj", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_discountamt_bj = (BigDecimal) model.getValue("tqq9_discountamt_bj");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_bj, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //货返_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_hshfsyje_bj", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hshfsyje_bj = (BigDecimal) model.getValue("tqq9_hshfsyje_bj");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_bj, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //现返_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_hsxfsyje_bj", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hsxfsyje_bj = (BigDecimal) model.getValue("tqq9_hsxfsyje_bj");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_bj, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //--------------广州------------------
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //集采供应商
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_sup_gz", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject tqq9_sup_gz = (DynamicObject) model.getValue("tqq9_sup_gz");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("number", QCP.equals, GZ_ORGNUMBER)});
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateDynamicObjectByOrg(GZ_ORGNUMBER, "supplier", tqq9_sup_gz, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            String tqq9_mulcombofield1 = tqq9_sup_gz.getString("tqq9_mulcombofield1");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            model.setValue("tqq9_suparea_gz", tqq9_mulcombofield1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            HashMap<String, String> queryMap = new HashMap<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            queryMap.put("supplierId", tqq9_sup_gz.getString("number"));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            queryMap.put("companyId", org.getString("number"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Gson gson = new Gson();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            try {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                String bodyString = HttpRequestUtils.doGet(URL, queryMap, tokenMap);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                HashMap map = gson.fromJson(bodyString, HashMap.class);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ArrayList<Map<String, Object>> data = (ArrayList) map.get("data");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (data != null) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (Map datum : data) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        Map<String, Object> dataMap = datum;
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        String type = dataMap.get("type").toString();//类型
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        if (StringUtils.equals(type, "1.0")) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            //货返
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hshfzje_gz", totalMoney);//含税货返总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hshfkyje_gz", totalMoneyAvailable);//含税货返可用金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        } else if (StringUtils.equals(type, "0.0")) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            //现返
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hsxfzje_gz", totalMoney);//含税现返总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            model.setValue("tqq9_hsxfkyje_gz", totalMoneyAvailable);//含税现返可用金额
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            } catch (IOException ex) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                throw new RuntimeException(ex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //收货仓库
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_rewares_gz", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject tqq9_rewares_gz = (DynamicObject) model.getValue("tqq9_rewares_gz");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateDynamicObjectByOrg(GZ_ORGNUMBER, "warehouse", tqq9_rewares_gz, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //采购数量
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("applyqty", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal applyqty = (BigDecimal) model.getValue("applyqty");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.sumEntrByOrg(GZ_ORGNUMBER, "applyqty", "tqq9_purqty_gz", model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //应付金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_yfje", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_yfje = (BigDecimal) model.getValue("tqq9_yfje");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.sumEntrByOrg(GZ_ORGNUMBER, "tqq9_yfje", "tqq9_payamount_gz", model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //优惠金额_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_discountamt_gz", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_discountamt_gz = (BigDecimal) model.getValue("tqq9_discountamt_gz");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_gz, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //货返_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_hshfsyje_gz", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hshfsyje_gz = (BigDecimal) model.getValue("tqq9_hshfsyje_gz");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_gz, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //现返_单头
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_hsxfsyje_gz", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hsxfsyje_gz = (BigDecimal) model.getValue("tqq9_hsxfsyje_gz");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_gz, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            view.updateView();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //分录优惠金额,现返,货返金额分摊
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("tqq9_amount", name)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            EntryFieldRefresher entryFieldRefresher = new EntryFieldRefresher();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_discountamt_sh = (BigDecimal) model.getValue("tqq9_discountamt_sh");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_sh, model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hshfsyje_sh = (BigDecimal) model.getValue("tqq9_hshfsyje_sh");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_sh, model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hsxfsyje_sh = (BigDecimal) model.getValue("tqq9_hsxfsyje_sh");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(SH_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_sh, model);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_discountamt_bj = (BigDecimal) model.getValue("tqq9_discountamt_bj");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_bj, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hshfsyje_bj = (BigDecimal) model.getValue("tqq9_hshfsyje_bj");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_bj, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hsxfsyje_bj = (BigDecimal) model.getValue("tqq9_hsxfsyje_bj");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(BJ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_bj, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_discountamt_gz = (BigDecimal) model.getValue("tqq9_discountamt_gz");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_disamount", tqq9_discountamt_gz, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hshfsyje_gz = (BigDecimal) model.getValue("tqq9_hshfsyje_gz");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_hfamount", tqq9_hshfsyje_gz, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_hsxfsyje_gz = (BigDecimal) model.getValue("tqq9_hsxfsyje_gz");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-03 09:49:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            entryFieldRefresher.updateAmountByOrg(GZ_ORGNUMBER, "tqq9_xfamount", tqq9_hsxfsyje_gz, model);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        //物料带出最高限价
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("material", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            ChangeData changeData = e.getChangeSet()[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int rowIndex = changeData.getRowIndex();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection(ENTRYENTITY);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject dynamicObject = dynamicObjectCollection.get(rowIndex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject material = dynamicObject.getDynamicObject("material");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject masterid = material.getDynamicObject("masterid");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject bd_material = BusinessDataServiceHelper.loadSingle(masterid.getLong("id"), "bd_material");
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DynamicObject org = (DynamicObject) this.getModel().getValue("entryrecorg", rowIndex);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            //上海
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (StringUtils.equals(SH_ORGNUMBER, org.getString("number"))) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                BigDecimal tqq9_maxprice_sh = bd_material.getBigDecimal("tqq9_maxprice_sh");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_maxprice_sh.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    getModel().setValue("priceandtax", tqq9_maxprice_sh, rowIndex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_sh, rowIndex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                //北京
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            } else if (StringUtils.equals(BJ_ORGNUMBER, org.getString("number"))) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                BigDecimal tqq9_maxprice_bj = bd_material.getBigDecimal("tqq9_maxprice_bj");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_maxprice_bj.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    getModel().setValue("priceandtax", tqq9_maxprice_bj, rowIndex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_bj, rowIndex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                //广州
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            } else if (StringUtils.equals(GZ_ORGNUMBER, org.getString("number"))) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                BigDecimal tqq9_maxprice_gz = bd_material.getBigDecimal("tqq9_maxprice_gz");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_maxprice_gz.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    getModel().setValue("priceandtax", tqq9_maxprice_gz, rowIndex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_gz, rowIndex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //校验含税单价和最高限价
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (StringUtils.equals("priceandtax", name)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            ChangeData changeData = e.getChangeSet()[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int rowIndex = changeData.getRowIndex();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int seq = rowIndex;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal newValue = (BigDecimal) changeData.getNewValue();
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_zgcgxj = (BigDecimal) getModel().getValue("tqq9_zgcgxj", seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (newValue.compareTo(tqq9_zgcgxj) > 0 && tqq9_zgcgxj.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-13 09:42:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                getModel().setValue("priceandtax", 0, seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-10 10:16:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                this.getView().showErrorNotification("物料明细分录行" + seq + "含税单价超过最高采购限价,请修改");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-01 08:50:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-16 08:05:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    @Override
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    public void afterCreateNewData(EventObject e) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        super.afterCreateNewData(e);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        FormShowParameter formShowParameter = this.getView().getFormShowParameter();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        JSONObject tqq9_pursuggestrpt = (JSONObject) formShowParameter.getCustomParam("pm_purapplybill");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (tqq9_pursuggestrpt != null) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            IDataModel model = this.getModel();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObjectCollection billentry = model.getDataEntity(true).getDynamicObjectCollection("billentry");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            billentry.clear();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            //采购建议报表
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            JSONArray tqq9_pursuggestrptentry = tqq9_pursuggestrpt.getJSONArray("tqq9_pursuggestrptentry");
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-09-16 08:05:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            long currentUserId = UserServiceHelper.getCurrentUserId();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject user = BusinessDataServiceHelper.loadSingle("bos_user", new QFilter[]{new QFilter("id", QCP.equals, currentUserId)});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObjectCollection entryentity = user.getDynamicObjectCollection("entryentity");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject dept = null;//部门
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for (DynamicObject dynamicObject : entryentity) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                boolean ispartjob = dynamicObject.getBoolean("ispartjob");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!ispartjob) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    dept = dynamicObject.getDynamicObject("dpt");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject LCJT = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter[]{new QFilter("name", QCP.equals, "励齿集团")});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject currency = BusinessDataServiceHelper.loadSingle("bd_currency",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    new QFilter[]{new QFilter("number", QCP.equals, "CNY")});//币别
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObject taxrate = BusinessDataServiceHelper.loadSingle("bd_taxrate",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    new QFilter[]{new QFilter("number", QCP.equals, "V13")});//税率
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Date date = new Date();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int i = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for (Object dynamicObject : tqq9_pursuggestrptentry) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JSONObject entry = (JSONObject) dynamicObject;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (entry.getBoolean("tqq9_ischange")) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    billentry.addNew();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (i == 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("org", LCJT);//申请组织
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("dept", dept);//申请部门
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("bizuser", user);//申请人
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("currency", currency);//币别
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("creator", user);//创建人
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("lastupdateuser", user);//修改人
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("lastupdatetime", date);//修改时间
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("billtype", BILLTYPE);//单据类型
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("biztype", BIZTYPE);//业务类型
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("biztime", date);//申请日期
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("billstatus", "A");//单据状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("closestatus", "A");//关闭状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("cancelstatus", "A");//作废状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("changestatus", "A");//变更状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("subversion", "1");//子版本号
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("version", "1");//版本号
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_sfsyhf_sh", "false");//是否使用货返
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_hshfsysl_sh", taxrate);//含税货返使用税率
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_sfsyxf_sh", "false");//是否使用现返
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_hsxfsysl_sh", taxrate);//含税现返使用税率
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_sfsyhf_bj", "false");//是否使用货返
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_hshfsysl_bj", taxrate);//含税货返使用税率
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_sfsyxf_bj", "false");//是否使用现返
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_hsxfsysl_bj", taxrate);//含税现返使用税率
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_sfsyhf_gz", "false");//是否使用货返
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_hshfsysl_gz", taxrate);//含税货返使用税率
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_sfsyxf_gz", "false");//是否使用现返
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_hsxfsysl_gz", taxrate);//含税现返使用税率
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JSONObject org = entry.getJSONObject("tqq9_org");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DynamicObject tqq9_org = BusinessDataServiceHelper.loadSingle(org.getLong("id"), "bos_org");//组织
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JSONObject material = entry.getJSONObject("tqq9_material");//物料
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DynamicObject tqq9_material = BusinessDataServiceHelper.loadSingle(material.getLong("id"), "bd_material");//物料
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DynamicObject materialpurchaseinfo = BusinessDataServiceHelper.loadSingle("bd_materialpurchaseinfo", new QFilter[]{new QFilter("masterid", QCP.equals, tqq9_material.getLong("id"))});//物料采购信息
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    BigDecimal tqq9_saledates = entry.getBigDecimal("tqq9_saledates");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("material", materialpurchaseinfo, i);//物料
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("materialname", tqq9_material.getString("name"), i);//物料名称
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("unit", tqq9_material.getDynamicObject("baseunit"), i);//计量单位
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("baseunit", tqq9_material.getDynamicObject("baseunit"), i);//基本单位
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("rowclosestatus", "A");//行关闭状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("rowterminatestatus", "A");//行终止状态
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("entryrecorg", tqq9_org, i);//收货组织
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("entryreqorg", tqq9_org, i);//需求组织
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("entryreqdept", dept, i);//需求部门
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("reqdate", date, i);//需求日期
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("purdate", date, i);//建议采购日期
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("deliverdate", date, i);//交货日期
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("bomtime", date, i);//展BOM时间
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("linetype", LINETYPE, i);//行类型
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("linetype", LINETYPE, i);//行类型
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("entrychangetype", "B",i);//变更方式
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("entrycreator", user, i);//创建人
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("entryrecdept", tqq9_org, i);//收货部门
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("entrypurdept", tqq9_org, i);//采购部门
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("entryoperatorgroup", tqq9_org, i);//采购组
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    model.setValue("tqq9_expectsaletime", tqq9_saledates, i);//预计销售时间(月)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (StringUtils.equals(tqq9_org.getString("number"), "SHLC")) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_zgcgxj", tqq9_material.getBigDecimal("tqq9_maxprice_sh"), i);//最高采购限价
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("priceandtax", tqq9_material.getBigDecimal("tqq9_maxprice_sh"), i);//含税单价
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    } else if (StringUtils.equals(tqq9_org.getString("number"), "BJLC")) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_zgcgxj", tqq9_material.getBigDecimal("tqq9_maxprice_bj"), i);//最高采购限价
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("priceandtax", tqq9_material.getBigDecimal("tqq9_maxprice_bj"), i);//含税单价
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    } else if (StringUtils.equals(tqq9_org.getString("number"), "GZLC")) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("tqq9_zgcgxj", tqq9_material.getBigDecimal("tqq9_maxprice_gz"), i);//最高采购限价
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        model.setValue("priceandtax", tqq9_material.getBigDecimal("tqq9_maxprice_gz"), i);//含税单价
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    i++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-08-29 10:01:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |