测试问题修复

This commit is contained in:
liux 2026-01-14 09:44:23 +08:00
parent 701ae14817
commit 03232682f8
5 changed files with 65 additions and 18 deletions

View File

@ -167,8 +167,8 @@ public class LeaseTaskController extends BaseController {
@ApiOperation(value = "领用发布查询") @ApiOperation(value = "领用发布查询")
@GetMapping("/getPublishList") @GetMapping("/getPublishList")
public AjaxResult getPublishList(LeaseApplyInfo leaseApplyInfo) { public AjaxResult getPublishList(LeaseApplyInfo leaseApplyInfo) {
/*Long deptId = typeService.getUserDeptId(); Long deptId = typeService.getUserDeptId();
leaseApplyInfo.setCompanyId(deptId);*/ leaseApplyInfo.setCompanyId(deptId);
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1); Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10); Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
try { try {

View File

@ -49,12 +49,18 @@ public class RepairAuditDetailsExport {
* 退料单位名称 * 退料单位名称
*/ */
@ApiModelProperty(value = "退料单位名称") @ApiModelProperty(value = "退料单位名称")
@Excel(name = "退料单位名称")
private String backUnit; private String backUnit;
/** /**
* 退料工程名称 * 退料工程名称
*/ */
@ApiModelProperty(value = "退料工程名称") @ApiModelProperty(value = "退料工程名称")
@Excel(name = "退料工程名称")
private String backPro; private String backPro;
@ApiModelProperty(value = "分公司")
@Excel(name = "分公司")
private String impUnitName;
/** /**
* 退料单号 * 退料单号
*/ */

View File

@ -190,4 +190,6 @@ public class SltInfoVo {
private Date actualEndDate; private Date actualEndDate;
private List<SltInfoVo> signUrlList; private List<SltInfoVo> signUrlList;
private Long companyId;
} }

View File

@ -21,6 +21,7 @@ import com.bonus.material.basic.mapper.BmAgreementInfoMapper;
import com.bonus.material.basic.mapper.BmConfigMapper; import com.bonus.material.basic.mapper.BmConfigMapper;
import com.bonus.material.common.domain.dto.SelectDto; import com.bonus.material.common.domain.dto.SelectDto;
import com.bonus.material.common.domain.vo.AgreementVo; import com.bonus.material.common.domain.vo.AgreementVo;
import com.bonus.material.ma.service.ITypeService;
import com.bonus.material.settlement.domain.SltAgreementApply; import com.bonus.material.settlement.domain.SltAgreementApply;
import com.bonus.material.settlement.domain.SltAgreementReduce; import com.bonus.material.settlement.domain.SltAgreementReduce;
import com.bonus.material.settlement.domain.SltAgreementRelation; import com.bonus.material.settlement.domain.SltAgreementRelation;
@ -92,6 +93,9 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
@Resource @Resource
private SltAgreementReduceMapper sltAgreementRecudceMapper; private SltAgreementReduceMapper sltAgreementRecudceMapper;
@Resource
private ITypeService typeService;
// 定义线程级缓存 // 定义线程级缓存
private static final ThreadLocal<List<SltAgreementInfo>> leaseListCache = new ThreadLocal<>(); private static final ThreadLocal<List<SltAgreementInfo>> leaseListCache = new ThreadLocal<>();
// 丢失结算列表缓存 // 丢失结算列表缓存
@ -709,6 +713,8 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int submitCosts(@NotNull(message = "结算信息不能为空") SltInfoVo sltInfoVo) { public int submitCosts(@NotNull(message = "结算信息不能为空") SltInfoVo sltInfoVo) {
Long deptId = typeService.getUserDeptId();
sltInfoVo.setCompanyId(deptId);
// 检查登录用户是否有结算权限 // 检查登录用户是否有结算权限
// int loginUserSettlementTypePermission = this.checkLoginUserHasSettlementPermission(); // int loginUserSettlementTypePermission = this.checkLoginUserHasSettlementPermission();
// sltInfoVo.setSettlementType(loginUserSettlementTypePermission); // sltInfoVo.setSettlementType(loginUserSettlementTypePermission);
@ -724,6 +730,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
UUID uuid = UUID.randomUUID(); UUID uuid = UUID.randomUUID();
String sltTask = uuid.toString(); String sltTask = uuid.toString();
String sltAuditor = null; String sltAuditor = null;
if(GlobalConstants.LONG_JJ == deptId){
if (sltInfoVo.getSettlementType() == null) { if (sltInfoVo.getSettlementType() == null) {
sltAuditor = "待张志峰,刘春杰审核"; sltAuditor = "待张志峰,刘春杰审核";
} else if (sltInfoVo.getSettlementType() == 1) { } else if (sltInfoVo.getSettlementType() == 1) {
@ -733,7 +740,11 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
}else{ }else{
sltAuditor = "待审核"; sltAuditor = "待审核";
} }
}else if(GlobalConstants.LONG_HY == deptId){
sltAuditor = "顾国强或王文斌审核";
}else{
sltAuditor = "待审核";
}
Long[] agreementIds = sltInfoVo.getAgreementIds(); Long[] agreementIds = sltInfoVo.getAgreementIds();
if (agreementIds != null && agreementIds.length > 0) { if (agreementIds != null && agreementIds.length > 0) {
Long agreementId = agreementIds[0]; Long agreementId = agreementIds[0];
@ -1140,7 +1151,8 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult costExamine(SltAgreementApply sltAgreementApply) { public AjaxResult costExamine(SltAgreementApply sltAgreementApply) {
Long deptId = typeService.getUserDeptId();
sltAgreementApply.setCompanyId(deptId);
if (Objects.isNull(sltAgreementApply) || Objects.isNull(sltAgreementApply.getStatus())) { if (Objects.isNull(sltAgreementApply) || Objects.isNull(sltAgreementApply.getStatus())) {
return AjaxResult.error("结算信息为空,请刷新后重试!"); return AjaxResult.error("结算信息为空,请刷新后重试!");
@ -1161,6 +1173,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
Integer checkSettlementType = checkSltPer.getSettlementType(); Integer checkSettlementType = checkSltPer.getSettlementType();
if(GlobalConstants.LONG_JJ == deptId){
if(checkSettlementType == 1 && "73".equals(userId)){ if(checkSettlementType == 1 && "73".equals(userId)){
sltSwitch = true; sltSwitch = true;
} }
@ -1168,6 +1181,16 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
if(checkSettlementType == 2 && "1549".equals(userId)){ if(checkSettlementType == 2 && "1549".equals(userId)){
sltSwitch = true; sltSwitch = true;
} }
}else if(GlobalConstants.LONG_HY == deptId){
//顾国强
if("193".equals(userId)){
sltSwitch = true;
}
//王文斌
if("124".equals(userId)){
sltSwitch = true;
}
}
if(sltSwitch){ if(sltSwitch){
if (Objects.equals(REVIEW_REJECT, sltAgreementApply.getStatus())) { if (Objects.equals(REVIEW_REJECT, sltAgreementApply.getStatus())) {

View File

@ -1820,10 +1820,18 @@
mt.type_name as typeName, mt.type_name as typeName,
SUM(rad.repair_num) as repairNum, SUM(rad.repair_num) as repairNum,
SUM(rad.repaired_num) as repairedNum, SUM(rad.repaired_num) as repairedNum,
SUM(rad.scrap_num) as scrapNum SUM(rad.scrap_num) as scrapNum,
bui.unit_name AS backUnit,
bpl.pro_name AS backPro,
sd.dept_name as impUnitName
FROM repair_audit_details rad FROM repair_audit_details rad
LEFT JOIN tm_task tt on tt.task_id = rad.task_id LEFT JOIN tm_task tt on tt.task_id = rad.task_id
LEFT JOIN tm_task tt2 ON tt2.task_id = rad.repair_id LEFT JOIN tm_task tt2 ON tt2.task_id = rad.repair_id
LEFT JOIN tm_task_agreement tta ON rad.repair_id = tta.task_id
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
LEFT JOIN bm_project bpl ON bai.project_id = bpl.pro_id
LEFT JOIN bm_unit bui ON bai.unit_id = bui.unit_id
left join sys_dept sd on sd.dept_id = bpl.imp_unit
LEFT JOIN ma_type mt ON rad.type_id = mt.type_id LEFT JOIN ma_type mt ON rad.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
<if test="userId != null"> <if test="userId != null">
@ -1862,10 +1870,18 @@
mt.type_name as typeName, mt.type_name as typeName,
SUM(rad.repair_num) as repairNum, SUM(rad.repair_num) as repairNum,
SUM(rad.repaired_num) as repairedNum, SUM(rad.repaired_num) as repairedNum,
SUM(rad.scrap_num) as scrapNum SUM(rad.scrap_num) as scrapNum,
bui.unit_name AS backUnit,
bpl.pro_name AS backPro,
sd.dept_name as impUnitName
FROM repair_audit_details rad FROM repair_audit_details rad
LEFT JOIN tm_task tt on tt.task_id = rad.task_id LEFT JOIN tm_task tt on tt.task_id = rad.task_id
LEFT JOIN tm_task tt2 ON tt2.task_id = tt.pre_task_id LEFT JOIN tm_task tt2 ON tt2.task_id = tt.pre_task_id
LEFT JOIN tm_task_agreement tta ON rad.repair_id = tta.task_id
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
LEFT JOIN bm_project bpl ON bai.project_id = bpl.pro_id
LEFT JOIN bm_unit bui ON bai.unit_id = bui.unit_id
left join sys_dept sd on sd.dept_id = bpl.imp_unit
LEFT JOIN ma_type mt ON rad.type_id = mt.type_id LEFT JOIN ma_type mt ON rad.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
<if test="userId != null"> <if test="userId != null">