Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
783cccc9a9 | ||
|
|
744017cec9 |
+17
-7
@@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 子员工信息表
|
* @Description: 子员工信息表
|
||||||
@@ -106,14 +107,23 @@ public class CqBaseEmployeePayController extends JeecgController<CqBaseEmployee,
|
|||||||
if(StringUtils.isBlank(sysUserSub.getRealname())){
|
if(StringUtils.isBlank(sysUserSub.getRealname())){
|
||||||
return Result.error("用户名不能为空");
|
return Result.error("用户名不能为空");
|
||||||
}
|
}
|
||||||
//家庭用户
|
if(StringUtils.isNotEmpty(sysUserSub.getWorkNo())){
|
||||||
if(StringUtils.isNotBlank(sysUserSub.getMainUserId()) && StringUtils.isBlank(sysUserSub.getMainUserRelation())){
|
//校验工号是否已存在
|
||||||
return Result.error("与主账户关系不能为空");
|
LambdaQueryWrapper<SysUserSub> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
}
|
queryWrapper.eq(SysUserSub::getWorkNo, sysUserSub.getWorkNo());
|
||||||
//非正式员工
|
List<SysUserSub> list = sysUserSubService.list(queryWrapper);
|
||||||
if(StringUtils.isBlank(sysUserSub.getMainUserId()) && StringUtils.isBlank(sysUserSub.getPhone())){
|
if(CollectionUtils.isNotEmpty(list)){
|
||||||
return Result.error("手机号不能为空");
|
return Result.error("工号已存在" + list.stream().map(SysUserSub::getRealname).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// //家庭用户
|
||||||
|
// if(StringUtils.isNotBlank(sysUserSub.getMainUserId()) && StringUtils.isBlank(sysUserSub.getMainUserRelation())){
|
||||||
|
// return Result.error("与主账户关系不能为空");
|
||||||
|
// }
|
||||||
|
// //非正式员工
|
||||||
|
// if(StringUtils.isBlank(sysUserSub.getMainUserId()) && StringUtils.isBlank(sysUserSub.getPhone())){
|
||||||
|
// return Result.error("手机号不能为空");
|
||||||
|
// }
|
||||||
return cqBaseEmployeeService.saveEmpSub(sysUserSub);
|
return cqBaseEmployeeService.saveEmpSub(sysUserSub);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -92,37 +92,37 @@
|
|||||||
<update id="changeBalanceAndIntegral">
|
<update id="changeBalanceAndIntegral">
|
||||||
UPDATE st_client_member_balance
|
UPDATE st_client_member_balance
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
<set>
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<choose>
|
<choose>
|
||||||
<!--余额补录影响累计余额-->
|
<!--余额补录影响累计余额-->
|
||||||
<when test="status == 1">
|
<when test="status == 1">
|
||||||
<if test="topUpBalance != null">
|
<if test="topUpBalance != null">
|
||||||
top_up_balance = top_up_balance + #{topUpBalance,jdbcType=DECIMAL},
|
top_up_balance = top_up_balance + #{topUpBalance,jdbcType=DECIMAL},
|
||||||
top_up_total = top_up_total + #{topUpBalance,jdbcType=DECIMAL}
|
top_up_total = top_up_total + #{topUpBalance,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
<if test="rewardBalance != null">
|
<if test="rewardBalance != null">
|
||||||
reward_balance = reward_balance + #{rewardBalance,jdbcType=DECIMAL}
|
reward_balance = reward_balance + #{rewardBalance,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="integralBalance != null">
|
<if test="integralBalance != null">
|
||||||
integral_balance = integral_balance + #{integralBalance,jdbcType=DECIMAL}
|
integral_balance = integral_balance + #{integralBalance,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
</when>
|
</when>
|
||||||
<!--扣减不影响累计余额-->
|
<!--扣减不影响累计余额-->
|
||||||
<when test="status == 2">
|
<when test="status == 2">
|
||||||
<if test="topUpBalance != null">
|
<if test="topUpBalance != null">
|
||||||
top_up_balance = top_up_balance - #{topUpBalance,jdbcType=DECIMAL}
|
top_up_balance = top_up_balance - #{topUpBalance,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
<if test="rewardBalance != null">
|
<if test="rewardBalance != null">
|
||||||
reward_balance = reward_balance - #{rewardBalance,jdbcType=DECIMAL}
|
reward_balance = reward_balance - #{rewardBalance,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="integralBalance != null">
|
<if test="integralBalance != null">
|
||||||
integral_balance = integral_balance - #{integralBalance,jdbcType=DECIMAL}
|
integral_balance = integral_balance - #{integralBalance,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
</set>
|
</trim>
|
||||||
</if>
|
</if>
|
||||||
WHERE id = #{id,jdbcType=INTEGER}
|
WHERE id = #{id,jdbcType=INTEGER}
|
||||||
<!--扣减需要余额大于扣减数额-->
|
<!--扣减需要余额大于扣减数额-->
|
||||||
|
|||||||
+4
-5
@@ -93,13 +93,12 @@ SELECT
|
|||||||
f.id AS id,
|
f.id AS id,
|
||||||
f.user_id AS userId,
|
f.user_id AS userId,
|
||||||
f.face_feature_data AS faceFeatureData,
|
f.face_feature_data AS faceFeatureData,
|
||||||
0 userType,
|
IF(s.user_type = 0 ,0,1) userType,
|
||||||
s.realname,
|
s.realname,
|
||||||
s.status
|
s.status
|
||||||
FROM st_user_faceimg f
|
FROM st_user_faceimg f
|
||||||
JOIN sys_user_sub s ON f.user_id = s.id
|
JOIN sys_user_sub s ON f.user_id = s.id
|
||||||
WHERE s.user_type = 0
|
WHERE f.del_flag = 0
|
||||||
and f.del_flag = 0
|
|
||||||
and f.face_status = 1
|
and f.face_status = 1
|
||||||
and s.del_flag = 0
|
and s.del_flag = 0
|
||||||
and f.face_feature_data is not null
|
and f.face_feature_data is not null
|
||||||
@@ -112,12 +111,12 @@ SELECT
|
|||||||
f.id AS id,
|
f.id AS id,
|
||||||
f.user_id AS userId,
|
f.user_id AS userId,
|
||||||
f.face_feature_data AS faceFeatureData,
|
f.face_feature_data AS faceFeatureData,
|
||||||
1 userType,
|
IF(s.user_type = 0 ,0,1) userType,
|
||||||
s.realname,
|
s.realname,
|
||||||
s.status
|
s.status
|
||||||
FROM st_user_faceimg_sub f
|
FROM st_user_faceimg_sub f
|
||||||
JOIN sys_user_sub s ON f.user_id = s.id
|
JOIN sys_user_sub s ON f.user_id = s.id
|
||||||
WHERE s.user_type != 0 and f.face_status = 1
|
WHERE f.face_status = 1
|
||||||
and f.del_flag = 0
|
and f.del_flag = 0
|
||||||
and s.del_flag = 0
|
and s.del_flag = 0
|
||||||
and f.face_feature_data is not null
|
and f.face_feature_data is not null
|
||||||
|
|||||||
Reference in New Issue
Block a user