diff --git a/resource/sqlupgrade/DM/sql202405280703.sql b/resource/sqlupgrade/DM/sql202405280703.sql new file mode 100644 index 000000000..905ff7b4f --- /dev/null +++ b/resource/sqlupgrade/DM/sql202405280703.sql @@ -0,0 +1,3 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0); +/ + diff --git a/resource/sqlupgrade/GS/sql202405280703.sql b/resource/sqlupgrade/GS/sql202405280703.sql new file mode 100644 index 000000000..905ff7b4f --- /dev/null +++ b/resource/sqlupgrade/GS/sql202405280703.sql @@ -0,0 +1,3 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0); +/ + diff --git a/resource/sqlupgrade/JC/sql202405280703.sql b/resource/sqlupgrade/JC/sql202405280703.sql new file mode 100644 index 000000000..905ff7b4f --- /dev/null +++ b/resource/sqlupgrade/JC/sql202405280703.sql @@ -0,0 +1,3 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0); +/ + diff --git a/resource/sqlupgrade/Mysql/sql202405280703.sql b/resource/sqlupgrade/Mysql/sql202405280703.sql new file mode 100644 index 000000000..329bd939c --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202405280703.sql @@ -0,0 +1 @@ +ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int(0) NULL ; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202405280703.sql b/resource/sqlupgrade/Oracle/sql202405280703.sql new file mode 100644 index 000000000..24fc81139 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202405280703.sql @@ -0,0 +1,2 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0) +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202405280703.sql b/resource/sqlupgrade/PG/sql202405280703.sql new file mode 100644 index 000000000..902cfab0d --- /dev/null +++ b/resource/sqlupgrade/PG/sql202405280703.sql @@ -0,0 +1 @@ +ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int NULL ; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202405280703.sql b/resource/sqlupgrade/SQLServer/sql202405280703.sql new file mode 100644 index 000000000..086ab3bf5 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202405280703.sql @@ -0,0 +1,2 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status int NULL +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202405280703.sql b/resource/sqlupgrade/ST/sql202405280703.sql new file mode 100644 index 000000000..905ff7b4f --- /dev/null +++ b/resource/sqlupgrade/ST/sql202405280703.sql @@ -0,0 +1,3 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0); +/ + diff --git a/resource/wiki/人员生成不了档案.sql b/resource/wiki/人员生成不了档案.sql index d66d7df39..75b03ff39 100644 --- a/resource/wiki/人员生成不了档案.sql +++ b/resource/wiki/人员生成不了档案.sql @@ -1,7 +1,6 @@ +select id from hrsa_tax_agent_emp +where tax_agent_id =扣缴义务人id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =扣缴义务人id and delete_type = 0) + + update hrsa_tax_agent_emp set delete_type = 3 -where id in( - - select id from hrsa_tax_agent_emp - where tax_agent_id =27 and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =27 and delete_type = 0) - -) \ No newline at end of file +where tax_agent_id=扣缴义务人id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =扣缴义务人id and delete_type = 0) \ No newline at end of file diff --git a/resource/wiki/常用查询.md b/resource/wiki/常用查询.md index 51576d16d..594b14bf8 100644 --- a/resource/wiki/常用查询.md +++ b/resource/wiki/常用查询.md @@ -17,5 +17,5 @@ left join hrmresource e on e.id= result.employee_id left join hrsa_salary_item c on c.id=i.salary_item_id left join hrsa_tax_agent t on a.tax_agent_id=t.id where a.delete_type=0 and i.delete_type=0 and t.delete_type=0 and c.delete_type=0 - and a.employee_id=$main.ygid$ and t.name='$main.dzqgskjywr$' + and a.employee_id=人员id and t.name=扣缴义务人名称 and effective_time <= now() and c.name='基本工资' order by effective_time desc \ No newline at end of file diff --git a/src/com/engine/salary/biz/SalarySobItemBiz.java b/src/com/engine/salary/biz/SalarySobItemBiz.java index 66ac63d0c..233eae306 100644 --- a/src/com/engine/salary/biz/SalarySobItemBiz.java +++ b/src/com/engine/salary/biz/SalarySobItemBiz.java @@ -1,6 +1,5 @@ package com.engine.salary.biz; -import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import com.engine.salary.mapper.salarysob.SalarySobItemMapper; import com.google.common.collect.Lists; @@ -34,16 +33,6 @@ public class SalarySobItemBiz { } } - public List listBySalarySobIdWithHideItem(SalarySobItemPO build) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class); - return mapper.listBySalarySobIdWithHideItem(build); - } finally { - sqlSession.close(); - } - } - public void batchInsert(Collection salarySobItemPOS) { if (CollectionUtils.isEmpty(salarySobItemPOS)) { @@ -83,19 +72,7 @@ public class SalarySobItemBiz { } } - public void InsertItemShow(SalarySobItemHidePO salarySobItemHidePO) { - if (salarySobItemHidePO == null) { - return; - } - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class); - mapper.insertItemShow(salarySobItemHidePO); - sqlSession.commit(); - } finally { - sqlSession.close(); - } - } + public List listBySalarySobIdAndGroupId(Long salarySobId, Collection salarySobItemGroupIds) { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); @@ -141,21 +118,6 @@ public class SalarySobItemBiz { } - public void batchInsertItemShow(List list) { - if (CollectionUtils.isEmpty(list)) { - return; - } - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class); - List> partition = Lists.partition( list, 100); - partition.forEach(mapper::batchInsertItemShow); - sqlSession.commit(); - } finally { - sqlSession.close(); - } - } - public void update(SalarySobItemPO salarySobItemPO) { if (Objects.isNull(salarySobItemPO)) { return; diff --git a/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java b/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java index a3b7ea962..839c3f779 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java @@ -53,4 +53,9 @@ public class AttendQuoteDataBaseDTO { * 工号 */ private String jobNum; + + /** + * 证件号码 + */ + private String idNo; } diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index 2dc46b6c0..2e8f30ea4 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -172,7 +172,7 @@ public class SalaryBillBO { try { Method method = salaryFormulaEmployeeDTO.getClass().getMethod(getter); Object invoke = method.invoke(salaryFormulaEmployeeDTO); - e.setSalaryItemValue((String) invoke); + e.setSalaryItemValue(Util.null2String(invoke)); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { log.error("no such method", e); } @@ -386,7 +386,6 @@ public class SalaryBillBO { } try { - log.info("发送短信内容, {}", content); if (e.get("mobile") != null) { MessageUtil.sendSMS(e.get("mobile").toString(), content); } else { diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java index 64f6bcfe5..121092602 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java @@ -181,9 +181,9 @@ public class SalaryAcctResultBO { List childrenColumns = Lists.newArrayList(); for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemGroupDTO.getName(), 0), salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns); @@ -192,18 +192,18 @@ public class SalaryAcctResultBO { // 没有分类的薪资项目 for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } // 回算的薪资项目 for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getBackCalcItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } @@ -288,6 +288,8 @@ public class SalaryAcctResultBO { } // 主键id map.put("id", e.getId()); + //锁定状态 + map.put("lockStatus", LockStatusEnum.getByValue(e.getLockStatus()).getDefaultLabel()); //人员id map.put("employeeId", e.getEmployeeId()); // 个税扣缴义务人 @@ -552,7 +554,7 @@ public class SalaryAcctResultBO { // .canEdit(Objects.equals(Optional.ofNullable(salaryItemPO).map(SalaryItemPO::getUseInEmployeeSalary).orElse(0), 0)) .canEdit(true) .pattern(salarySobItemPO.getPattern()) - .lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getValue() : LockStatusEnum.UNLOCK.getValue()) + .lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getDefaultLabel() : LockStatusEnum.UNLOCK.getDefaultLabel()) .build(); } diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultUpdateLockStatusParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultUpdateLockStatusParam.java index 1e6042977..c4ed999fd 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultUpdateLockStatusParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultUpdateLockStatusParam.java @@ -21,19 +21,19 @@ import java.util.Set; @AllArgsConstructor @NoArgsConstructor public class SalaryAcctResultUpdateLockStatusParam { - //锁定状态 private LockStatusEnum lockStatus; - //薪资项目的Id") - private Long salaryItemId; - //薪资核算人员的id") -// private Set idStrSet; + //薪资核算记录的id + private Long salaryAcctRecordId; + + //薪资项目的Id + private Long salaryItemId; //薪资项目的IdList private Set salaryItemIds; - //薪资核算记录的id") - private Long salaryAcctRecordId; + //薪资核算人员的id + private Set acctEmpIds; } diff --git a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java index f46c43f34..26b0c3e59 100644 --- a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java +++ b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java @@ -1,7 +1,7 @@ package com.engine.salary.entity.salaryacct.po; -import com.engine.salary.annotation.SalaryFormulaVar; import com.engine.hrmelog.annotation.ElogTransform; +import com.engine.salary.annotation.SalaryFormulaVar; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; @@ -119,6 +119,11 @@ public class SalaryAcctEmployeePO { @ElogTransform(name = "更新时间") private Date updateTime; + + @ElogTransform(name = "锁定状态") + private Integer lockStatus; + + //--------条件---------- //主键id集合 private Collection ids; diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemBO.java index 049d06c5c..bc8aa4ecb 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemBO.java @@ -67,8 +67,6 @@ public class SalarySobItemBO { List defaultSalaryItemPOS, Long employeeId, String tenantKey) { Date now = new Date(); - // 需要保存的隐藏项目 - List needInsertItemHides = new ArrayList<>(); // 处理薪资账套默认的薪资项目分类 Map salarySobItemGroupIdMap = Maps.newHashMapWithExpectedSize(salarySobDefaultItemGroupPOS.size()); List salarySobItemGroups = Lists.newArrayListWithExpectedSize(salarySobDefaultItemGroupPOS.size()); @@ -87,20 +85,6 @@ public class SalarySobItemBO { .deleteType(NumberUtils.INTEGER_ZERO) .build()); salarySobItemGroupIdMap.put(salarySobDefaultItemGroupPO.getId(), salarySobItemGroupId); - - // 保存薪资项目分类隐藏信息 - needInsertItemHides.add(SalarySobItemHidePO.builder() - .id(IdGenerator.generate()) - .salarySobId(salarySobId) - .salaryItemId(salarySobItemGroupId) - .isGroup(1) - .itemHide(0L) - .creator(employeeId) - .createTime(now) - .updateTime(now) - .deleteType(NumberUtils.INTEGER_ZERO) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .build()); } @@ -128,20 +112,6 @@ public class SalarySobItemBO { .tenantKey(tenantKey) .deleteType(NumberUtils.INTEGER_ZERO) .build()); - - // 保存薪资项目隐藏信息 - needInsertItemHides.add(SalarySobItemHidePO.builder() - .id(IdGenerator.generate()) - .salarySobId(salarySobId) - .salaryItemId(salaryItemPO.getId()) - .isGroup(0) - .itemHide(Long.valueOf(salaryItemPO.getHideDefault()== null ? 0 : salaryItemPO.getHideDefault())) - .creator(employeeId) - .createTime(now) - .updateTime(now) - .deleteType(NumberUtils.INTEGER_ZERO) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .build()); } // 处理薪资账套默认的自定义薪资项目(开启了"默认使用") for (int i = 0; i < defaultSalaryItemPOS.size(); i++) { @@ -169,19 +139,6 @@ public class SalarySobItemBO { .tenantKey(tenantKey) .deleteType(NumberUtils.INTEGER_ZERO) .build()); - // 保存薪资项目隐藏信息 - needInsertItemHides.add(SalarySobItemHidePO.builder() - .id(IdGenerator.generate()) - .salarySobId(salarySobId) - .salaryItemId(salaryItemPO.getId()) - .isGroup(0) - .itemHide(Long.valueOf(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault())) - .creator(employeeId) - .createTime(now) - .updateTime(now) - .deleteType(NumberUtils.INTEGER_ZERO) - .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) - .build()); } // 薪资账套默认的回算薪资项目 @@ -209,7 +166,7 @@ public class SalarySobItemBO { } return new Result().setNeedInsertSalarySobItems(salarySobItems).setNeedInsertSalarySobItemGroups(salarySobItemGroups) - .setNeedInsertSalarySobBackItems(salarySobBackItems).setNeedInsertItemHides(needInsertItemHides); + .setNeedInsertSalarySobBackItems(salarySobBackItems); } @Data @@ -230,10 +187,5 @@ public class SalarySobItemBO { * 需要保存的回算薪资项目 */ List needInsertSalarySobBackItems; - - /** - * 需要保存的薪资项目隐藏信息 - */ - List needInsertItemHides; } } diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesEmployeePO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesEmployeePO.java index 2aa206984..2fb5297ce 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesEmployeePO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesEmployeePO.java @@ -36,6 +36,8 @@ public class InsuranceArchivesEmployeePO { private String telephone; + private String idNo; + @I18n private String departmentName; diff --git a/src/com/engine/salary/entity/siexport/po/AccountExportPO.java b/src/com/engine/salary/entity/siexport/po/AccountExportPO.java index 574c08b5c..73c82c82e 100644 --- a/src/com/engine/salary/entity/siexport/po/AccountExportPO.java +++ b/src/com/engine/salary/entity/siexport/po/AccountExportPO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.siexport.po; import com.engine.salary.annotation.I18n; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; +import lombok.Data; /** * @Author weaver_cl @@ -9,6 +10,7 @@ import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; * @Date 2022/3/7 * @Version V1.0 **/ +@Data public class AccountExportPO extends InsuranceAccountDetailPO { @I18n @@ -16,58 +18,12 @@ public class AccountExportPO extends InsuranceAccountDetailPO { private String telephone; + private String idNo; + @I18n private String departmentName; private Integer userStatus; private String workcode; - - public void setWorkcode(String workcode) { - this.workcode = workcode; - } - - public String getWorkcode() { - return workcode; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getTelephone() { - return telephone; - } - - public void setTelephone(String telephone) { - this.telephone = telephone; - } - - public String getDepartmentName() { - return departmentName; - } - - public void setDepartmentName(String departmentName) { - this.departmentName = departmentName; - } - - public Integer getUserStatus() { - return userStatus; - } - - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - // public UserStatusEnum getUserStatus() { -// return userStatus; -// } -// -// public void setUserStatus(UserStatusEnum userStatus) { -// this.userStatus = userStatus; -// } } diff --git a/src/com/engine/salary/enums/salaryaccounting/LockStatusEnum.java b/src/com/engine/salary/enums/salaryaccounting/LockStatusEnum.java index 316f9aa91..e7fa758c2 100644 --- a/src/com/engine/salary/enums/salaryaccounting/LockStatusEnum.java +++ b/src/com/engine/salary/enums/salaryaccounting/LockStatusEnum.java @@ -3,25 +3,25 @@ package com.engine.salary.enums.salaryaccounting; import com.engine.salary.enums.BaseEnum; -public enum LockStatusEnum implements BaseEnum { - DEFAULT("DEFAULT", "默认", 0), - LOCK("LOCK", "锁定", 0), - UNLOCK("UNLOCK", "未锁定", 0); +public enum LockStatusEnum implements BaseEnum { + LOCK(1, "LOCK", 0), + UNLOCK(0, "UNLOCK", 0); - private String value; + private Integer value; private String defaultLabel; private int labelId; - LockStatusEnum(String value, String defaultLabel, int labelId) { + + LockStatusEnum(Integer value, String defaultLabel, int labelId) { this.value = value; this.defaultLabel = defaultLabel; this.labelId = labelId; } @Override - public String getValue() { + public Integer getValue() { return value; } @@ -34,4 +34,13 @@ public enum LockStatusEnum implements BaseEnum { public String getDefaultLabel() { return defaultLabel; } + + public static LockStatusEnum getByValue(Integer value) { + for (LockStatusEnum lockStatusEnum : LockStatusEnum.values()) { + if (lockStatusEnum.getValue().equals(value)) { + return lockStatusEnum; + } + } + return UNLOCK; + } } diff --git a/src/com/engine/salary/mapper/InsuranceExportMapper.xml b/src/com/engine/salary/mapper/InsuranceExportMapper.xml index 481c44a30..dbe86d9f6 100644 --- a/src/com/engine/salary/mapper/InsuranceExportMapper.xml +++ b/src/com/engine/salary/mapper/InsuranceExportMapper.xml @@ -7,6 +7,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -32,6 +33,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -57,6 +59,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -121,6 +124,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -147,6 +151,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -173,6 +178,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml index b02390a48..234d990b3 100644 --- a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml @@ -163,7 +163,8 @@ e.lastname as username, d.departmentname AS departmentName, e.mobile, - e.workcode as job_num + e.workcode as job_num, + e.certificatenum as idNo diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java index c27b10ac8..3b97e3084 100644 --- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java +++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java @@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Param; import java.util.Collection; import java.util.List; +import java.util.Set; /** * 薪资核算人员 @@ -16,7 +17,7 @@ import java.util.List; * @author qiantao * @version 1.0 **/ -public interface SalaryAcctEmployeeMapper { +public interface SalaryAcctEmployeeMapper { /** * 批量插入 @@ -117,4 +118,8 @@ public interface SalaryAcctEmployeeMapper { * @return 返回记录,没有返回null */ SalaryAcctEmployeePO getById(Long id); + + void lockByAcctEmpIds(@Param("lockStatus") Integer lockStatus, @Param("acctEmpIds") Set acctEmpIds); + + void lockByRecordId(@Param("lockStatus") Integer lockStatus, @Param("recordId") Long recordId); } diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml index a5a87e205..f39b5bc53 100644 --- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml +++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml @@ -15,6 +15,7 @@ + @@ -52,7 +54,7 @@ INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type) + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) VALUES ( @@ -66,14 +68,15 @@ #{emp.updateTime}, #{emp.deleteType}, #{emp.tenantKey}, - #{emp.employeeType} + #{emp.employeeType}, + #{emp.lockStatus} ) INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type) + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) select @@ -87,7 +90,8 @@ #{emp.updateTime,jdbcType=DATE}, #{emp.deleteType,jdbcType=INTEGER}, #{emp.tenantKey,jdbcType=VARCHAR}, - #{emp.employeeType,jdbcType=INTEGER} + #{emp.employeeType,jdbcType=INTEGER}, + #{emp.lockStatus,jdbcType=INTEGER} from dual @@ -95,7 +99,7 @@ INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type) + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) VALUES ( #{emp.salaryAcctRecordId}, @@ -108,7 +112,8 @@ #{emp.updateTime}, #{emp.deleteType}, #{emp.tenantKey}, - #{emp.employeeType} + #{emp.employeeType}, + #{emp.lockStatus} ) @@ -1145,6 +1150,7 @@ + @@ -1163,6 +1169,7 @@ , t.delete_type , t.tenant_key , t.employee_type + , t.lock_status @@ -1259,4 +1266,22 @@ FROM hrsa_salary_acct_emp t WHERE id = #{id} AND delete_type = 0 + + + UPDATE hrsa_salary_acct_emp + SET lock_status = #{lockStatus} + WHERE delete_type = 0 + AND id IN + + #{acctEmpId} + + + + + UPDATE hrsa_salary_acct_emp + SET lock_status = #{lockStatus} + WHERE delete_type = 0 + AND salary_acct_record_id =#{recordId} + + diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.java b/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.java index 0900cfa60..dd2e00621 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.java +++ b/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.java @@ -1,6 +1,5 @@ package com.engine.salary.mapper.salarysob; -import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import org.apache.ibatis.annotations.Param; @@ -24,7 +23,6 @@ public interface SalarySobItemMapper { */ List listSome(SalarySobItemPO salarySobItemPO); - List listBySalarySobIdWithHideItem(SalarySobItemPO salarySobItemPO); /** @@ -35,14 +33,7 @@ public interface SalarySobItemMapper { */ SalarySobItemPO getById(Long id); - /** - * 新增,忽略null字段 - * - * @param salarySobItemPO 新增的记录 - * @return 返回影响行数 - */ - int insertIgnoreNull(SalarySobItemPO salarySobItemPO); - + /** * 修改,修改所有字段 * @@ -50,7 +41,7 @@ public interface SalarySobItemMapper { * @return 返回影响行数 */ int update(SalarySobItemPO salarySobItemPO); - + /** * 修改,忽略null字段 * @@ -97,12 +88,6 @@ public interface SalarySobItemMapper { */ void deleteItemShowBySalarySobId(@Param("salarySobIds")Collection salarySobIds); - /** - * 插入薪资项目分组是否显示 - * @param salarySobItemHidePO - */ - void insertItemShow(SalarySobItemHidePO salarySobItemHidePO); - /** * 根据账套id以及薪资项目分组获取 * @param @@ -112,9 +97,4 @@ public interface SalarySobItemMapper { void deleteByGroupIds(@Param("groupIds") List needDeleteGroupIds); - /** - * 批量插入薪资项目分组是否显示 - * @param list - */ - void batchInsertItemShow(@Param("collection")List list); } \ No newline at end of file diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml index d7226ffdc..0dd1fc5df 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml +++ b/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml @@ -151,129 +151,6 @@ - - - - - - INSERT INTO hrsa_salary_sob_item - - - - create_time, - - - creator, - - - delete_type, - - - description, - - - formula_id, - - - id, - - - salary_item_id, - - - salary_sob_id, - - - salary_sob_item_group_id, - - - sorted_index, - - - tenant_key, - - - update_time, - - - can_delete, - - - item_hide, - - - - - #{createTime}, - - - #{creator}, - - - #{deleteType}, - - - #{description}, - - - #{formulaId}, - - - #{id}, - - - #{salaryItemId}, - - - #{salarySobId}, - - - #{salarySobItemGroupId}, - - - #{sortedIndex}, - - - #{tenantKey}, - - - #{updateTime}, - - - #{canDelete}, - - - #{itemHide}, - - - - UPDATE hrsa_salary_sob_item @@ -474,72 +351,6 @@ - - insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide, - creator,tenant_key,create_time,update_time,delete_type) - VALUES (#{id},#{salarySobId},#{salaryItemId}, - #{isGroup},#{itemHide},#{creator}, - #{tenantKey},#{createTime},#{updateTime},0) - - - - insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide, - creator,tenant_key,create_time,update_time,delete_type) - VALUES - - ( - #{item.id}, - #{item.salarySobId}, - #{item.salaryItemId}, - #{item.isGroup}, - #{item.itemHide}, - #{item.creator}, - #{item.tenantKey}, - #{item.createTime}, - #{item.updateTime}, - 0 - ) - - - - insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide, - creator,tenant_key,create_time,update_time,delete_type) - - select - #{item.id,jdbcType=DOUBLE}, - #{item.salarySobId,jdbcType=DOUBLE}, - #{item.salaryItemId,jdbcType=DOUBLE}, - #{item.isGroup,jdbcType=INTEGER}, - #{item.itemHide,jdbcType=INTEGER}, - #{item.creator,jdbcType=DOUBLE}, - #{item.tenantKey,jdbcType=VARCHAR}, - #{item.createTime,jdbcType=DATE}, - #{item.updateTime,jdbcType=DATE}, - 0 - from dual - - - - - insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide, - creator,tenant_key,create_time,update_time,delete_type) - VALUES - ( - #{item.id}, - #{item.salarySobId}, - #{item.salaryItemId}, - #{item.isGroup}, - #{item.itemHide}, - #{item.creator}, - #{item.tenantKey}, - #{item.createTime}, - #{item.updateTime}, - 0 - ) - - - - UPDATE hrsa_salary_sob_item SET delete_type = 1 diff --git a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml index 14bc0be8e..1dba6c07f 100644 --- a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml @@ -355,7 +355,7 @@