Commit c05747d1 by lizefeng

smart enjoy home goods limited 支持鹏哥审核

parent c9a58952
...@@ -83,7 +83,11 @@ public class GeneralManagerCheckState extends CostState { ...@@ -83,7 +83,11 @@ public class GeneralManagerCheckState extends CostState {
} }
if (currentUserId != null) { if (currentUserId != null) {
//目前限定铭哥能审核或者主体是啫啫煲鹏哥能审核 //目前限定铭哥能审核或者主体是啫啫煲鹏哥能审核
if (currentUserId == 681 || ("啫啫煲".equals(costDomain.getCompanyName()) && currentUserId == 720) || ("广州猫哥饮食文化传播有限公司".equals(costDomain.getCompanyName()) && currentUserId == 5126)) { if (currentUserId == 681
|| ("啫啫煲".equals(costDomain.getCompanyName()) && currentUserId == 720)
|| ("smart enjoy home goods limited".equals(costDomain.getCompanyName()) && currentUserId == 720)
|| ("广州猫哥饮食文化传播有限公司".equals(costDomain.getCompanyName()) && currentUserId == 5126)
) {
//大于等于5需要铭哥审批 //大于等于5需要铭哥审批
if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) >= 0 || ("啫啫煲".equals(costDomain.getCompanyName()) && costDomain.getAmountRmb().compareTo(new BigDecimal("1000")) >= 0)) { if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) >= 0 || ("啫啫煲".equals(costDomain.getCompanyName()) && costDomain.getAmountRmb().compareTo(new BigDecimal("1000")) >= 0)) {
costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK); costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK);
...@@ -121,7 +125,11 @@ public class GeneralManagerCheckState extends CostState { ...@@ -121,7 +125,11 @@ public class GeneralManagerCheckState extends CostState {
} }
//人工审核拒绝 //人工审核拒绝
if (currentUserId == 681 || currentUserId == 4828 || ("啫啫煲".equals(costDomain.getCompanyName()) && currentUserId == 720) || ("广州猫哥饮食文化传播有限公司".equals(costDomain.getCompanyName()) && currentUserId == 5126)) { if (currentUserId == 681
|| currentUserId == 4828
|| ("啫啫煲".equals(costDomain.getCompanyName()) && currentUserId == 720)
|| ("广州猫哥饮食文化传播有限公司".equals(costDomain.getCompanyName()) && currentUserId == 5126)
) {
ApprovalHistoryDomain approvalHistoryDomain = ApprovalHistoryDomain.builder() ApprovalHistoryDomain approvalHistoryDomain = ApprovalHistoryDomain.builder()
.approvalUserId(currentUserId) .approvalUserId(currentUserId)
.approvalTime(LocalDateTime.now()) .approvalTime(LocalDateTime.now())
......
-- 根据参数 {"currentUserId":844,"key":"HZJ202512160010","pageNum":1,"pageSize":50} 生成的实际SQL语句
SELECT
t1.*,
group_concat(distinct t2.username) as cost_current_reviewer
FROM cost t1
LEFT JOIN cost_current_reviewer t2 ON t1.cost_no = t2.cost_no
-- 因为currentUserId不为null,所以添加用户权限关联查询
LEFT JOIN (
SELECT * FROM (
SELECT t3.oa_user_id, cc.company_no
FROM bailun_other.oa_user t3
LEFT JOIN user_role_binding urb ON t3.oa_user_id = urb.oa_user_id
LEFT JOIN role_cost_company_binding rccb ON urb.role_id = rccb.role_id
LEFT JOIN cost_company cc ON rccb.cost_company_id = cc.`id`
WHERE t3.oa_user_id = 844
) tt
GROUP BY company_no
) t ON t1.company_no = t.company_no
WHERE
TRUE
-- 添加currentUserId条件:只能查看自己创建的或有权限查看的公司的费用单
AND (t1.create_userid=844 OR t.company_no IS NOT NULL)
-- 因为key不为null,会被分割成keys列表,添加关键字搜索条件
AND (FALSE
OR t1.cost_plan_no = 'HZJ202512160010'
OR t1.cost_no LIKE CONCAT('%','HZJ202512160010','%')
OR t1.type_name LIKE CONCAT('%','HZJ202512160010','%')
OR t1.company_name LIKE CONCAT('%','HZJ202512160010','%')
OR t1.bank_card_user LIKE CONCAT('%','HZJ202512160010','%')
)
GROUP BY t1.id
ORDER BY t1.id DESC
-- 分页参数:pageNum=1, pageSize=50,MyBatis会自动添加LIMIT
LIMIT 0, 50;
\ No newline at end of file
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