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