Browse Source

feat:协议类费用释放和取消释放关联OA系统

muti_db
Yen 12 months ago
parent
commit
7aff57ff91
  1. 3
      src/main/java/com/qs/serve/modules/bms/controller/BmsSupplierController.java
  2. 3
      src/main/java/com/qs/serve/modules/goods/entity/GoodsSpu.java
  3. 2
      src/main/java/com/qs/serve/modules/tbs/common/TbsSeeYonConst.java
  4. 2
      src/main/java/com/qs/serve/modules/tbs/service/impl/TbsBudgetManagerServiceImpl.java
  5. 3
      src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostApplyServiceImpl.java
  6. 24
      src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java
  7. 12
      src/main/resources/mapper/goods/GoodsSpuMapper.xml

3
src/main/java/com/qs/serve/modules/bms/controller/BmsSupplierController.java

@ -41,6 +41,7 @@ import com.qs.serve.modules.tbs.service.TbsBudgetService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -78,6 +79,8 @@ public class BmsSupplierController {
private SysAttachService attachService; private SysAttachService attachService;
private BirBudgetTargetService birBudgetTargetService; private BirBudgetTargetService birBudgetTargetService;
private BmsSupplierMapper supplierMapper;
@GetMapping("/queryList") @GetMapping("/queryList")
public R<PageVo<BmsSupplier>> getQueryList(BmsSupplier param){ public R<PageVo<BmsSupplier>> getQueryList(BmsSupplier param){

3
src/main/java/com/qs/serve/modules/goods/entity/GoodsSpu.java

@ -235,6 +235,9 @@ public class GoodsSpu implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String keyword; private String keyword;
@TableField(exist = false)
private String spuCodeOrName;
@TableField(exist = false) @TableField(exist = false)
private String keywordName; private String keywordName;

2
src/main/java/com/qs/serve/modules/tbs/common/TbsSeeYonConst.java

@ -77,6 +77,8 @@ public interface TbsSeeYonConst {
String API_TEST = "/testConnection"; String API_TEST = "/testConnection";
String API_PROCESS_CREATE = "/process/create"; String API_PROCESS_CREATE = "/process/create";
String API_CONTRACT_RELEASE_CANCEL = "/process/cancelReleaseContractApply";
String API_CONTRACT_RELEASE = "/process/releaseContractApply";
String API_PROCESS_GET_CONST = "/process/getConst"; String API_PROCESS_GET_CONST = "/process/getConst";
String API_PROCESS_CREATE_NEW = "/process/newCreate"; String API_PROCESS_CREATE_NEW = "/process/newCreate";
String API_PROCESS_CREATE_CALLBACK = "/process/createCallback"; String API_PROCESS_CREATE_CALLBACK = "/process/createCallback";

2
src/main/java/com/qs/serve/modules/tbs/service/impl/TbsBudgetManagerServiceImpl.java

@ -105,7 +105,7 @@ public class TbsBudgetManagerServiceImpl implements TbsBudgetManagerService {
//判断成本中心 //判断成本中心
List<TbsActivityCenter> centerList = centerListMap.get(activityId); List<TbsActivityCenter> centerList = centerListMap.get(activityId);
for (TbsActivityCenter center : centerList) { for (TbsActivityCenter center : centerList) {
if(!center.getCenterType().equals(budget.getCenterType())||center.getCenterId().equals(budget.getCenterId())){ if(!center.getCenterType().equals(budget.getCenterType())||!center.getCenterId().equals(budget.getCenterId())){
String msg = "无法匹配成本中心["+center.getCenterCode()+"]"+center.getCenterName(); String msg = "无法匹配成本中心["+center.getCenterCode()+"]"+center.getCenterName();
msgVoList.add(new TbsBudgetMatchMsgVo(budget,activity,msg)); msgVoList.add(new TbsBudgetMatchMsgVo(budget,activity,msg));
} }

3
src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostApplyServiceImpl.java

@ -933,6 +933,9 @@ public class TbsCostApplyServiceImpl extends ServiceImpl<TbsCostApplyMapper,TbsC
List<TbsActivityPayCondition> payConditions, BmsSupplier supplier, SysUser sysUser, List<TbsActivityPayCondition> payConditions, BmsSupplier supplier, SysUser sysUser,
Map<String, Object> data,List<TbsCostContract> contracts, Map<String, Object> data,List<TbsCostContract> contracts,
List<TbsCostTodo> costTodoList ,Map<String, Object> newWayData) { List<TbsCostTodo> costTodoList ,Map<String, Object> newWayData) {
/**
* 重要exsp3 已用在OA系统中标记是否释放拦截
*/
data.put("title", tbsCostApply.getChargeTheme()); data.put("title", tbsCostApply.getChargeTheme());
data.put("orgId", tbsCostApply.getId().toString()); data.put("orgId", tbsCostApply.getId().toString());
data.put("costApplyCode", tbsCostApply.getCode()); data.put("costApplyCode", tbsCostApply.getCode());

24
src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java

@ -31,6 +31,7 @@ import com.qs.serve.modules.seeyon.entity.BaseCreateCallbackBo;
import com.qs.serve.modules.seeyon.entity.BaseCreateProcessBo; import com.qs.serve.modules.seeyon.entity.BaseCreateProcessBo;
import com.qs.serve.modules.seeyon.service.SeeYonRequestService; import com.qs.serve.modules.seeyon.service.SeeYonRequestService;
import com.qs.serve.modules.seeyon.service.XiaoLuTonService; import com.qs.serve.modules.seeyon.service.XiaoLuTonService;
import com.qs.serve.modules.seeyon.service.impl.SeeYonRequestBaseService;
import com.qs.serve.modules.sys.entity.SysSyncLog; import com.qs.serve.modules.sys.entity.SysSyncLog;
import com.qs.serve.modules.sys.entity.SysUser; import com.qs.serve.modules.sys.entity.SysUser;
import com.qs.serve.modules.sys.service.SysSyncLogService; import com.qs.serve.modules.sys.service.SysSyncLogService;
@ -107,6 +108,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
private final BirCenterRateService centerRateService; private final BirCenterRateService centerRateService;
private final SysSyncLogService sysSyncLogService; private final SysSyncLogService sysSyncLogService;
private final SeeYonRequestBaseService seeYonRequestBaseService;
private final ProjectApisProperties projectApisProperties; private final ProjectApisProperties projectApisProperties;
private final RedisService redisService; private final RedisService redisService;
@ -496,6 +498,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
Assert.throwEx("异动的活动,无法操作"); Assert.throwEx("异动的活动,无法操作");
} }
TbsCostApply costApply = costApplyService.getById(activity.getCostApplyId()); TbsCostApply costApply = costApplyService.getById(activity.getCostApplyId());
if(ReleaseConst.UseFilter){ if(ReleaseConst.UseFilter){
if(!costApply.getChargeState().equals(TbsCostApplyState.State_2_actioning.getCode())){ if(!costApply.getChargeState().equals(TbsCostApplyState.State_2_actioning.getCode())){
Assert.throwEx("状态不支持释放活动费用"); Assert.throwEx("状态不支持释放活动费用");
@ -597,6 +600,15 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
activityPayConditionService.update(payCondition,updLqw); activityPayConditionService.update(payCondition,updLqw);
//如果为最后的活动,更变费用申请状态 //如果为最后的活动,更变费用申请状态
costApplyService.flushCostStatus(costApply.getId(),costApply.getContractFlag()!=null&&costApply.getContractFlag().equals(1)); costApplyService.flushCostStatus(costApply.getId(),costApply.getContractFlag()!=null&&costApply.getContractFlag().equals(1));
// 协议类申请请求OA取消释放拦截
if(costApply.getContractFlag().equals(1)){
R<String> result = seeYonRequestBaseService.postBase(TbsSeeYonConst.API_CONTRACT_RELEASE
+"?id="+costApply.getId()
+"&code="+costApply.getCode(),null,"协议类申请取消释放");
if(result==null||result.getStatus()==null||result.getStatus()!=200){
Assert.throwEx("协议类取消释放时,调用OA失败");
}
}
BirActivityCenterGoodsUtil.buildBir(costApply.getId()); BirActivityCenterGoodsUtil.buildBir(costApply.getId());
} }
@ -613,6 +625,17 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
if(activity.getCancelFlag().equals(1)){ if(activity.getCancelFlag().equals(1)){
Assert.throwEx("异动的活动,无法操作"); Assert.throwEx("异动的活动,无法操作");
} }
TbsCostApply costApply = costApplyService.getById(activity.getCostApplyId());
// 协议类申请请求OA取消释放拦截
if(costApply.getContractFlag().equals(1)){
R<String> result = seeYonRequestBaseService.postBase(TbsSeeYonConst.API_CONTRACT_RELEASE_CANCEL
+ "?id="+costApply.getId()
+ "&code="+costApply.getCode()
,null,"协议类申请取消释放");
if(result==null||result.getStatus()==null||result.getStatus()!=200){
Assert.throwEx("协议类取消释放时,调用OA失败");
}
}
if(activity.getReleaseFlag().equals(1)){ if(activity.getReleaseFlag().equals(1)){
//还原活动状态 //还原活动状态
TbsActivity param = new TbsActivity(); TbsActivity param = new TbsActivity();
@ -627,7 +650,6 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe
activityService.updateById(param); activityService.updateById(param);
//还原费用申请状态 //还原费用申请状态
TbsCostApply costApply = new TbsCostApply();
costApply.setId(activity.getCostApplyId()); costApply.setId(activity.getCostApplyId());
costApply.setChargeState(TbsCostApplyState.State_2_actioning.getCode()); costApply.setChargeState(TbsCostApplyState.State_2_actioning.getCode());
costApplyService.updateById(costApply); costApplyService.updateById(costApply);

12
src/main/resources/mapper/goods/GoodsSpuMapper.xml

@ -346,6 +346,12 @@
`spu`.`spu_code` like concat('%', #{query.keyword},'%') `spu`.`spu_code` like concat('%', #{query.keyword},'%')
) )
</if> </if>
<if test="query.spuCodeOrName != null and query.spuCodeOrName != '' ">
and (
`spu`.`name` like concat('%', #{query.spuCodeOrName},'%') or
`spu`.`spu_code` like concat('%', #{query.spuCodeOrName},'%')
)
</if>
<if test="query.keywordCode != null and query.keywordCode != '' "> <if test="query.keywordCode != null and query.keywordCode != '' ">
and ( and (
`sku`.`sku_code` like concat('%', #{query.keywordCode},'%') or `sku`.`sku_code` like concat('%', #{query.keywordCode},'%') or
@ -374,6 +380,12 @@
`spu`.`spu_code` like concat('%', #{query.keyword},'%') `spu`.`spu_code` like concat('%', #{query.keyword},'%')
) )
</if> </if>
<if test="query.spuCodeOrName != null and query.spuCodeOrName != '' ">
and (
`spu`.`name` like concat('%', #{query.spuCodeOrName},'%') or
`spu`.`spu_code` like concat('%', #{query.spuCodeOrName},'%')
)
</if>
<if test="query.keywordCode != null and query.keywordCode != '' "> <if test="query.keywordCode != null and query.keywordCode != '' ">
and ( and (
`sku`.`sku_code` like concat('%', #{query.keywordCode},'%') or `sku`.`sku_code` like concat('%', #{query.keywordCode},'%') or

Loading…
Cancel
Save