diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/FillOut.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/FillOut.java index 0188619..b0754cc 100644 --- a/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/FillOut.java +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/FillOut.java @@ -5,7 +5,7 @@ import cc.smtweb.framework.core.common.SwMap; import cc.smtweb.framework.core.db.impl.DefaultEntity; /** - * Created by 1 at 2023-12-19 11:07:02 + * Created by 1 at 2024-01-04 11:08:42 * 实体【[填报主表](TB_FILL_OUT)】的Entity类 */ @SwTable("TB_FILL_OUT") @@ -79,4 +79,22 @@ public class FillOut extends DefaultEntity { public void setDate(long fo_date) { put("fo_date", fo_date); } + /** 填报机构Id */ + public long getPartyId() { + return getLong("fo_party_id"); + } + + /** 填报机构Id */ + public void setPartyId(long fo_party_id) { + put("fo_party_id", fo_party_id); + } + /** 读取时间 */ + public long getReadTime() { + return getLong("fo_read_time"); + } + + /** 读取时间 */ + public void setReadTime(long fo_read_time) { + put("fo_read_time", fo_read_time); + } } diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/PartyInfo.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/PartyInfo.java index a1d7777..8281a25 100644 --- a/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/PartyInfo.java +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/PartyInfo.java @@ -5,7 +5,7 @@ import cc.smtweb.framework.core.common.SwMap; import cc.smtweb.framework.core.db.impl.DefaultEntity; /** - * Created by 1 at 2023-12-19 11:07:08 + * Created by 1 at 2024-01-03 17:14:35 * 实体【[机构信息](TB_PARTY_INFO)】的Entity类 */ @SwTable("TB_PARTY_INFO") @@ -151,4 +151,13 @@ public class PartyInfo extends DefaultEntity { public void setNationalEconomyType(String pi_national_economy_type) { put("pi_national_economy_type", pi_national_economy_type); } + /** 系统机构Id */ + public long getSysPartyId() { + return getLong("pi_sys_party_id"); + } + + /** 系统机构Id */ + public void setSysPartyId(long pi_sys_party_id) { + put("pi_sys_party_id", pi_sys_party_id); + } } diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/partyDataFill/PartyDataFillHandler.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/partyDataFill/PartyDataFillHandler.java index 9404f5b..57b1aec 100644 --- a/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/partyDataFill/PartyDataFillHandler.java +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/base/partyDataFill/PartyDataFillHandler.java @@ -4,6 +4,7 @@ import cc.smtweb.biz.mztb.web.base.*; import cc.smtweb.framework.core.common.SwMap; import cc.smtweb.framework.core.db.DbEngine; import cc.smtweb.framework.core.db.EntityHelper; +import cc.smtweb.framework.core.db.cache.DictsCache; import cc.smtweb.framework.core.db.impl.DefaultEntity; import cc.smtweb.framework.core.util.DateUtil; import cc.smtweb.framework.core.util.StringUtil; @@ -11,6 +12,7 @@ import cc.smtweb.system.bpm.web.engine.dynPage.DynRetBean; import cc.smtweb.system.bpm.web.engine.model.common.ModelListHandler; import cc.smtweb.system.bpm.web.engine.model.listcard.lcms.LCMsLoadHandler; import cc.smtweb.system.bpm.web.engine.model.listcard.lcms.LCMsSaveHandler; +import cc.smtweb.system.bpm.web.sys.user.user.UserCache; import java.util.List; @@ -76,12 +78,19 @@ public class PartyDataFillHandler { ((DynRetBean) card).getForm().put("fo_task_text",beanData.readString("fo_task").contains("99") ? beanData.readString("fo_task").replace("99","年") : String.format("%d年%02d月",beanData.readLong("fo_task") / 100, beanData.readLong("fo_task") % 100)); + SwMap businessForm = ((DynRetBean) ret.get("businessForm")).getForm(); + businessForm.put("bi_type_text", DictsCache.getInstance().getItemName("tbBusinessType",businessForm.readString("bi_type"))); + businessForm.put("bi_property_text",DictsCache.getInstance().getItemName("tbNature",businessForm.readString("bi_property"))); + businessForm.put("bi_initiate_text",DictsCache.getInstance().getItemName("tbSubject",businessForm.readString("bi_initiate"))); + businessForm.put("bi_execute_regimen_text",DictsCache.getInstance().getItemName("tbKJZD",businessForm.readString("bi_execute_regimen"))); } @Override protected void localAdd() { super.localAdd(); bean.setDate(DateUtil.nowDateLong()); + bean.setPartyId(params.readLong("CUR_PARTY_ID")); +// bean.setUser(UserCache.getInstance().getNameById(us.getUserId())); // bean.setUpdateAt(DateUtil.nowDateLong()); DbEngine instance = DbEngine.getInstance(); // bean.setUser(us.getUserId()); diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/FillTask.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/FillTask.java index 71becbe..524fba7 100644 --- a/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/FillTask.java +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/FillTask.java @@ -1,6 +1,7 @@ package cc.smtweb.biz.mztb.web.domian; import cc.smtweb.framework.core.annotation.SwTable; +import cc.smtweb.framework.core.db.impl.DefaultEntity; import lombok.Data; @Data diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreBusinessInfo.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreBusinessInfo.java new file mode 100644 index 0000000..7f48bf4 --- /dev/null +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreBusinessInfo.java @@ -0,0 +1,243 @@ +package cc.smtweb.biz.mztb.web.domian; + +import cc.smtweb.framework.core.annotation.SwTable; +import cc.smtweb.framework.core.db.impl.DefaultEntity; + +/** + * Created by 1 at 2023-12-19 11:07:15 + * 实体【[业务信息](PRE_BUSINESS_INFO)】的Entity类 + */ +public class PreBusinessInfo extends DefaultEntity { + public static final String ENTITY_NAME = "PRE_BUSINESS_INFO"; + + public PreBusinessInfo() { + super(ENTITY_NAME); + } + + /** 主键 */ + public long getId() { + return getLong("bi_id"); + } + + /** 主键 */ + public void setId(long bi_id) { + put("bi_id", bi_id); + } + + /** 填报主表ID */ + public long getFoId() { + return getLong("bi_fo_id"); + } + + /** 填报主表ID */ + public void setFoId(long bi_fo_id) { + put("bi_fo_id", bi_fo_id); + } + /** 类型 */ + public String getType() { + return getStr("bi_type"); + } + + /** 类型 */ + public void setType(String bi_type) { + put("bi_type", bi_type); + } + /** 性质 */ + public String getProperty() { + return getStr("bi_property"); + } + + /** 性质 */ + public void setProperty(String bi_property) { + put("bi_property", bi_property); + } + /** 兴办主体 */ + public String getInitiate() { + return getStr("bi_initiate"); + } + + /** 兴办主体 */ + public void setInitiate(String bi_initiate) { + put("bi_initiate", bi_initiate); + } + /** 是否为所有权、经营权分离办公养老机构 */ + public int getIsolate() { + return getInt("bi_isolate"); + } + + /** 是否为所有权、经营权分离办公养老机构 */ + public void setIsolate(int bi_isolate) { + put("bi_isolate", bi_isolate); + } + /** 医疗机构执业许可证登记号 */ + public String getMedicalCard() { + return getStr("bi_medical_card"); + } + + /** 医疗机构执业许可证登记号 */ + public void setMedicalCard(String bi_medical_card) { + put("bi_medical_card", bi_medical_card); + } + /** 医疗保险定点医疗机构资格证书编码 */ + public String getMedicalCode() { + return getStr("bi_medical_code"); + } + + /** 医疗保险定点医疗机构资格证书编码 */ + public void setMedicalCode(String bi_medical_code) { + put("bi_medical_code", bi_medical_code); + } + /** 单位所在地区行政区划代码 */ + public String getUnitAddressAreaCode() { + return getStr("bi_unit_address_area_code"); + } + + /** 单位所在地区行政区划代码 */ + public void setUnitAddressAreaCode(String bi_unit_address_area_code) { + put("bi_unit_address_area_code", bi_unit_address_area_code); + } + /** 邮编 */ + public String getPostcode() { + return getStr("bi_postcode"); + } + + /** 邮编 */ + public void setPostcode(String bi_postcode) { + put("bi_postcode", bi_postcode); + } + /** 年末职工人数 */ + public int getYearEndEmployeeNumber() { + return getInt("bi_year_end_employee_number"); + } + + /** 年末职工人数 */ + public void setYearEndEmployeeNumber(int bi_year_end_employee_number) { + put("bi_year_end_employee_number", bi_year_end_employee_number); + } + /** 年末职工人数(女) */ + public int getYearEndEmpMiss() { + return getInt("bi_year_end_emp_miss"); + } + + /** 年末职工人数(女) */ + public void setYearEndEmpMiss(int bi_year_end_emp_miss) { + put("bi_year_end_emp_miss", bi_year_end_emp_miss); + } + /** 年末职工人数(男) */ + public int getYearEndEmpMan() { + return getInt("bi_year_end_emp_man"); + } + + /** 年末职工人数(男) */ + public void setYearEndEmpMan(int bi_year_end_emp_man) { + put("bi_year_end_emp_man", bi_year_end_emp_man); + } + /** 年末职工人数(医护人员) */ + public int getYearEndMedic() { + return getInt("bi_year_end_medic"); + } + + /** 年末职工人数(医护人员) */ + public void setYearEndMedic(int bi_year_end_medic) { + put("bi_year_end_medic", bi_year_end_medic); + } + /** 大学专科人数 */ + public int getYearEndZk() { + return getInt("bi_year_end_zk"); + } + + /** 大学专科人数 */ + public void setYearEndZk(int bi_year_end_zk) { + put("bi_year_end_zk", bi_year_end_zk); + } + /** 大学本科及以上人数 */ + public int getYearEndBk() { + return getInt("bi_year_end_bk"); + } + + /** 大学本科及以上人数 */ + public void setYearEndBk(int bi_year_end_bk) { + put("bi_year_end_bk", bi_year_end_bk); + } + /** 助理社会工作师人数 */ + public int getAssistant() { + return getInt("bi_assistant"); + } + + /** 助理社会工作师人数 */ + public void setAssistant(int bi_assistant) { + put("bi_assistant", bi_assistant); + } + /** 社会工作师人数 */ + public int getEngineer() { + return getInt("bi_engineer"); + } + + /** 社会工作师人数 */ + public void setEngineer(int bi_engineer) { + put("bi_engineer", bi_engineer); + } + /** 35岁及以下人数 */ + public int getThirtyFive() { + return getInt("bi_thirty_five"); + } + + /** 35岁及以下人数 */ + public void setThirtyFive(int bi_thirty_five) { + put("bi_thirty_five", bi_thirty_five); + } + /** 36-45岁人数 */ + public int getFortyFive() { + return getInt("bi_forty_five"); + } + + /** 36-45岁人数 */ + public void setFortyFive(int bi_forty_five) { + put("bi_forty_five", bi_forty_five); + } + /** 46-55岁人数 */ + public int getFiftyFive() { + return getInt("bi_fifty_five"); + } + + /** 46-55岁人数 */ + public void setFiftyFive(int bi_fifty_five) { + put("bi_fifty_five", bi_fifty_five); + } + /** 56岁以上人数 */ + public int getFiftyFiveAbove() { + return getInt("bi_fifty_five_above"); + } + + /** 56岁以上人数 */ + public void setFiftyFiveAbove(int bi_fifty_five_above) { + put("bi_fifty_five_above", bi_fifty_five_above); + } + /** 机构管理人员—专业技术技能人员 */ + public int getPartyManageSp() { + return getInt("bi_party_manage_sp"); + } + + /** 机构管理人员—专业技术技能人员 */ + public void setPartyManageSp(int bi_party_manage_sp) { + put("bi_party_manage_sp", bi_party_manage_sp); + } + /** 专业技术技能人员—养老护理员 */ + public int getSpNursingAssistant() { + return getInt("bi_sp_nursing_assistant"); + } + + /** 专业技术技能人员—养老护理员 */ + public void setSpNursingAssistant(int bi_sp_nursing_assistant) { + put("bi_sp_nursing_assistant", bi_sp_nursing_assistant); + } + /** 执行会计制度 */ + public String getExecuteRegimen() { + return getStr("bi_execute_regimen"); + } + + /** 执行会计制度 */ + public void setExecuteRegimen(String bi_execute_regimen) { + put("bi_execute_regimen", bi_execute_regimen); + } +} diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreFillOut.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreFillOut.java new file mode 100644 index 0000000..7cd8ecf --- /dev/null +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreFillOut.java @@ -0,0 +1,72 @@ +package cc.smtweb.biz.mztb.web.domian; + +import cc.smtweb.framework.core.annotation.SwTable; +import cc.smtweb.framework.core.db.impl.DefaultEntity; + +/** + * Created by 1 at 2023-12-19 11:07:02 + * 实体【[填报主表](PRE_FILL_OUT)】的Entity类 + */ +public class PreFillOut extends DefaultEntity { + public static final String ENTITY_NAME = "PRE_FILL_OUT"; + + public PreFillOut() { + super(ENTITY_NAME); + } + + /** 主键 */ + public long getId() { + return getLong("fo_id"); + } + + /** 主键 */ + public void setId(long fo_id) { + put("fo_id", fo_id); + } + + /** 任务月 */ + public long getTask() { + return getLong("fo_task"); + } + + /** 任务月 */ + public void setTask(long fo_task) { + put("fo_task", fo_task); + } + /** 填报类型 */ + public int getType() { + return getInt("fo_type"); + } + + /** 填报类型 */ + public void setType(int fo_type) { + put("fo_type", fo_type); + } + /** 状态 */ + public int getState() { + return getInt("fo_state"); + } + + /** 状态 */ + public void setState(int fo_state) { + put("fo_state", fo_state); + } + /** 填报人 */ + public String getUser() { + return getStr("fo_user"); + } + + /** 填报人 */ + public void setUser(String fo_user) { + put("fo_user", fo_user); + } + /** 填报时间 */ + public long getDate() { + return getLong("fo_date"); + } + + /** 填报时间 */ + public void setDate(long fo_date) { + put("fo_date", fo_date); + } +} diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreFinanceInfo.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreFinanceInfo.java new file mode 100644 index 0000000..e88af69 --- /dev/null +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreFinanceInfo.java @@ -0,0 +1,567 @@ +package cc.smtweb.biz.mztb.web.domian; + +import cc.smtweb.framework.core.annotation.SwTable; +import cc.smtweb.framework.core.db.impl.DefaultEntity; + +/** + * Created by 1 at 2023-12-19 11:07:05 + * 实体【[财务信息](PRE_FINANCE_INFO)】的Entity类 + */ +public class PreFinanceInfo extends DefaultEntity { + public static final String ENTITY_NAME = "PRE_FINANCE_INFO"; + + public PreFinanceInfo() { + super(ENTITY_NAME); + } + + /** 主键 */ + public long getId() { + return getLong("fi_id"); + } + + /** 主键 */ + public void setId(long fi_id) { + put("fi_id", fi_id); + } + + /** 填报主表ID */ + public long getFoId() { + return getLong("fi_fo_id"); + } + + /** 填报主表ID */ + public void setFoId(long fi_fo_id) { + put("fi_fo_id", fi_fo_id); + } + /** 存货 */ + public long getStock() { + return getLong("fi_stock"); + } + + /** 存货 */ + public void setStock(long fi_stock) { + put("fi_stock", fi_stock); + } + /** 固定资产原价 */ + public long getFixedAssets() { + return getLong("fi_fixed_assets"); + } + + /** 固定资产原价 */ + public void setFixedAssets(long fi_fixed_assets) { + put("fi_fixed_assets", fi_fixed_assets); + } + /** 累计折旧 */ + public long getGrandTotalDepr() { + return getLong("fi_grand_total_depr"); + } + + /** 累计折旧 */ + public void setGrandTotalDepr(long fi_grand_total_depr) { + put("fi_grand_total_depr", fi_grand_total_depr); + } + /** 累计折旧(本年折旧) */ + public long getGtdYear() { + return getLong("fi_gtd_year"); + } + + /** 累计折旧(本年折旧) */ + public void setGtdYear(long fi_gtd_year) { + put("fi_gtd_year", fi_gtd_year); + } + /** 资产总计 */ + public long getPropertyTotal() { + return getLong("fi_property_total"); + } + + /** 资产总计 */ + public void setPropertyTotal(long fi_property_total) { + put("fi_property_total", fi_property_total); + } + /** 负债合计 */ + public long getLiabilitiesTotal() { + return getLong("fi_liabilities_total"); + } + + /** 负债合计 */ + public void setLiabilitiesTotal(long fi_liabilities_total) { + put("fi_liabilities_total", fi_liabilities_total); + } + /** 营业收入 */ + public long getOperationRevenue() { + return getLong("fi_operation_revenue"); + } + + /** 营业收入 */ + public void setOperationRevenue(long fi_operation_revenue) { + put("fi_operation_revenue", fi_operation_revenue); + } + /** 营业成本 */ + public long getOperatingCosts() { + return getLong("fi_operating_costs"); + } + + /** 营业成本 */ + public void setOperatingCosts(long fi_operating_costs) { + put("fi_operating_costs", fi_operating_costs); + } + /** 营业税金及附加 */ + public long getTaxes() { + return getLong("fi_taxes"); + } + + /** 营业税金及附加 */ + public void setTaxes(long fi_taxes) { + put("fi_taxes", fi_taxes); + } + /** 销售费用 */ + public long getSellCost() { + return getLong("fi_sell_cost"); + } + + /** 销售费用 */ + public void setSellCost(long fi_sell_cost) { + put("fi_sell_cost", fi_sell_cost); + } + /** 管理费用 */ + public long getManageCost() { + return getLong("fi_manage_cost"); + } + + /** 管理费用 */ + public void setManageCost(long fi_manage_cost) { + put("fi_manage_cost", fi_manage_cost); + } + /** 管理费用(税金) */ + public long getMcTaxes() { + return getLong("fi_mc_taxes"); + } + + /** 管理费用(税金) */ + public void setMcTaxes(long fi_mc_taxes) { + put("fi_mc_taxes", fi_mc_taxes); + } + /** 管理费用(差旅费) */ + public long getMcTravel() { + return getLong("fi_mc_travel"); + } + + /** 管理费用(差旅费) */ + public void setMcTravel(long fi_mc_travel) { + put("fi_mc_travel", fi_mc_travel); + } + /** 财务费用 */ + public long getFinanceCost() { + return getLong("fi_finance_cost"); + } + + /** 财务费用 */ + public void setFinanceCost(long fi_finance_cost) { + put("fi_finance_cost", fi_finance_cost); + } + /** 财务费用(利息净支出) */ + public long getFcInterests() { + return getLong("fi_fc_interests"); + } + + /** 财务费用(利息净支出) */ + public void setFcInterests(long fi_fc_interests) { + put("fi_fc_interests", fi_fc_interests); + } + /** 资产减值损失 */ + public long getAssetLoss() { + return getLong("fi_asset_loss"); + } + + /** 资产减值损失 */ + public void setAssetLoss(long fi_asset_loss) { + put("fi_asset_loss", fi_asset_loss); + } + /** 公允价值变动收益 */ + public long getFairValueChanage() { + return getLong("fi_fair_value_chanage"); + } + + /** 公允价值变动收益 */ + public void setFairValueChanage(long fi_fair_value_chanage) { + put("fi_fair value_chanage", fi_fair_value_chanage); + } + /** 投资收益 */ + public long getIncomeFromInvestment() { + return getLong("fi_income_from_investment"); + } + + /** 投资收益 */ + public void setIncomeFromInvestment(long fi_income_from_investment) { + put("fi_income_from_investment", fi_income_from_investment); + } + /** 营业利润 */ + public long getOperatingProfit() { + return getLong("fi_operating_profit"); + } + + /** 营业利润 */ + public void setOperatingProfit(long fi_operating_profit) { + put("fi_operating_profit", fi_operating_profit); + } + /** 营业外收入 */ + public long getNonbusinessIncome() { + return getLong("fi_nonbusiness_income"); + } + + /** 营业外收入 */ + public void setNonbusinessIncome(long fi_nonbusiness_income) { + put("fi_nonbusiness_income", fi_nonbusiness_income); + } + /** 营业外收入(政府补助) */ + public long getNiPublicSubsidy() { + return getLong("fi_ni_public_subsidy"); + } + + /** 营业外收入(政府补助) */ + public void setNiPublicSubsidy(long fi_ni_public_subsidy) { + put("fi_ni_public_subsidy", fi_ni_public_subsidy); + } + /** 应付职工底薪 */ + public long getBasePay() { + return getLong("fi_base_pay"); + } + + /** 应付职工底薪 */ + public void setBasePay(long fi_base_pay) { + put("fi_base_pay", fi_base_pay); + } + /** 本年应交增值税 */ + public long getPayableMoneyYear() { + return getLong("fi_payable_money_year"); + } + + /** 本年应交增值税 */ + public void setPayableMoneyYear(long fi_payable_money_year) { + put("fi_payable_money_year", fi_payable_money_year); + } + /** 本年收入合计 */ + public long getYearIncomeTotal() { + return getLong("fi_year_income_total"); + } + + /** 本年收入合计 */ + public void setYearIncomeTotal(long fi_year_income_total) { + put("fi_year_income_total", fi_year_income_total); + } + /** 本年收入合计(事业收入) */ + public long getYitEnterpricse() { + return getLong("fi_yit_enterpricse"); + } + + /** 本年收入合计(事业收入) */ + public void setYitEnterpricse(long fi_yit_enterpricse) { + put("fi_yit_enterpricse", fi_yit_enterpricse); + } + /** 本年收入合计(捐赠收入) */ + public long getYitDonation() { + return getLong("fi_yit_donation"); + } + + /** 本年收入合计(捐赠收入) */ + public void setYitDonation(long fi_yit_donation) { + put("fi_yit_donation", fi_yit_donation); + } + /** 本年收入合计(经营收入) */ + public long getYitBusiness() { + return getLong("fi_yit_business"); + } + + /** 本年收入合计(经营收入) */ + public void setYitBusiness(long fi_yit_business) { + put("fi_yit_business", fi_yit_business); + } + /** 本年收入合计(政府补助收入) */ + public long getYitSubsidy() { + return getLong("fi_yit_subsidy"); + } + + /** 本年收入合计(政府补助收入) */ + public void setYitSubsidy(long fi_yit_subsidy) { + put("fi_yit_subsidy", fi_yit_subsidy); + } + /** 本年收入合计(会费收入) */ + public long getYitMembershiopFees() { + return getLong("fi_yit_membershiop_fees"); + } + + /** 本年收入合计(会费收入) */ + public void setYitMembershiopFees(long fi_yit_membershiop_fees) { + put("fi_yit_membershiop_fees", fi_yit_membershiop_fees); + } + /** 本年支出合计 */ + public long getYearExpend() { + return getLong("fi_year_expend"); + } + + /** 本年支出合计 */ + public void setYearExpend(long fi_year_expend) { + put("fi_year_expend", fi_year_expend); + } + /** 本年支出合计(商品和服务支出) */ + public long getYeCommodityService() { + return getLong("fi_ye_commodity_service"); + } + + /** 本年支出合计(商品和服务支出) */ + public void setYeCommodityService(long fi_ye_commodity_service) { + put("fi_ye_commodity_service", fi_ye_commodity_service); + } + /** 商品和服务支出(取暖费) */ + public long getCsHeatingFee() { + return getLong("fi_cs_heating_fee"); + } + + /** 商品和服务支出(取暖费) */ + public void setCsHeatingFee(long fi_cs_heating_fee) { + put("fi_cs_heating_fee", fi_cs_heating_fee); + } + /** 商品和服务支出(差旅费) */ + public long getCsTravelExpense() { + return getLong("fi_cs_travel_expense"); + } + + /** 商品和服务支出(差旅费) */ + public void setCsTravelExpense(long fi_cs_travel_expense) { + put("fi_cs_travel_expense", fi_cs_travel_expense); + } + /** 商品和服务支出(因公出国 / 境费) */ + public long getCsGoAbroad() { + return getLong("fi_cs_go_abroad"); + } + + /** 商品和服务支出(因公出国 / 境费) */ + public void setCsGoAbroad(long fi_cs_go_abroad) { + put("fi_cs_go_abroad", fi_cs_go_abroad); + } + /** 商品和服务支出(劳务费) */ + public long getCsServiceFee() { + return getLong("fi_cs_service_fee"); + } + + /** 商品和服务支出(劳务费) */ + public void setCsServiceFee(long fi_cs_service_fee) { + put("fi_cs_service_fee", fi_cs_service_fee); + } + /** 商品和服务支出(工会经费) */ + public long getCsExpend() { + return getLong("fi_cs_expend"); + } + + /** 商品和服务支出(工会经费) */ + public void setCsExpend(long fi_cs_expend) { + put("fi_cs_expend", fi_cs_expend); + } + /** 商品和服务支出(福利费) */ + public long getCsWeal() { + return getLong("fi_cs_weal"); + } + + /** 商品和服务支出(福利费) */ + public void setCsWeal(long fi_cs_weal) { + put("fi_cs_weal", fi_cs_weal); + } + /** 本年支出合计(对个人和家庭补助支出) */ + public long getYcsPersonageFamilyFee() { + return getLong("fi_ycs_personage_family_fee"); + } + + /** 本年支出合计(对个人和家庭补助支出) */ + public void setYcsPersonageFamilyFee(long fi_ycs_personage_family_fee) { + put("fi_ycs_personage_family_fee", fi_ycs_personage_family_fee); + } + /** 对个人和家庭补助支出(抚恤金) */ + public long getPffFuxue() { + return getLong("fi_pff_fuxue"); + } + + /** 对个人和家庭补助支出(抚恤金) */ + public void setPffFuxue(long fi_pff_fuxue) { + put("fi_pff_fuxue", fi_pff_fuxue); + } + /** 对个人和家庭补助支出(生活补助) */ + public long getPffLivingSubsidy() { + return getLong("fi_pff_living_subsidy"); + } + + /** 对个人和家庭补助支出(生活补助) */ + public void setPffLivingSubsidy(long fi_pff_living_subsidy) { + put("fi_pff_living_subsidy", fi_pff_living_subsidy); + } + /** 对个人和家庭补助支出(救济费) */ + public long getPffRelief() { + return getLong("fi_pff_relief"); + } + + /** 对个人和家庭补助支出(救济费) */ + public void setPffRelief(long fi_pff_relief) { + put("fi_pff_relief", fi_pff_relief); + } + /** 对个人和家庭补助支出(助学金) */ + public long getPffStudentGrent() { + return getLong("fi_pff_student_grent"); + } + + /** 对个人和家庭补助支出(助学金) */ + public void setPffStudentGrent(long fi_pff_student_grent) { + put("fi_pff_student_grent", fi_pff_student_grent); + } + /** 对个人和家庭补助支出(奖励金) */ + public long getPffBounty() { + return getLong("fi_pff_bounty"); + } + + /** 对个人和家庭补助支出(奖励金) */ + public void setPffBounty(long fi_pff_bounty) { + put("fi_pff_bounty", fi_pff_bounty); + } + /** 对个人和家庭补助支出(生产补贴) */ + public long getPffSubsidy() { + return getLong("fi_pff_subsidy"); + } + + /** 对个人和家庭补助支出(生产补贴) */ + public void setPffSubsidy(long fi_pff_subsidy) { + put("fi_pff_subsidy", fi_pff_subsidy); + } + /** 本年支出合计(工资福利支出) */ + public long getYcsSalary() { + return getLong("fi_ycs_salary"); + } + + /** 本年支出合计(工资福利支出) */ + public void setYcsSalary(long fi_ycs_salary) { + put("fi_ycs_salary", fi_ycs_salary); + } + /** 本年支出合计(经营支出) */ + public long getYcsOperatingExpense() { + return getLong("fi_ycs_operating_expense"); + } + + /** 本年支出合计(经营支出) */ + public void setYcsOperatingExpense(long fi_ycs_operating_expense) { + put("fi_ycs_operating_expense", fi_ycs_operating_expense); + } + /** 销售税金 */ + public long getSellFee() { + return getLong("fi_sell_fee"); + } + + /** 销售税金 */ + public void setSellFee(long fi_sell_fee) { + put("fi_sell_fee", fi_sell_fee); + } + /** 本年费用合计 */ + public long getYearSumFee() { + return getLong("fi_year_sum_fee"); + } + + /** 本年费用合计 */ + public void setYearSumFee(long fi_year_sum_fee) { + put("fi_year_sum_fee", fi_year_sum_fee); + } + /** 本年费用合计(业务活动成本) */ + public long getYsfBusinessFee() { + return getLong("fi_ysf_business_fee"); + } + + /** 本年费用合计(业务活动成本) */ + public void setYsfBusinessFee(long fi_ysf_business_fee) { + put("fi_ysf_business_fee", fi_ysf_business_fee); + } + /** 业务活动成本(人员费用) */ + public long getBfStaffCosts() { + return getLong("fi_bf_staff_costs"); + } + + /** 业务活动成本(人员费用) */ + public void setBfStaffCosts(long fi_bf_staff_costs) { + put("fi_bf_staff_costs", fi_bf_staff_costs); + } + /** 业务活动成本(日常费用) */ + public long getBfEveryDayFee() { + return getLong("fi_bf_every_day_fee"); + } + + /** 业务活动成本(日常费用) */ + public void setBfEveryDayFee(long fi_bf_every_day_fee) { + put("fi_bf_every_day_fee", fi_bf_every_day_fee); + } + /** 业务活动成本(固定资产折旧) */ + public long getBfAssets() { + return getLong("fi_bf_assets"); + } + + /** 业务活动成本(固定资产折旧) */ + public void setBfAssets(long fi_bf_assets) { + put("fi_bf_assets", fi_bf_assets); + } + /** 业务活动成本(税费) */ + public long getBfTax() { + return getLong("fi_bf_tax"); + } + + /** 业务活动成本(税费) */ + public void setBfTax(long fi_bf_tax) { + put("fi_bf_tax", fi_bf_tax); + } + /** 本年费用合计(管理费用) */ + public long getYsfMenageFee() { + return getLong("fi_ysf_menage_fee"); + } + + /** 本年费用合计(管理费用) */ + public void setYsfMenageFee(long fi_ysf_menage_fee) { + put("fi_ysf_menage_fee", fi_ysf_menage_fee); + } + /** 管理费用(人员费用) */ + public long getMfStaffCosts() { + return getLong("fi_mf_staff_costs"); + } + + /** 管理费用(人员费用) */ + public void setMfStaffCosts(long fi_mf_staff_costs) { + put("fi_mf_staff_costs", fi_mf_staff_costs); + } + /** 管理费用(日常费用) */ + public long getMfEveryDayFee() { + return getLong("fi_mf_every_day_fee"); + } + + /** 管理费用(日常费用) */ + public void setMfEveryDayFee(long fi_mf_every_day_fee) { + put("fi_mf_every_day_fee", fi_mf_every_day_fee); + } + /** 管理费用(固定资产折旧) */ + public long getMfAssets() { + return getLong("fi_mf_assets"); + } + + /** 管理费用(固定资产折旧) */ + public void setMfAssets(long fi_mf_assets) { + put("fi_mf_assets", fi_mf_assets); + } + /** 管理费用(税费) */ + public long getMfTax() { + return getLong("fi_mf_tax"); + } + + /** 管理费用(税费) */ + public void setMfTax(long fi_mf_tax) { + put("fi_mf_tax", fi_mf_tax); + } + /** 净资产变动额 */ + public long getChangeInNotAssets() { + return getLong("fi_change_in_not_assets"); + } + + /** 净资产变动额 */ + public void setChangeInNotAssets(long fi_change_in_not_assets) { + put("fi_change_in_not_assets", fi_change_in_not_assets); + } +} diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PrePartyInfo.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PrePartyInfo.java new file mode 100644 index 0000000..55b5135 --- /dev/null +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PrePartyInfo.java @@ -0,0 +1,154 @@ +package cc.smtweb.biz.mztb.web.domian; + +import cc.smtweb.framework.core.annotation.SwTable; +import cc.smtweb.framework.core.common.SwMap; +import cc.smtweb.framework.core.db.impl.DefaultEntity; + +/** + * Created by 1 at 2024-01-03 17:14:35 + * 实体【[机构信息]PrePartyInfo + */ +public class PrePartyInfo extends DefaultEntity { + public static final String ENTITY_NAME = "PRE_PARTY_INFO"; + + public PrePartyInfo() { + super(ENTITY_NAME); + } + + /** 主键 */ + public long getId() { + return getLong("pi_id"); + } + + /** 主键 */ + public void setId(long pi_id) { + put("pi_id", pi_id); + } + + /** 单位名称 */ + public String getPartyName() { + return getStr("pi_party_name"); + } + + /** 单位名称 */ + public void setPartyName(String pi_party_name) { + put("pi_party_name", pi_party_name); + } + /** 信用代码 */ + public String getCreditCode() { + return getStr("pi_credit_code"); + } + + /** 信用代码 */ + public void setCreditCode(String pi_credit_code) { + put("pi_credit_code", pi_credit_code); + } + /** 登记部门 */ + public String getRegDept() { + return getStr("pi_reg_dept"); + } + + /** 登记部门 */ + public void setRegDept(String pi_reg_dept) { + put("pi_reg_dept", pi_reg_dept); + } + /** 登记时间 */ + public long getRegTime() { + return getLong("pi_reg_time"); + } + + /** 登记时间 */ + public void setRegTime(long pi_reg_time) { + put("pi_reg_time", pi_reg_time); + } + /** 机构类型 */ + public String getPartyType() { + return getStr("pi_party_type"); + } + + /** 机构类型 */ + public void setPartyType(String pi_party_type) { + put("pi_party_type", pi_party_type); + } + /** 变动类型 */ + public String getChangeType() { + return getStr("pi_change_type"); + } + + /** 变动类型 */ + public void setChangeType(String pi_change_type) { + put("pi_change_type", pi_change_type); + } + /** 变动时间 */ + public long getChangeTime() { + return getLong("pi_change_time"); + } + + /** 变动时间 */ + public void setChangeTime(long pi_change_time) { + put("pi_change_time", pi_change_time); + } + /** 行政区划代码 */ + public String getAreaCode() { + return getStr("pi_area_code"); + } + + /** 行政区划代码 */ + public void setAreaCode(String pi_area_code) { + put("pi_area_code", pi_area_code); + } + /** 法定代表人 */ + public String getLegalPerson() { + return getStr("pi_legal_person"); + } + + /** 法定代表人 */ + public void setLegalPerson(String pi_legal_person) { + put("pi_legal_person", pi_legal_person); + } + /** 地址 */ + public String getAddress() { + return getStr("pi_address"); + } + + /** 地址 */ + public void setAddress(String pi_address) { + put("pi_address", pi_address); + } + /** 电话 */ + public String getPhone() { + return getStr("pi_phone"); + } + + /** 电话 */ + public void setPhone(String pi_phone) { + put("pi_phone", pi_phone); + } + /** 邮编 */ + public String getPostcode() { + return getStr("pi_postcode"); + } + + /** 邮编 */ + public void setPostcode(String pi_postcode) { + put("pi_postcode", pi_postcode); + } + /** 国民经济分类 */ + public String getNationalEconomyType() { + return getStr("pi_national_economy_type"); + } + + /** 国民经济分类 */ + public void setNationalEconomyType(String pi_national_economy_type) { + put("pi_national_economy_type", pi_national_economy_type); + } + /** 系统机构Id */ + public long getSysPartyId() { + return getLong("pi_sys_party_id"); + } + + /** 系统机构Id */ + public void setSysPartyId(long pi_sys_party_id) { + put("pi_sys_party_id", pi_sys_party_id); + } +} diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreYearEndPersons.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreYearEndPersons.java new file mode 100644 index 0000000..1e9d7b4 --- /dev/null +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/domian/PreYearEndPersons.java @@ -0,0 +1,207 @@ +package cc.smtweb.biz.mztb.web.domian; + +import cc.smtweb.framework.core.annotation.SwTable; +import cc.smtweb.framework.core.db.impl.DefaultEntity; + +/** + * Created by 1 at 2023-12-19 11:07:10 + * 实体【[年末人数信息](PRE_YEAR_END_PERSONS)】的Entity类 + */ +public class PreYearEndPersons extends DefaultEntity { + public static final String ENTITY_NAME = "PRE_YEAR_END_PERSONS"; + + public PreYearEndPersons() { + super(ENTITY_NAME); + } + + /** 主键 */ + public long getId() { + return getLong("yep_id"); + } + + /** 主键 */ + public void setId(long yep_id) { + put("yep_id", yep_id); + } + + /** 填报主表ID */ + public long getFoId() { + return getLong("yep_fo_id"); + } + + /** 填报主表ID */ + public void setFoId(long yep_fo_id) { + put("yep_fo_id", yep_fo_id); + } + /** 年末床位数 */ + public int getYeBed() { + return getInt("yep_ye_bed"); + } + + /** 年末床位数 */ + public void setYeBed(int yep_ye_bed) { + put("yep_ye_bed", yep_ye_bed); + } + /** 年末床位数(护理型床位) */ + public int getYeNurseBed() { + return getInt("yep_ye_nurse_bed"); + } + + /** 年末床位数(护理型床位) */ + public void setYeNurseBed(int yep_ye_nurse_bed) { + put("yep_ye_nurse_bed", yep_ye_nurse_bed); + } + /** 年在院总人天数 */ + public int getYeZrts() { + return getInt("yep_ye_zrts"); + } + + /** 年在院总人天数 */ + public void setYeZrts(int yep_ye_zrts) { + put("yep_ye_zrts", yep_ye_zrts); + } + /** 年末在院人数 */ + public int getYeNumber() { + return getInt("yep_ye_number"); + } + + /** 年末在院人数 */ + public void setYeNumber(int yep_ye_number) { + put("yep_ye_number", yep_ye_number); + } + /** 年末在院人数(女性) */ + public int getYeMissNum() { + return getInt("yep_ye_miss_num"); + } + + /** 年末在院人数(女性) */ + public void setYeMissNum(int yep_ye_miss_num) { + put("yep_ye_miss_num", yep_ye_miss_num); + } + /** 年末在院人数(其他人员) */ + public int getYeOtherNum() { + return getInt("yep_ye_other_num"); + } + + /** 年末在院人数(其他人员) */ + public void setYeOtherNum(int yep_ye_other_num) { + put("yep_ye_other_num", yep_ye_other_num); + } + /** 年末在院人数(特困人员救助供养对象) */ + public int getYePoverty() { + return getInt("yep_ye_poverty"); + } + + /** 年末在院人数(特困人员救助供养对象) */ + public void setYePoverty(int yep_ye_poverty) { + put("yep_ye_poverty", yep_ye_poverty); + } + /** 年末在院人数(自费人员) */ + public int getYeSelfPaying() { + return getInt("yep_ye_self_paying"); + } + + /** 年末在院人数(自费人员) */ + public void setYeSelfPaying(int yep_ye_self_paying) { + put("yep_ye_self_paying", yep_ye_self_paying); + } + /** 年末在院人数(老年人) */ + public int getYeOldMan() { + return getInt("yep_ye_old_man"); + } + + /** 年末在院人数(老年人) */ + public void setYeOldMan(int yep_ye_old_man) { + put("yep_ye_old_man", yep_ye_old_man); + } + /** 年末在院人数(青壮年) */ + public int getYeYoung() { + return getInt("yep_ye_young"); + } + + /** 年末在院人数(青壮年) */ + public void setYeYoung(int yep_ye_young) { + put("yep_ye_young", yep_ye_young); + } + /** 年末在院人数(儿童) */ + public int getYeChild() { + return getInt("yep_ye_child"); + } + + /** 年末在院人数(儿童) */ + public void setYeChild(int yep_ye_child) { + put("yep_ye_child", yep_ye_child); + } + /** 年末在院人数(能力完好) */ + public int getYeIntact() { + return getInt("yep_ye_intact"); + } + + /** 年末在院人数(能力完好) */ + public void setYeIntact(int yep_ye_intact) { + put("yep_ye_intact", yep_ye_intact); + } + /** 年末在院人数(部分失能) */ + public int getYePartDisability() { + return getInt("yep_ye_part_disability"); + } + + /** 年末在院人数(部分失能) */ + public void setYePartDisability(int yep_ye_part_disability) { + put("yep_ye_part_disability", yep_ye_part_disability); + } + /** 年末在院人数(完全失能) */ + public int getYeDisability() { + return getInt("yep_ye_disability"); + } + + /** 年末在院人数(完全失能) */ + public void setYeDisability(int yep_ye_disability) { + put("yep_ye_disability", yep_ye_disability); + } + /** 康复和医疗门诊人次数 */ + public int getOutpatientService() { + return getInt("yep_outpatient_service"); + } + + /** 康复和医疗门诊人次数 */ + public void setOutpatientService(int yep_outpatient_service) { + put("yep_outpatient_service", yep_outpatient_service); + } + /** 家庭寄养儿童数量 */ + public int getFosterChildren() { + return getInt("yep_foster_children"); + } + + /** 家庭寄养儿童数量 */ + public void setFosterChildren(int yep_foster_children) { + put("yep_foster_children", yep_foster_children); + } + /** 机构建筑面积(平方米) */ + public long getAcreage() { + return getLong("yep_acreage"); + } + + /** 机构建筑面积(平方米) */ + public void setAcreage(long yep_acreage) { + put("yep_acreage", yep_acreage); + } + /** 相关单位统一社会信用代码 */ + public String getUnitCreditCode() { + return getStr("yep_unit_credit_code"); + } + + /** 相关单位统一社会信用代码 */ + public void setUnitCreditCode(String yep_unit_credit_code) { + put("yep_unit_credit_code", yep_unit_credit_code); + } + /** 相关单位名称 */ + public String getUnitName() { + return getStr("yep_unit_name"); + } + + /** 相关单位名称 */ + public void setUnitName(String yep_unit_name) { + put("yep_unit_name", yep_unit_name); + } +} diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/task/AddNewPartyAndAccountTask.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/task/AddNewPartyAndAccountTask.java index c4af314..546cfa7 100644 --- a/mztb/src/main/java/cc/smtweb/biz/mztb/web/task/AddNewPartyAndAccountTask.java +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/task/AddNewPartyAndAccountTask.java @@ -1,21 +1,30 @@ package cc.smtweb.biz.mztb.web.task; import cc.smtweb.biz.mztb.web.base.DbSourceConfig; +import cc.smtweb.biz.mztb.web.base.PartyInfo; import cc.smtweb.biz.mztb.web.tool.DbUtil; import cc.smtweb.framework.core.common.SwMap; import cc.smtweb.framework.core.db.DbEngine; +import cc.smtweb.framework.core.exception.BizException; +import cc.smtweb.framework.core.util.DateUtil; import cc.smtweb.system.bpm.web.sys.base.job.BaseJob; +import cc.smtweb.system.bpm.web.sys.user.party.Party; +import cc.smtweb.system.bpm.web.sys.user.party.PartyCache; +import cc.smtweb.system.bpm.web.sys.user.user.User; +import cc.smtweb.system.bpm.web.sys.user.user.UserCache; +import cc.smtweb.system.bpm.web.sys.user.user.UserParty; +import cc.smtweb.system.bpm.web.sys.user.user.UserPartyCache; import com.alibaba.druid.pool.DruidPooledConnection; import com.alibaba.druid.proxy.jdbc.ConnectionProxy; import lombok.SneakyThrows; import java.lang.invoke.SwitchPoint; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; +import java.sql.*; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; public class AddNewPartyAndAccountTask extends BaseJob { @@ -26,22 +35,120 @@ public class AddNewPartyAndAccountTask extends BaseJob { DbSourceConfig dbSourceConfig = instance.findDao(DbSourceConfig.class).queryEntityWhere("dsc_use_state = 0"); Connection connection = null; ResultSet resultSet = null; - List partys = new ArrayList<>(); + // 批量处理的数据 + List partysUpdateList = new ArrayList<>(); + List partysInsertList = new ArrayList<>(); + List sysPartyList = new ArrayList<>(); + List userList = new ArrayList<>(); + List userPartyList = new ArrayList<>(); + + // 记录重复数据 + List partysInsertListExist = new ArrayList<>(); + List sysPartyListExist = new ArrayList<>(); + List userListExist = new ArrayList<>(); + List userPartyListExist = new ArrayList<>(); + + SwMap existPartyMap = new SwMap(); + int insertIndex = 0; + // 使用社会信用代码 当做key + Map partyInfoMap = instance.query(PartyInfo.class).stream().collect(Collectors.toMap(PartyInfo::getCreditCode, Function.identity())); try { connection = DriverManager.getConnection(dbSourceConfig.getWholeUrl(), dbSourceConfig.getUsername(), dbSourceConfig.getPassword()); DbUtil dbUtil = new DbUtil(connection); - resultSet = dbUtil.dbHandSql("", "query"); // 查询机构信息系 - if(resultSet != null) { - while (resultSet.next()) { - SwMap party = new SwMap(); - partys.add(party); + resultSet = dbUtil.dbHandSql("select * from pre_party_info where state = 0 order by wr_time", "query"); // 查询未读取的机构信息,时间升序 先推送的先读取。 + if (resultSet == null) return null; + + while (resultSet.next()) { + PartyInfo partyInfo = new PartyInfo(); + SwMap swMap = new SwMap(); + ResultSetMetaData metaData = resultSet.getMetaData(); + int columnCount = metaData.getColumnCount(); + for (int i = 1; i <= columnCount; i++) { + swMap.put(metaData.getColumnName(i), resultSet.getString(i)); + } + // 将查询到的数据转为 填报系统机构表数据 + partyInfo.getData().putAll(swMap); + + if (partyInfoMap.containsKey(resultSet.getString("pi_credit_code"))) { // 判断该机构是否存在 + long piIdOld = partyInfoMap.get(resultSet.getString("pi_credit_code")).getId(); + long sysPartyId = partyInfoMap.get(resultSet.getString("pi_credit_code")).getSysPartyId(); + partyInfo.setId(piIdOld); + partyInfo.setSysPartyId(sysPartyId); + partysUpdateList.add(partyInfo); + } else { // 新增(包括 底层的party 填报系统的 partyInfo 默认的用户) + boolean existParty = existPartyMap.containsKey(resultSet.getString("pi_credit_code")); + if (existParty) { + // 包含就更新机构信息 ,系统机构信息没有可更改的内容故不处理 + int index = existPartyMap.readInt(resultSet.getString("pi_credit_code")); + partysInsertListExist.add(partysInsertList.get(index)); + userListExist.add(userList.get(index)); + userPartyListExist.add(userPartyList.get(index)); + sysPartyListExist.add(sysPartyList.get(index)); + } + existPartyMap.put(resultSet.getString("pi_credit_code"), insertIndex); + insertIndex++; + + Party party = new Party(); // 底层机构表 + party.init(); + long ptId = resultSet.getLong("pi_id"); // 使用前置库的机构id当做 填报系统机构id + party.setId(ptId); + party.setCode(ptId + ""); + party.setName(partyInfo.getPartyName()); + partyInfo.setSysPartyId(ptId); + sysPartyList.add(party); + partysInsertList.add(partyInfo); + + User user = new User(); // 底层用户表 + user.init(); + long userId = instance.nextId(); + user.setId(userId); + user.setCode(partyInfo.getCreditCode()); + user.setName(partyInfo.getPartyName() + "-填报人员"); + user.setNicky(partyInfo.getCreditCode()); + user.setLevel(100); + user.setStatu(1); + user.setPwd("13217b04835b4cbceb55edb54a72deb4"); //默认密码 abc@123456 + user.setPwdLevel(0); + userList.add(user); + + // todo 添加部门 + + UserParty userParty = new UserParty(); //用户机构关联表 + userParty.setId(instance.nextId()); + userParty.setPartyId(ptId); + userParty.setUserId(userId); + userParty.setDeptId(869944043285516288L); // 关联部门表 + userPartyList.add(userParty); + } - return null; } + // 删除重复新增的元素 + partysInsertList.removeAll(partysInsertListExist); + sysPartyList.removeAll(sysPartyListExist); + userList.removeAll(userListExist); + userPartyList.removeAll(userPartyListExist); + + // 读取完成后 修改前置库推送数据的状态,再进行本系统数据入库处理 + dbUtil.update("update pre_party_info set state = 1 , rd_time = " + DateUtil.nowDateTimeNumber() + " where state = 0"); + + instance.doTrans(() -> { + // 处理新增或者修改的数据 + instance.findDao(PartyInfo.class).batchInsertEntity(partysInsertList); + instance.findDao(PartyInfo.class).batchUpdateEntity(partysUpdateList); + instance.findDao(Party.class).batchInsertEntity(sysPartyList); + instance.findDao(User.class).batchInsertEntity(userList); + instance.findDao(UserParty.class).batchInsertEntity(userPartyList); + // 将机构、用户信息放入缓存 + PartyCache.getInstance().putList(sysPartyList); + UserCache.getInstance().putList(userList); + UserPartyCache.getInstance().putList(userPartyList); + }); } catch (SQLException e) { e.printStackTrace(); } - + // 判断是新增还是修改(如果是修改 将机构信息删除 重新新增,注意维护系统机构表数据) + // 新增的机构 自动创建一个登录账号 + //读取完成后 修改前置库 推送机构表的状态和读取时间 // 在当前系统 建立机构和账号数据,将账号信息写入缓存 return null; } diff --git a/mztb/src/main/java/cc/smtweb/biz/mztb/web/task/PushTask.java b/mztb/src/main/java/cc/smtweb/biz/mztb/web/task/PushTask.java index a586d3e..0a24b76 100644 --- a/mztb/src/main/java/cc/smtweb/biz/mztb/web/task/PushTask.java +++ b/mztb/src/main/java/cc/smtweb/biz/mztb/web/task/PushTask.java @@ -1,10 +1,13 @@ package cc.smtweb.biz.mztb.web.task; import cc.smtweb.biz.mztb.web.base.*; +import cc.smtweb.biz.mztb.web.domian.*; import cc.smtweb.biz.mztb.web.tool.DbUtil; import cc.smtweb.framework.core.common.SwMap; import cc.smtweb.framework.core.db.DbEngine; import cc.smtweb.framework.core.db.EntityHelper; +import cc.smtweb.framework.core.db.dao.EntityColumn; +import cc.smtweb.framework.core.db.impl.DefaultEntity; import cc.smtweb.framework.core.exception.BizException; import cc.smtweb.system.bpm.web.sys.base.job.BaseJob; @@ -13,6 +16,24 @@ import java.util.*; import java.util.stream.Collectors; public class PushTask extends BaseJob { + + private String buildInsertSql(String tableName, DefaultEntity entity) { + entity.getData().remove("_def_table_name"); + StringJoiner key = new StringJoiner(","); + StringJoiner value = new StringJoiner(","); + StringBuilder sql = new StringBuilder(); + sql.append(" insert into ").append(tableName).append(" ("); + for (Map.Entry entry : entity.getData().entrySet()) { + key.add(entry.getKey()); + value.add("'"+entry.getValue()+"'"); + } + sql.append(key); + sql.append(") value ("); + sql.append(value); + sql.append(")"); + + return sql.toString(); + } @Override protected String work() { DbEngine instance = DbEngine.getInstance(); @@ -29,70 +50,50 @@ public class PushTask extends BaseJob { return null; } List ids = new ArrayList<>(); - fillOutList.stream().forEach(temp -> { - ids.add(String.valueOf(temp.readLong("fo_id"))); + fillOutList.forEach(temp -> { + ids.add(temp.readString("fo_id")); }); fillOutList.forEach(temp->{ - List fields = new LinkedList<>(); - List value = new LinkedList<>(); - for (String s : temp.keySet()) { - fields.add(s); - if (s.equals("fo_id")){ - value.add(String.valueOf(instance.nextId())); - value.add(temp.readString(s)); - } - } - insertSql.add("insert into tb_fill_out ("+fields.stream().collect(Collectors.joining(","))+") VALUES ("+value.stream().collect(Collectors.joining(","))+")"); - + temp.remove("fo_update_at"); + PreFillOut preFillOut = new PreFillOut(); + preFillOut.getData().putAll(temp); + String sql = buildInsertSql(PreFillOut.ENTITY_NAME, preFillOut); + insertSql.add(sql); }); - -// List businessInfos = instance.findDao(BusinessInfo.class).queryWhere("bi_fo_id in (" + ids.stream().collect(Collectors.joining(",")) + ")"); -// Map businessInfoMap = new HashMap<>(); -// if (businessInfos.size() != 0) { -// businessInfos.forEach(temp -> { -// businessInfoMap.put(temp.getFoId(), temp); -// }); -// } - List businessInfos = instance.query("select * from "+EntityHelper.getSchemaTableName(BusinessInfo.ENTITY_NAME)+ " where bi_fo_id in (" + ids.stream().collect(Collectors.joining(",")) + ")",SwMap.class); + List businessInfos = instance.query("select * from "+EntityHelper.getSchemaTableName(BusinessInfo.ENTITY_NAME)+ " where bi_fo_id in (" + String.join(",", ids) + ")",SwMap.class); if (businessInfos.size() !=0){ businessInfos.forEach(temp->{ - List fields = new LinkedList<>(); - List value = new LinkedList<>(); - for (String s : temp.keySet()) { - fields.add(s); - value.add(temp.readString(s)); - } - insertSql.add("insert into tb_business_info ("+fields.stream().collect(Collectors.joining(","))+") VALUES ("+value.stream().collect(Collectors.joining(","))+")"); + temp.remove("bi_update_at"); + temp.remove("bi_party_manage"); + PreBusinessInfo preBusinessInfo = new PreBusinessInfo(); + preBusinessInfo.getData().putAll(temp); + String sql = buildInsertSql(PreBusinessInfo.ENTITY_NAME, preBusinessInfo); + insertSql.add(sql); }); } - List financeInfos = instance.query("select * from "+EntityHelper.getSchemaTableName(FinanceInfo.ENTITY_NAME)+" where fi_fo_id in (" + ids.stream().collect(Collectors.joining(",")) + ")",SwMap.class); + + List financeInfos = instance.query("select * from "+EntityHelper.getSchemaTableName(FinanceInfo.ENTITY_NAME)+" where fi_fo_id in (" + String.join(",", ids) + ")",SwMap.class); if (financeInfos.size() != 0){ financeInfos.forEach(temp->{ - List fields = new LinkedList<>(); - List value = new LinkedList<>(); - for (String s : temp.keySet()) { - fields.add(s); - value.add(temp.readString(s)); - } - insertSql.add("insert into tb_finance_info ("+fields.stream().collect(Collectors.joining(","))+") VALUES ("+value.stream().collect(Collectors.joining(","))+")"); + temp.remove("fi_update_at"); + PreFinanceInfo preFinanceInfo = new PreFinanceInfo(); + preFinanceInfo.getData().putAll(temp); + String sql = buildInsertSql(PreFinanceInfo.ENTITY_NAME, preFinanceInfo); + insertSql.add(sql); }); } - - List yearEndPersons = instance.query("select * from "+EntityHelper.getSchemaTableName(YearEndPersons.ENTITY_NAME)+" where yep_fo_id in (" + ids.stream().collect(Collectors.joining(",")) + ")",SwMap.class); + List yearEndPersons = instance.query("select * from "+EntityHelper.getSchemaTableName(YearEndPersons.ENTITY_NAME)+" where yep_fo_id in (" + String.join(",", ids) + ")",SwMap.class); if (yearEndPersons.size() != 0){ yearEndPersons.forEach(temp->{ - List fields = new LinkedList<>(); - List value = new LinkedList<>(); - for (String s : temp.keySet()) { - fields.add(s); - value.add(temp.readString(s)); - } - insertSql.add("insert into tb_year_end_persons ("+fields.stream().collect(Collectors.joining(","))+") VALUES ("+value.stream().collect(Collectors.joining(","))+")"); + temp.remove("yep_update_at"); + PreYearEndPersons preYearEndPersons = new PreYearEndPersons(); + preYearEndPersons.getData().putAll(temp); + String sql = buildInsertSql(PreYearEndPersons.ENTITY_NAME, preYearEndPersons); + insertSql.add(sql); }); } - Connection connection = null; try { connection = DriverManager.getConnection(dbSourceConfig.getWholeUrl(), dbSourceConfig.getUsername(), dbSourceConfig.getPassword()); @@ -102,20 +103,22 @@ public class PushTask extends BaseJob { if (connection == null){ throw new BizException("连接失败!"); } + boolean success =false; try { connection.setAutoCommit(false); try (Statement statement = connection.createStatement()) { - for (int i = 0; i { - - }; - - $lifecycle.onLoad = () => { - if(!$params.id) { - $model.card.setFormVal("fo_type",Number($params.type)) - $model.card.setFormVal("fo_task", Number($params.type) === 2 ? Number($params.task+"99") : Number($params.task)) //如果是年报 年份后面添加标识 99 - $model.card.setFormVal("fo_task_text",$params.task_text) - } - $api.loadOne("partyForm") - if(Number($model.card.getFormVal("fo_state") === 2) || Number($model.card.getFormVal("fo_state") === 1)) { - $refs.saveButton.hide() - } - if(Number($model.card.getFormVal("fo_type")) === 1) { // 月报 - $refs.yearEnd.hide() - } - } - - Object.assign($engine, { - buildSaveParams(params) { - if(Number($model.card.getFormVal("fo_type")) === 2) { // 年报 - params.yearEndPersonsForm = { - form : $model.yearEndPersonsForm.data.form - } - } - params.financeForm = { - form : $model.financeForm.data.form - } - params.businessForm = { - form : $model.businessForm.data.form - } - params.partyForm = { - form : $model.partyForm.data.form - } - } - }) - - const loadPageCard = () => { - // $api.loadCard() - } - - - return { - demoFunc,loadPageCard - } - } -}); diff --git a/mztb/target/classes/static/event/mztb/base/partyDataFill/partyDataFillList.js b/mztb/target/classes/static/event/mztb/base/partyDataFill/partyDataFillList.js deleted file mode 100644 index 84f87b5..0000000 --- a/mztb/target/classes/static/event/mztb/base/partyDataFill/partyDataFillList.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Created by 1 at 2023-12-19 11:06:39 - * 注册事件类【机构数据填报列表】,参看event.defaultEvent.js -*/ -window.$swEvent.setup("mztb.base.partyDataFill.partyDataFillList", { - setup(page){ - const { $params, $refs, $widgets, $model, $utils, $tabRouter, $api, $lifecycle, $engine, $parent } = page || {}; - const { $$message, $$http, $$sys, $$UtilPub } = $utils || {}; - - // 示例 - const demoFunc = () => { - - }; - - let task; // 填报月 - let task_text; // 填报月格式化 - let type; // 填报类型(2 年报 1 月报) - - const setValue =(id,data) => { - task = data.task; - task_text = data.text; - type = data.task.includes("99") ? 2 : 1; - } - const toPageEdit = () =>{ - if($model.ds_1.data.form.task === undefined) { - $$message.notify.warning("请选择任务") - return false - } - $api.toPage("mztb.partyDataFillCard",{ - $fromAction: 'button:add' - ,task:$model.ds_1.data.form.task - ,type: $model.ds_1.data.form.month - ,task_text : $model.ds_1.data.form.task_text - ,outOldData : $model.ds_1.data.form.outOldData }) - } - - const selectHide =(data) => { - if(Number(data) === 1) { //月报 - $refs.year.hide(); - $refs.month1.show(); - }else { // 年报 - $refs.month1.hide(); - $refs.year.show(); - } - } - - const setTypeDef =()=> { - $model.ds_1.data.form.month = 1 - } - - // 按钮显示隐藏 - const edit_del_affirm_Hide = (data) => { // 编辑 删除 确认 - return Number(data.scope.row.fo_state) === 0 - } - const affirm_push_CancelHide= (data) => { // 取消确认 推送 - return Number(data.scope.row.fo_state) === 1 - } - - // 自定义请求 逻辑删除 填报主表 - const logicDel = async (data) => { - const rt = await $$http.post("mztb/partyDataFill/logicDel", {id: data.row.fo_id}) - if (rt.code === 0) { - $api.loadList() - $$message.notify.success("删除完成") - } - } - // 自定义请求 确认 - const affirm = async (data) => { - const rt =await $$http.post("mztb/partyDataFill/affirm",{id : data.row.fo_id}) - if(rt.code === 0) { - $api.loadList() - $$message.notify.success("已确认") - } - } - // 自定义请求 取消确认 - const cancelAffirm =async (data) => { - const rt = await $$http.post("mztb/partyDataFill/cancelAffirm",{id : data.row.fo_id}) - if(rt.code === 0) { - $api.loadList() - $$message.notify.success("已取消确认") - } - } - // 自定义请求推送 数据 - const pushData = (data) => { - const rt = $$http.post("mztb/partyDataFill/pushData",{id : data.row.fo_id}) - if(rt.code === 0) { - $api.loadList() - } - } - - return { - demoFunc,setValue,toPageEdit,selectHide,setTypeDef,edit_del_affirm_Hide,affirm_push_CancelHide - ,logicDel,affirm,cancelAffirm,pushData - } - } -}); diff --git a/mztb/target/classes/static/event/mztb/base/prelibraryConfiguration/prelibraryConfigurationList.js b/mztb/target/classes/static/event/mztb/base/prelibraryConfiguration/prelibraryConfigurationList.js deleted file mode 100644 index 9ec6429..0000000 --- a/mztb/target/classes/static/event/mztb/base/prelibraryConfiguration/prelibraryConfigurationList.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Created by 1 at 2023-12-18 11:09:35 - * 注册事件类【配置前置库连接列表】,参看event.defaultEvent.js -*/ -window.$swEvent.setup("mztb.base.prelibraryConfiguration.prelibraryConfigurationList", { - setup(page){ - const { $params, $refs, $widgets, $model, $utils, $tabRouter, $api, $lifecycle, $engine, $parent } = page || {}; - const { $$message, $$http, $$sys, $$UtilPub } = $utils || {}; - - // 示例 - const demoFunc = () => { - - }; - return { - demoFunc, - } - } -}); diff --git a/mztb/target/classes/static/favicon.ico b/mztb/target/classes/static/favicon.ico deleted file mode 100644 index 91e4132..0000000 Binary files a/mztb/target/classes/static/favicon.ico and /dev/null differ diff --git a/mztb/target/classes/static/images/login/bg-img.png b/mztb/target/classes/static/images/login/bg-img.png deleted file mode 100644 index eb69ce5..0000000 Binary files a/mztb/target/classes/static/images/login/bg-img.png and /dev/null differ diff --git a/mztb/target/classes/static/images/login/bg.png b/mztb/target/classes/static/images/login/bg.png deleted file mode 100644 index 1d0f0a4..0000000 Binary files a/mztb/target/classes/static/images/login/bg.png and /dev/null differ diff --git a/mztb/target/classes/static/images/login/main-logo.png b/mztb/target/classes/static/images/login/main-logo.png deleted file mode 100644 index 68c5df3..0000000 Binary files a/mztb/target/classes/static/images/login/main-logo.png and /dev/null differ