Commit 557995e9 authored by yangyang's avatar yangyang

fix(开通业务):作废

parent e3280b95
......@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
......@@ -195,12 +196,37 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
entity.setStatus(status);
entity.setStatusName(FlowStatusEnum.getNameByType(Long.parseLong(status)));
// region 更新其他的数据为已作废
if (String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()).equals(status)) {
discard(entity.getUnitCode(), entity.getSequenceNbr());
}
// endregion
this.updateById(entity);
if (rollBack) {
this.getBaseMapper().updatePromoter(entity.getSequenceNbr());
}
}
/**
* 完成的时候废弃其他的
*
*
* @param unitCode unitCode
* @param sequenceNbr sequenceNbr
* @return {@link Boolean}
* @author yangyang
* @throws
* @date 2023/12/22 09:23
*/
public Boolean discard(String unitCode, Long sequenceNbr) {
if (StringUtils.isBlank(unitCode) || sequenceNbr == null) {
return false;
}
UpdateWrapper<JyjcOpeningApplication> updateWrapper = new UpdateWrapper<>();
updateWrapper.set("status", FlowStatusEnum.TO_BE_DISCARD.getCode()).eq("unit_code", unitCode).ne("sequence_nbr", sequenceNbr);
return this.update(updateWrapper);
}
/**
* 分页查询
......
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