From a190dc439d0cb042d5b69743c76d8d6a88f6148e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 8 Mar 2022 16:35:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AddUpDeductionGetDetailListCmd.java | 4 +- .../AddUpDeductionGetSearchConditionCmd.java | 2 +- .../datacollection/AddUpDeductionListCmd.java | 6 +- .../datacollection/AddUpSituationListCmd.java | 59 ++++--------------- .../dto/AddUpDeductionRecordDTO.java | 35 +++++++++-- .../salary/transmethod/TransMethod.java | 13 ++++ 6 files changed, 61 insertions(+), 58 deletions(-) diff --git a/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetDetailListCmd.java b/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetDetailListCmd.java index 3a923366f..7c34c2454 100644 --- a/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetDetailListCmd.java +++ b/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetDetailListCmd.java @@ -122,10 +122,10 @@ public class AddUpDeductionGetDetailListCmd extends AbstractCommonCommand declareMonths = queryParam.getDeclareMonth(); if (CollectionUtils.isNotEmpty(declareMonths)) { if (declareMonths.size() == 1) { - sqlWhere += " AND t1.declare_month = " + declareMonths.get(0); + sqlWhere += " AND t1.declare_month = '" + declareMonths.get(0)+","; } if (declareMonths.size() == 2) { - sqlWhere += " AND (t1.declare_month BETWEEN " + declareMonths.get(0) + " AND " + declareMonths.get(1) + ")"; + sqlWhere += " AND (t1.declare_month BETWEEN '" + declareMonths.get(0) + "' AND '" + declareMonths.get(1) + "')"; } } //姓名 diff --git a/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetSearchConditionCmd.java b/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetSearchConditionCmd.java index 9840a660e..5fe10e9fa 100644 --- a/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetSearchConditionCmd.java +++ b/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetSearchConditionCmd.java @@ -48,7 +48,7 @@ public class AddUpDeductionGetSearchConditionCmd extends AbstractCommonCommand declareMonths = queryParam.getDeclareMonth(); if (CollectionUtils.isNotEmpty(declareMonths)) { if (declareMonths.size() == 1) { - sqlWhere += " AND t1.declare_month = " + declareMonths.get(0); + sqlWhere += " AND t1.declare_month = '" + declareMonths.get(0)+"'"; } if (declareMonths.size() == 2) { - sqlWhere += " AND (t1.declare_month BETWEEN " + declareMonths.get(0) + " AND " + declareMonths.get(1) + ")"; + sqlWhere += " AND (t1.declare_month BETWEEN '" + declareMonths.get(0) + "' AND '" + declareMonths.get(1) + "')"; } } //姓名 @@ -129,7 +129,7 @@ public class AddUpDeductionListCmd extends AbstractCommonCommand hiredate = queryParam.getHiredate(); if (CollectionUtils.isNotEmpty(hiredate) && hiredate.size() == 2) { - sqlWhere += " AND (e.created BETWEEN "+hiredate.get(0)+" AND "+hiredate.get(1)+")"; + sqlWhere += " AND (e.created BETWEEN '"+hiredate.get(0)+"' AND '"+hiredate.get(1)+"')"; } //手机号 String mobile = queryParam.getMobile(); diff --git a/src/com/engine/salary/cmd/datacollection/AddUpSituationListCmd.java b/src/com/engine/salary/cmd/datacollection/AddUpSituationListCmd.java index 4a67718eb..a96cbbbe6 100644 --- a/src/com/engine/salary/cmd/datacollection/AddUpSituationListCmd.java +++ b/src/com/engine/salary/cmd/datacollection/AddUpSituationListCmd.java @@ -1,21 +1,20 @@ package com.engine.salary.cmd.datacollection; -import com.cloudstore.eccom.constant.WeaBoolAttr; -import com.cloudstore.eccom.pc.table.WeaTable; -import com.cloudstore.eccom.pc.table.WeaTableColumn; -import com.cloudstore.eccom.pc.table.WeaTableOperate; -import com.cloudstore.eccom.pc.table.WeaTableOperates; import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.biz.AbstractCommonCommand; import com.engine.common.entity.BizLogContext; import com.engine.core.interceptor.CommandContext; +import com.engine.salary.component.SalaryWeaTable; +import com.engine.salary.entity.datacollection.dto.AddUpDeductionListDTO; import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import weaver.general.PageIdConst; import weaver.hrm.User; -import java.util.*; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; public class AddUpSituationListCmd extends AbstractCommonCommand> { @@ -54,19 +53,7 @@ public class AddUpSituationListCmd extends AbstractCommonCommand apidatas = new HashMap(16); - - WeaResultMsg result = new WeaResultMsg(false); - String pageID = "a4f85287-e3f9-4275-adn9-7d06e54y6rj8"; - String pageUid = pageID + "_" + user.getUID(); - String pageSize = PageIdConst.getPageSize(pageID, user.getUID()); - - - WeaTable table = new WeaTable(); - table.setPageUID(pageUid); - table.setPageID(pageID); - table.setPagesize(pageSize); + SalaryWeaTable table = new SalaryWeaTable(user, AddUpDeductionListDTO.class); table.setBackfields(fileds); table.setSqlform(fromSql); table.setSqlwhere(makeSqlWhere()); @@ -74,30 +61,10 @@ public class AddUpSituationListCmd extends AbstractCommonCommand operateList = new ArrayList<>(); - WeaTableOperate delete = new WeaTableOperate("删除", "", "0"); - operateList.add(delete); - WeaTableOperates weaTableOperates = new WeaTableOperates(); - weaTableOperates.setOperate(operateList); - table.setOperates(weaTableOperates); - - //设置check是否可用 - table.setCheckboxList(null); - table.setCheckboxpopedom(null); + WeaResultMsg result = new WeaResultMsg(false); result.putAll(table.makeDataResult()); result.success(); - apidatas = result.getResultMap(); - return apidatas; + return result.getResultMap(); } @@ -132,10 +99,10 @@ public class AddUpSituationListCmd extends AbstractCommonCommand declareMonths = queryParam.getDeclareMonth(); if (CollectionUtils.isNotEmpty(declareMonths)) { if (declareMonths.size() == 1) { - sqlWhere += " AND t1.declare_month = " + declareMonths.get(0); + sqlWhere += " AND t1.declare_month = '" + declareMonths.get(0)+"'"; } if (declareMonths.size() == 2) { - sqlWhere += " AND (t1.declare_month BETWEEN " + declareMonths.get(0) + " AND " + declareMonths.get(1) + ")"; + sqlWhere += " AND (t1.declare_month BETWEEN '" + declareMonths.get(0) + "' AND '" + declareMonths.get(1) + "')"; } } //姓名 @@ -162,7 +129,7 @@ public class AddUpSituationListCmd extends AbstractCommonCommand hiredate = queryParam.getHiredate(); if (CollectionUtils.isNotEmpty(hiredate) && hiredate.size() == 2) { - sqlWhere += " AND (e.created BETWEEN "+hiredate.get(0)+" AND "+hiredate.get(1)+")"; + sqlWhere += " AND (e.created BETWEEN '"+hiredate.get(0)+"' AND '"+hiredate.get(1)+"')"; } //手机号 String mobile = queryParam.getMobile(); @@ -172,6 +139,4 @@ public class AddUpSituationListCmd extends AbstractCommonCommand