Commit ccb00d91 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents 8a8d3b5b 5996cd1e
...@@ -125,8 +125,9 @@ public class TEmpChangeInfoController { ...@@ -125,8 +125,9 @@ public class TEmpChangeInfoController {
*/ */
@Operation(description = "分页查询") @Operation(description = "分页查询")
@GetMapping("/getAllDeptPage" ) @GetMapping("/getAllDeptPage" )
public R<IPage<TSettleDomain>> getItemNamePage(Page page,String departName) { public R<IPage<TSettleDomain>> getItemNamePage(Page page,@RequestParam(required = false) String departName
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName)); , @RequestParam(required = false) String customerId) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, customerId));
} }
/** /**
......
...@@ -68,5 +68,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> { ...@@ -68,5 +68,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/ */
R<List<TCustomerInfo>> getAllUint(); R<List<TCustomerInfo>> getAllUint();
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName); IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId);
} }
...@@ -304,16 +304,19 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -304,16 +304,19 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @Date 2022-07-26 * @Date 2022-07-26
*/ */
@Override @Override
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName) { public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName); LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, customerId);
return tSettleDomainMapper.selectPage(page,wrapper); return tSettleDomainMapper.selectPage(page,wrapper);
} }
private LambdaQueryWrapper buildQueryWrapper(String deptName) { private LambdaQueryWrapper buildQueryWrapper(String deptName, String customerId) {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(deptName)) { if (Common.isNotNull(deptName)) {
wrapper.like(TSettleDomain::getDepartName, deptName); wrapper.like(TSettleDomain::getDepartName, deptName);
} }
if (Common.isNotNull(customerId)) {
wrapper.eq(TSettleDomain::getCustomerId, customerId);
}
wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING); wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING);
wrapper.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING); wrapper.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING);
return wrapper; return wrapper;
......
...@@ -793,8 +793,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -793,8 +793,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg.add("员工类型必填!"); errorMsg.add("员工类型必填!");
errorMsgMap.put(lineNum, new ErrorMessage("员工类型必填!")); errorMsgMap.put(lineNum, new ErrorMessage("员工类型必填!"));
} else if (EmployeeConstants.EMP_NATRUE_ZERO.equals(employeeInfo.getEmpNatrue()) } else if (EmployeeConstants.EMP_NATRUE_ZERO.equals(employeeInfo.getEmpNatrue())
|| EmployeeConstants.EMP_NATRUE_ONE.equals(employeeInfo.getEmpNatrue())) { || EmployeeConstants.EMP_NATRUE_ONE.equals(employeeInfo.getEmpNatrue())
// 2.员工类型为外包和派遣,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址 || CommonConstants.THREE_STRING.equals(employeeInfo.getEmpNatrue())) {
// 2.员工类型为外包和派遣和内部员工,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址
if (Common.isEmpty(employeeInfo.getValidityStart())) { if (Common.isEmpty(employeeInfo.getValidityStart())) {
errorMsg.add(EmployeeConstants.VALIDITY_START); errorMsg.add(EmployeeConstants.VALIDITY_START);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.VALIDITY_START)); errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.VALIDITY_START));
...@@ -1893,7 +1894,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -1893,7 +1894,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private void judgeNull(Set<String> errorMsg, TEmployeeInfo employeeInfo) { private void judgeNull(Set<String> errorMsg, TEmployeeInfo employeeInfo) {
if (Common.isNotNull(employeeInfo.getEmpNatrue()) if (Common.isNotNull(employeeInfo.getEmpNatrue())
&& (CommonConstants.ZERO_STRING.equals(employeeInfo.getEmpNatrue()) && (CommonConstants.ZERO_STRING.equals(employeeInfo.getEmpNatrue())
|| CommonConstants.ONE_STRING.equals(employeeInfo.getEmpNatrue()))) { || CommonConstants.ONE_STRING.equals(employeeInfo.getEmpNatrue())
|| CommonConstants.THREE_STRING.equals(employeeInfo.getEmpNatrue()))) {
// 2.员工类型为外包和派遣,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址 // 2.员工类型为外包和派遣,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址
if (Common.isEmpty(employeeInfo.getValidityStart())) { if (Common.isEmpty(employeeInfo.getValidityStart())) {
errorMsg.add(EmployeeConstants.VALIDITY_START); errorMsg.add(EmployeeConstants.VALIDITY_START);
......
...@@ -277,7 +277,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -277,7 +277,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新 //从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet()); Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.THREE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.THREE_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) { } else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
...@@ -758,7 +760,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -758,7 +760,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
idCard = excel.getEmpIdcard(); idCard = excel.getEmpIdcard();
deptNo = excel.getDeptNo(); deptNo = excel.getDeptNo();
if (excel.getEmpNatrue().equals(CommonConstants.ZERO_STRING) || excel.getEmpNatrue().equals(CommonConstants.ONE_STRING)) { if (excel.getEmpNatrue().equals(CommonConstants.ZERO_STRING)
|| excel.getEmpNatrue().equals(CommonConstants.ONE_STRING)
|| excel.getEmpNatrue().equals(CommonConstants.THREE_STRING)) {
if (excel.getContractType().equals(CommonConstants.ONE_STRING) && Common.isEmpty(excel.getWorkingHours())) { if (excel.getContractType().equals(CommonConstants.ONE_STRING) && Common.isEmpty(excel.getWorkingHours())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "工时制不能为空!")); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "工时制不能为空!"));
} }
......
...@@ -79,16 +79,15 @@ public class TDispatchInfoController { ...@@ -79,16 +79,15 @@ public class TDispatchInfoController {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tDispatchInfo); menuUtil.setAuthSql(user, tDispatchInfo);
if (Common.isNotNull(tDispatchInfo.getAuthSql())) { if (Common.isNotNull(tDispatchInfo.getAuthSql())) {
if(tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN")); tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
} }
if (tDispatchInfo.getAuthSql().contains("s.") || tDispatchInfo.getAuthSql().contains("f.")){ if (tDispatchInfo.getAuthSql().contains("1=2 EXISTS")) {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace("s.", "a.")); tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace("f.", "a."));
} }
} }
tDispatchInfo.setCreateBy(user.getId()); tDispatchInfo.setCreateBy(user.getId());
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo)); return new R<>(tDispatchInfoService.getTDispatchInfoPageAudit(page,tDispatchInfo));
} }
/** /**
...@@ -189,13 +188,12 @@ public class TDispatchInfoController { ...@@ -189,13 +188,12 @@ public class TDispatchInfoController {
if (tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN")); tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
} }
if (tDispatchInfo.getAuthSql().contains("s.") || tDispatchInfo.getAuthSql().contains("f.")){ if (tDispatchInfo.getAuthSql().contains("1=2 EXISTS")) {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace("s.", "a.")); tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace("f.", "a."));
} }
} }
tDispatchInfo.setCreateBy(user.getId()); tDispatchInfo.setCreateBy(user.getId());
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo)); return new R<>(tDispatchInfoService.getTDispatchInfoPageAudit(page,tDispatchInfo));
} }
/** /**
...@@ -326,8 +324,13 @@ public class TDispatchInfoController { ...@@ -326,8 +324,13 @@ public class TDispatchInfoController {
public void export(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo) { public void export(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo); menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (Common.isNotNull(searchVo.getAuthSql())) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN")); if (searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
if (searchVo.getAuthSql().contains("1=2 EXISTS")) {
searchVo.setAuthSql(searchVo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
} }
searchVo.setCreateBy(user.getId()); searchVo.setCreateBy(user.getId());
tDispatchInfoService.listExport(response,searchVo); tDispatchInfoService.listExport(response,searchVo);
......
...@@ -42,6 +42,8 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -42,6 +42,8 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
*/ */
IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, @Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo); IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, @Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo);
IPage<TDispatchInfoPageVo> getTDispatchInfoPageAudit(Page<TDispatchInfo> page, @Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo);
/** /**
* @Description: 派单导出 * @Description: 派单导出
* @Author: hgw * @Author: hgw
......
...@@ -46,7 +46,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -46,7 +46,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
*/ */
IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo); IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream, String orderId); IPage<TDispatchInfoPageVo> getTDispatchInfoPageAudit(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream, String orderId);
void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo); void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
......
...@@ -120,6 +120,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -120,6 +120,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return baseMapper.getTDispatchInfoPage(page, tDispatchInfo); return baseMapper.getTDispatchInfoPage(page, tDispatchInfo);
} }
/**
* 派单信息记录表简单分页查询
*
* @param tDispatchInfo 派单信息记录表
*/
@Override
public IPage<TDispatchInfoPageVo> getTDispatchInfoPageAudit(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
return baseMapper.getTDispatchInfoPageAudit(page, tDispatchInfo);
}
/** /**
* 派单信息记录表批量导出 * 派单信息记录表批量导出
* *
......
...@@ -444,8 +444,6 @@ ...@@ -444,8 +444,6 @@
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''"> <if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
left join t_socialfund_house_res p on p.USER_ID = #{tDispatchInfo.createBy} left join t_socialfund_house_res p on p.USER_ID = #{tDispatchInfo.createBy}
</if> </if>
<!--left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund f on f.id=a.FUND_ID-->
<where> <where>
1=1 1=1
<include refid="tDispatchInfo_where"/> <include refid="tDispatchInfo_where"/>
...@@ -454,6 +452,21 @@ ...@@ -454,6 +452,21 @@
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<!--tDispatchInfo简单分页查询-->
<select id="getTDispatchInfoPageAudit" resultMap="dispatchPageMap">
SELECT
<include refid="Base_Column_List"/>,
a.SOCIAL_HOUSEHOLD_NAME,
a.PROVIDENT_HOUSEHOLD_NAME
FROM t_dispatch_info a
<where>
1=1
<include refid="tDispatchInfo_where"/>
</where>
order by a.CREATE_TIME desc
</select>
<!-- 派单导出 --> <!-- 派单导出 -->
<select id="exportDispatch" resultMap="exportMap"> <select id="exportDispatch" resultMap="exportMap">
select select
...@@ -484,16 +497,11 @@ ...@@ -484,16 +497,11 @@
a.ORGAN_NAME, a.ORGAN_NAME,
a.CREATE_TIME a.CREATE_TIME
from t_dispatch_info a from t_dispatch_info a
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
left join t_socialfund_house_res p on p.USER_ID = #{tDispatchInfo.createBy}
</if>
left join t_social_info s on s.id=a.SOCIAL_ID left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund f on f.id=a.FUND_ID
<where> <where>
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0'
<include refid="tDispatchInfo_where"/> <include refid="tDispatchInfo_where"/>
</where> </where>
group by a.id
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
<if test="tDispatchInfo.limitStart != null"> <if test="tDispatchInfo.limitStart != null">
limit #{tDispatchInfo.limitStart},#{tDispatchInfo.limitEnd} limit #{tDispatchInfo.limitStart},#{tDispatchInfo.limitEnd}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment