Commit f8ef7dc0 authored by hongguangwu's avatar hongguangwu

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

parents 1498ff33 98b40882
...@@ -3357,7 +3357,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3357,7 +3357,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
param.setCreateBy(user.getId()); param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param); menuUtil.setAuthSql(user, param);
IPage<InsuredListVo> insuranceList = new Page<>(); IPage<InsuredListVo> insuranceList;
insuranceList = this.baseMapper.getInsuredListPage(page, param); insuranceList = this.baseMapper.getInsuredListPage(page, param);
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){ if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
//根据项目编码获取项目名称 //根据项目编码获取项目名称
...@@ -3389,12 +3389,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3389,12 +3389,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public R getInsuredList(InsuredParam param) { public R getInsuredList(InsuredParam param) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<String> deptList = getDeptNoList(user); param.setCreateBy(user.getId());
List<InsuredListVo> insuredList = new ArrayList<>(); menuUtil.setAuthSql(user, param);
if (CollectionUtils.isEmpty(deptList)){ List<InsuredListVo> insuredList;
return R.ok(insuredList);
}
param.setDeptNoList(deptList);
insuredList = this.baseMapper.getInsuredList(param); insuredList = this.baseMapper.getInsuredList(param);
if (CollectionUtils.isNotEmpty(insuredList)){ if (CollectionUtils.isNotEmpty(insuredList)){
if(insuredList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){ if(insuredList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
...@@ -3475,12 +3472,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3475,12 +3472,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public R getInsuranceRefundList(InsuranceRefundParam param) { public R getInsuranceRefundList(InsuranceRefundParam param) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<String> deptNoList = getDeptNoList(user); param.setCreateBy(user.getId());
List<InsuranceRefundListVo> pageList = new ArrayList<>(); menuUtil.setAuthSql(user, param);
if(CollectionUtils.isEmpty(deptNoList)){
return R.ok(pageList);
}
param.setDeptNoList(deptNoList);
List<InsuranceRefundListVo> insuranceRefundList = this.baseMapper.getInsuranceRefundList(param); List<InsuranceRefundListVo> insuranceRefundList = this.baseMapper.getInsuranceRefundList(param);
if (CollectionUtils.isNotEmpty(insuranceRefundList)){ if (CollectionUtils.isNotEmpty(insuranceRefundList)){
if(insuranceRefundList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){ if(insuranceRefundList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
...@@ -5870,6 +5863,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5870,6 +5863,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.failed(InsurancesConstants.ORDER_NO_IS_EMPTY); return R.failed(InsurancesConstants.ORDER_NO_IS_EMPTY);
} }
if (user != null && Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
String sql; String sql;
// 获取人员项目权限 // 获取人员项目权限
R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl() R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl()
...@@ -5886,6 +5880,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5886,6 +5880,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
sql = "and (1=2 or a.dept_id in ('0'#settleDomainId))"; sql = "and (1=2 or a.dept_id in ('0'#settleDomainId))";
sql = sql.replace("#settleDomainId", deptStr.toString()); sql = sql.replace("#settleDomainId", deptStr.toString());
param.setAuthSql(sql); param.setAuthSql(sql);
}
//查询所有保单信息 //查询所有保单信息
IPage<InsuredOrderListVo> orderInsuredList = baseMapper.getOrderInsuredListPage(page, param); IPage<InsuredOrderListVo> orderInsuredList = baseMapper.getOrderInsuredListPage(page, param);
return R.ok(orderInsuredList); return R.ok(orderInsuredList);
......
...@@ -526,6 +526,9 @@ ...@@ -526,6 +526,9 @@
a.CREATE_NAME as createName a.CREATE_NAME as createName
from from
t_insurance_detail a t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
</if>
where where
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and and
...@@ -573,6 +576,10 @@ ...@@ -573,6 +576,10 @@
<if test="param.createEndTime != null and param.createEndTime.trim() != ''"> <if test="param.createEndTime != null and param.createEndTime.trim() != ''">
AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.createEndTime}, ' 23:59:59') AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.createEndTime}, ' 23:59:59')
</if> </if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY a.CREATE_TIME DESC ORDER BY a.CREATE_TIME DESC
</select> </select>
<!-- 已减员列表分页查询--> <!-- 已减员列表分页查询-->
...@@ -657,8 +664,11 @@ ...@@ -657,8 +664,11 @@
a.DIE_DISABLE_QUOTA as dieDisableQuota, a.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_TIME as refundCreateTime refund.CREATE_TIME as refundCreateTime
from from
t_insurance_detail a, (t_insurance_detail a,
t_insurance_refund refund t_insurance_refund refund)
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
</if>
where where
a.REFUND_ID = refund.ID a.REFUND_ID = refund.ID
and and
...@@ -674,12 +684,6 @@ ...@@ -674,12 +684,6 @@
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO = #{param.deptNo} and a.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.deptNo == null or param.deptNo.trim() == ''">
and a.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName} and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if> </if>
...@@ -699,6 +703,10 @@ ...@@ -699,6 +703,10 @@
(a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')) (a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
) )
</if> </if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.id
ORDER BY refund.CREATE_TIME DESC ORDER BY refund.CREATE_TIME DESC
</select> </select>
<!-- 减员办理列表分页查询--> <!-- 减员办理列表分页查询-->
......
...@@ -92,7 +92,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -92,7 +92,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("#create_depts")) { if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("#create_depts")) {
String userIds = "0"; String userIds = "0";
R<String> userIdR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl() R<String> userIdR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl()
,daprUpmsProperties.getAppId(),"/user/inner/getUserIdByDeptIds",user.getDeptId() ,daprUpmsProperties.getAppId(),"/user/inner/getUserNamedByDeptIds",user.getDeptId()
, String.class, SecurityConstants.FROM_IN); , String.class, SecurityConstants.FROM_IN);
if (userIdR != null && CommonConstants.SUCCESS == userIdR.getCode()) { if (userIdR != null && CommonConstants.SUCCESS == userIdR.getCode()) {
userIds = userIdR.getData(); userIds = userIdR.getData();
...@@ -113,6 +113,20 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -113,6 +113,20 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
@Override @Override
public R<List<OrderListVO>> getOrderList(OrderListParam param) { public R<List<OrderListVO>> getOrderList(OrderListParam param) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("#create_name")) {
param.setAuthSql(param.getAuthSql().replace("#create_name", user.getUsername()));
}
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("#create_depts")) {
String userIds = "0";
R<String> userIdR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl()
,daprUpmsProperties.getAppId(),"/user/inner/getUserNamedByDeptIds",user.getDeptId()
, String.class, SecurityConstants.FROM_IN);
if (userIdR != null && CommonConstants.SUCCESS == userIdR.getCode()) {
userIds = userIdR.getData();
}
param.setAuthSql(param.getAuthSql().replace("#create_depts", userIds));
}
List<OrderListVO> list; List<OrderListVO> list;
if (CollectionUtils.isNotEmpty(param.getIdList())){ if (CollectionUtils.isNotEmpty(param.getIdList())){
list = baseMapper.getOrderListBySelect(param.getIdList()); list = baseMapper.getOrderListBySelect(param.getIdList());
......
...@@ -86,39 +86,43 @@ ...@@ -86,39 +86,43 @@
</select> </select>
<select id="getOrderList" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO"> <select id="getOrderList" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO">
select t.id as id, select a.id as id,
t.ORDER_NO as orderNo, a.ORDER_NO as orderNo,
t.CREATE_TIME as createTime, a.CREATE_TIME as createTime,
t.CREATE_NAME as createName, a.CREATE_NAME as createName,
t.CUSTOMER_NAME as customerName, a.CUSTOMER_NAME as customerName,
t.DEPT_NAME as deptName, a.DEPT_NAME as deptName,
t.DEPT_NO as deptNo, a.DEPT_NO as deptNo,
t.ORDER_STATUS as orderStatus a.ORDER_STATUS as orderStatus
from t_order t from t_order a
where t.DELETE_FLAG = 0 left join t_order_handler h on h.ORDER_NO = a.ORDER_NO
and #{userName} in (SELECT HANDLE_USER FROM t_order_handler h WHERE h.ORDER_NO = t.ORDER_NO) where a.DELETE_FLAG = 0
<if test="param.orderNo != null and param.orderNo.trim() != ''"> <if test="param.orderNo != null and param.orderNo.trim() != ''">
and t.ORDER_NO = #{param.orderNo} and a.ORDER_NO = #{param.orderNo}
</if> </if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"> <if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and t.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and t.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59') and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if> </if>
<if test="param.createName != null and param.createName.trim() != ''"> <if test="param.createName != null and param.createName.trim() != ''">
and t.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%') and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.customerName != null and param.customerName.trim() != ''"> <if test="param.customerName != null and param.customerName.trim() != ''">
and t.CUSTOMER_NAME = #{param.customerName} and a.CUSTOMER_NAME = #{param.customerName}
</if> </if>
<if test="param.deptName != null and param.deptName.trim() != ''"> <if test="param.deptName != null and param.deptName.trim() != ''">
and t.DEPT_NAME = #{param.deptName} and a.DEPT_NAME = #{param.deptName}
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and t.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%') and a.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.orderStatus != null"> <if test="param.orderStatus != null">
and t.ORDER_STATUS = #{param.orderStatus} and a.ORDER_STATUS = #{param.orderStatus}
</if> </if>
ORDER BY t.CREATE_TIME DESC <if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
GROUP BY a.ID
ORDER BY a.CREATE_TIME DESC
</select> </select>
<select id="getOrderDetailById" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO"> <select id="getOrderDetailById" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO">
......
...@@ -100,6 +100,8 @@ public class TSalaryAccountController { ...@@ -100,6 +100,8 @@ public class TSalaryAccountController {
public R<IPage<TSalaryAccount>> getTSalaryAccountPageOrder(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount) { public R<IPage<TSalaryAccount>> getTSalaryAccountPageOrder(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount) {
tSalaryAccount.setDeleteFlag(CommonConstants.ZERO_INT); tSalaryAccount.setDeleteFlag(CommonConstants.ZERO_INT);
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
// 普通用户:
if (user != null && Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
String sql; String sql;
// 获取人员项目权限 // 获取人员项目权限
R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl() R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl()
...@@ -116,6 +118,7 @@ public class TSalaryAccountController { ...@@ -116,6 +118,7 @@ public class TSalaryAccountController {
sql = "and (1=2 or a.dept_id in ('0'#settleDomainId))"; sql = "and (1=2 or a.dept_id in ('0'#settleDomainId))";
sql = sql.replace("#settleDomainId", deptStr.toString()); sql = sql.replace("#settleDomainId", deptStr.toString());
tSalaryAccount.setAuthSql(sql); tSalaryAccount.setAuthSql(sql);
}
return new R<>(tSalaryAccountService.getTSalaryAccountPage(page, tSalaryAccount)); return new R<>(tSalaryAccountService.getTSalaryAccountPage(page, tSalaryAccount));
} }
......
...@@ -131,6 +131,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -131,6 +131,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
configSalary = configSalaryService.getById(configId); configSalary = configSalaryService.getById(configId);
} else { } else {
configSalary = configSalaryService.getById(CommonConstants.ONE_STRING); configSalary = configSalaryService.getById(CommonConstants.ONE_STRING);
if(Common.isEmpty(configSalary)) {
configSalary = new TConfigSalary();
}
} }
try { try {
jsonString = URLDecoder.decode(jsonString, "UTF-8").replace("=", ""); jsonString = URLDecoder.decode(jsonString, "UTF-8").replace("=", "");
......
...@@ -136,6 +136,7 @@ public class TDispatchInfoController { ...@@ -136,6 +136,7 @@ public class TDispatchInfoController {
tDispatchInfo.setCreateBy(user.getId()); tDispatchInfo.setCreateBy(user.getId());
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING); tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
if (user != null && Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
String sql; String sql;
// 获取人员项目权限 // 获取人员项目权限
R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl() R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl()
...@@ -155,6 +156,7 @@ public class TDispatchInfoController { ...@@ -155,6 +156,7 @@ public class TDispatchInfoController {
if (Common.isNotNull(tDispatchInfo.getAuthSql()) && tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (Common.isNotNull(tDispatchInfo.getAuthSql()) && 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"));
} }
}
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page, tDispatchInfo)); return new R<>(tDispatchInfoService.getTDispatchInfoPage(page, tDispatchInfo));
} }
......
...@@ -341,4 +341,25 @@ public class UserController { ...@@ -341,4 +341,25 @@ public class UserController {
} }
return userIds.toString(); return userIds.toString();
} }
/**
* @Author hgw
* @Description 获取部门下的用户id
* @Date 2022-9-14 11:29:59
**/
@Inner
@PostMapping(value = {"/inner/getUserNamedByDeptIds"})
public String getUserNameByDeptIds(@RequestBody String deptIds) {
StringBuilder userIds = new StringBuilder("'0'");
if (Common.isNotNull(deptIds)) {
List<String> list = Common.initStrToList(deptIds, ",");
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda().in(SysUser::getDeptId, list));
if (Common.isNotEmpty(sysUsers)){
for (SysUser u:sysUsers){
userIds.append(",'").append(u.getUsername()).append("'");
}
}
}
return userIds.toString();
}
} }
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