Commit 3426385d by huluobin

update

parent d32a6cde
......@@ -8,7 +8,6 @@ import com.blt.other.common.util.SessionUtils;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
......@@ -28,7 +27,7 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
.stream()
.filter(item -> item.contains("BailunToken"))
.findAny()
.map(item -> item.replaceAll("BailunToken=", ""))
.map(item -> item.replaceAll("BailunToken=", "").trim())
.orElseThrow(() -> new BizRuntimeException("400", "请先登陆"));
SysUser sysUser = JwtUtil.validateToken(token);
......@@ -36,7 +35,7 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
} catch (Exception ex) {
String activeProfile = SpringContextUtil.getString("spring.profiles.active");
if (activeProfile.equals("test")) {
if (!activeProfile.equals("prod")) {
SysUser sysUser = new SysUser();
sysUser.setOaUserId(0);
sysUser.setUserName("sys");
......
......@@ -65,6 +65,9 @@ public class OaDepartment implements Serializable {
private String createUserName;
@ApiModelProperty("部门全名")
private String fullName;
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime createTime;
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
......
......@@ -60,7 +60,6 @@ public class OaDepartmentServiceImpl extends ServiceImpl<OaDepartmentMapper, OaD
.eq(CostReviewer::getType, CostReviewer.departmentReviewer)
.eq(CostReviewer::getReferId, oaDepartmentId));
//新增审核人
departmentReviewerUserIds.forEach(departmentReviewerUserId -> {
//新增审核人
......
......@@ -57,6 +57,11 @@ public class CostDomain implements Serializable {
private String costNo;
@ApiModelProperty("费用计划编号")
private String costPlanNo;
@ApiModelProperty("当前部门id")
private Integer costDepartmentId;
@ApiModelProperty("主体编号")
private String companyNo;
@ApiModelProperty("主体名称")
......
......@@ -90,10 +90,9 @@ public class DepartmentCheckState extends CostState {
//人工审核
OaUser costUser = oaUserMapper.selectByOaUserId(costDomain.getCreateUserid());
if (costContext.currentUserId != null) {
//人工审核通过
if (!costCurrentReviewerService.canAudit(currentUserId, costDomain.getCostNo())) {
if (costCurrentReviewerService.canAudit(currentUserId, costDomain.getCostNo())) {
costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain);
......
......@@ -2,13 +2,13 @@ package com.blt.other.module.cost.service.impl.costcheck;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.blt.other.common.exception.BizRuntimeException;
import com.blt.other.module.sys.model.CostReviewer;
import com.blt.other.database.model.CostCompanyDomain;
import com.blt.other.database.model.CostLogDomain;
import com.blt.other.module.auth.service.IOaUserService;
import com.blt.other.module.cost.dao.CostCompanyDao;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.model.CostTemplate;
import com.blt.other.database.model.CostCompanyDomain;
import com.blt.other.database.model.CostLogDomain;
import com.blt.other.module.sys.model.CostReviewer;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
......@@ -71,10 +71,9 @@ public class FinancialCheckState extends CostState {
}
CostCompanyDomain costCompany = costCompanyDao.selectByNo(costDomain.getCompanyNo());
if (costContext.currentUserId != null) {
//人工审核通过
if (!costCurrentReviewerService.canAudit(currentUserId, costDomain.getCostNo())) {
if (costCurrentReviewerService.canAudit(currentUserId, costDomain.getCostNo())) {
costDomain.setCostStatus(CostDomain.STATUS_FINAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain);
......
......@@ -67,7 +67,7 @@ public class HrCheckState extends CostState {
//人工审核
if (costContext.currentUserId != null) {
//人工审核通过
if (!costCurrentReviewerService.canAudit(currentUserId, costDomain.getCostNo())) {
if (costCurrentReviewerService.canAudit(currentUserId, costDomain.getCostNo())) {
costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain);
......
......@@ -38,22 +38,26 @@ logging:
#项目参数配置
cost:
url:
purchase-apply-callback-url-post: http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post: http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post: http://api.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post: http://api.fee.bailuntec.com/purchase/other/cost/check/CashierCallbackUrl
# fee
purchase-apply-callback-url-post: http://api.test.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post: http://api.test.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post: http://api.test.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post: http://api.test.fee.bailuntec.com/purchase/other/cost/check/CashierCallbackUrl
# oa
buy-user-api: http://oa.bailuntec.com/Api/User/GetUser
login-user-api: http://oa.bailuntec.com/Login/GetUserByBLUserAcct
get-exchange-rate-api: http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-department-list-api: http://oa.bailuntec.com/api/User/GetDeparmentList
# cw
post-company-list-api: http://cw.bailuntec.com/API/API/GetCompanyMainBody
post-apply-api: http://cw.bailuntec.com/API/API/Apply
post-company-list-finance-api: http://cw.bailuntec.com/API/API/GetBankAccount
get-exchange-rate-api: http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-consumables-api: http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api: http://cw.bailuntec.com/API/API/GetCashierAnnex
# supplier
get-supplier-page-list-api: http://supplier.bailuntec.com/Api/GetSupplierPageList
get-all-logistics-finance-api: http://supplier.bailuntec.com/Api/GetLogisticsSupplier
get-all-sub-logistics-finance-api: http://supplier.bailuntec.com/Api/GetSubLogisticsSupplier
get-consumables-api: http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api: http://cw.bailuntec.com/API/API/GetCashierAnnex
fee-domain: bailuntec.com
# servlet 容器配置
......
......@@ -43,22 +43,26 @@ logging:
#项目参数配置
cost:
url:
purchase-apply-callback-url-post: http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post: http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post: http://api.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post: http://api.fee.bailuntec.com/purchase/other/cost/check/CashierCallbackUrl
# fee
purchase-apply-callback-url-post: http://api.test.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post: http://api.test.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post: http://api.test.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post: http://api.test.fee.bailuntec.com/purchase/other/cost/check/CashierCallbackUrl
# oa
buy-user-api: http://oa.bailuntec.com/Api/User/GetUser
login-user-api: http://oa.bailuntec.com/Login/GetUserByBLUserAcct
get-exchange-rate-api: http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-department-list-api: http://oa.bailuntec.com/api/User/GetDeparmentList
# cw
post-company-list-api: http://cw.bailuntec.com/API/API/GetCompanyMainBody
post-apply-api: http://cw.bailuntec.com/API/API/Apply
post-company-list-finance-api: http://cw.bailuntec.com/API/API/GetBankAccount
get-exchange-rate-api: http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-consumables-api: http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api: http://cw.bailuntec.com/API/API/GetCashierAnnex
# supplier
get-supplier-page-list-api: http://supplier.bailuntec.com/Api/GetSupplierPageList
get-all-logistics-finance-api: http://supplier.bailuntec.com/Api/GetLogisticsSupplier
get-all-sub-logistics-finance-api: http://supplier.bailuntec.com/Api/GetSubLogisticsSupplier
get-consumables-api: http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api: http://cw.bailuntec.com/API/API/GetCashierAnnex
fee-domain: bailuntec.com
# servlet 容器配置
......
......@@ -501,7 +501,7 @@
<select id="departmentAutoCheckLllCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type = 2 and t2.update_userid = #{userid.oaUserId}
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type = 2 and t2.update_userid = #{req.userid}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
......
......@@ -42,6 +42,7 @@
t2.name company_name
from oa_department t1
left join oa_company t2 on t1.company_id = t2.oa_company_id
order by t2.id, t1.id
</select>
<select id="selectByName" resultType="com.blt.other.module.auth.model.OaDepartment">
select *
......
......@@ -4,9 +4,12 @@
<select id="departmentReviewerList"
resultType="com.blt.other.module.sys.dto.response.DepartmentReviewerListItem">
select t1.*
select t1.*,
t4.name company_name
from department_reviewer t1
left join cost_reviewer t2 on t1.id = t2.refer_id
left join oa_department t3 on t1.primary_department_id =t3.department_id
left join oa_company t4 on t3.company_id = t4.oa_company_id
where true
<if test="req.reviewerUserId !=null">
and t2.reviewer_user_id =#{req.reviewerUserId}
......
......@@ -9,7 +9,6 @@ import com.blt.other.module.auth.model.OaDepartment;
import com.blt.other.module.auth.model.OaUser;
import com.blt.other.module.auth.service.IOaDepartmentService;
import com.blt.other.module.auth.service.IOaUserService;
import com.blt.other.module.cost.service.impl.costcheck.DepartmentCheckState;
import com.blt.other.module.sys.dao.CostReviewerMapper;
import com.blt.other.module.sys.dao.DepartmentReviewerMapper;
import com.blt.other.module.sys.model.CostReviewer;
......@@ -88,7 +87,7 @@ public class OtherApplicationTests {
});
}
@Rollback
@Rollback(value = false)
@Test
public void syncOa() {
List<OaUserResp> oaUserRespList = oaApi.getAllUser();
......@@ -117,7 +116,7 @@ public class OtherApplicationTests {
oaDepartment.setSort(oaDepartmentResp.getSort());
oaDepartment.setParentId(oaDepartmentResp.getParentId());
oaDepartment.setDepartmentId(oaDepartmentResp.getDepartmentId());
oaDepartment.setFullName(oaDepartmentResp.getFullName());
return oaDepartment;
})
.collect(Collectors.toList());
......@@ -136,6 +135,9 @@ public class OtherApplicationTests {
if (oaDepartmentMapper.selectByDepartmentId(oaDepartment.getDepartmentId()) == null) {
oaDepartment.setUpdateUserId(0);
oaDepartmentService.save(oaDepartment);
} else {
oaDepartmentService.update(oaDepartment, new LambdaQueryWrapper<OaDepartment>()
.eq(OaDepartment::getDepartmentId, oaDepartment.getDepartmentId()));
}
});
......
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