Commit 16c71355 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.5' into MVP1.5

parents 43349642 63c4a0e2
...@@ -62,4 +62,13 @@ public interface SysBaseSetInfoMapper extends BaseMapper<SysBaseSetInfo> { ...@@ -62,4 +62,13 @@ public interface SysBaseSetInfoMapper extends BaseMapper<SysBaseSetInfo> {
* @return * @return
**/ **/
List<SysBaseSetInfo> getFundBaseSet(@Param("fundHolds")List<String> fundHolds); List<SysBaseSetInfo> getFundBaseSet(@Param("fundHolds")List<String> fundHolds);
/**
* @param sysBaseSetInfo
* @Description: 编辑时查询有没有已存在的配置
* @Author: hgw
* @Date: 2023/2/15 18:15
* @return: int
**/
int getCountByEdit(@Param("sysBaseSetInfo") SysBaseSetInfo sysBaseSetInfo);
} }
...@@ -161,52 +161,11 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -161,52 +161,11 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
List<SysPayProportion> payProportionList = sysPayProportionService.getSysPayProportionByBaseId(sysBaseSetInfo.getId()); List<SysPayProportion> payProportionList = sysPayProportionService.getSysPayProportionByBaseId(sysBaseSetInfo.getId());
old.setFundProList(payProportionList); old.setFundProList(payProportionList);
} }
SysBaseSetInfo baseSetInfo = null; // 2023-2-16 09:38:24 晨会上产品经理倩倩确认,编辑时,时间日期不可编辑。
// where (b.apply_start_date < '2023-01' and ( b.apply_end_date > '2023-01' or b.apply_end_date is null) ) or b.apply_start_date > '2023-01' /*int count = baseMapper.getCountByEdit(sysBaseSetInfo)
if (null != sysBaseSetInfo.getTown()) { if count > CommonConstants.ZERO_INT)
baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda() return R.failed("对应户、地市、有效期的基数配置已存在!")
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType()) */
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getTown, sysBaseSetInfo.getTown())
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT)
.and(obj -> obj
.ge(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysBaseSetInfo.getCity() && null == sysBaseSetInfo.getTown()) {
baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getCity, sysBaseSetInfo.getCity())
.isNull(SysBaseSetInfo::getTown)
.and(obj -> obj
.ge(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysBaseSetInfo.getProvince() && null == sysBaseSetInfo.getCity()) {
baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getProvince, sysBaseSetInfo.getProvince())
.isNull(SysBaseSetInfo::getCity)
.and(obj -> obj
.ge(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != baseSetInfo) {
return R.failed("对应户、地市、有效期的基数配置已存在!");
}
this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo, old); this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo, old);
int type = CommonConstants.ONE_INT; int type = CommonConstants.ONE_INT;
......
...@@ -3252,12 +3252,25 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3252,12 +3252,25 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if ((changeDeptVo.getShebao() != null && !changeDeptVo.getShebao().isEmpty()) if ((changeDeptVo.getShebao() != null && !changeDeptVo.getShebao().isEmpty())
|| (changeDeptVo.getGongjijin() != null && !changeDeptVo.getGongjijin().isEmpty())) { || (changeDeptVo.getGongjijin() != null && !changeDeptVo.getGongjijin().isEmpty())) {
idSet = new HashSet<>(); idSet = new HashSet<>();
TPaymentSocialPush socialPush;
if (changeDeptVo.getShebao() != null && !changeDeptVo.getShebao().isEmpty()) { if (changeDeptVo.getShebao() != null && !changeDeptVo.getShebao().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getShebao()) { for (ChangeDeptDetailVo vo : changeDeptVo.getShebao()) {
socialPush = pushMapper.selectById(vo.getId());
//根据明细id更新结算状态
if (null != socialPush) {
List<String> idStr = Common.initStrToList(socialPush.getPaymentIds().replaceAll("'",""),",");
if (null != idStr) {
idSet.addAll(idStr);
for (String s :idStr) {
socialId.append(s).append(CommonConstants.DUNHAO_STRING);
}
}
} else {
idSet.add(vo.getId()); idSet.add(vo.getId());
socialId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING); socialId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
} }
} }
}
if (changeDeptVo.getGongjijin() != null && !changeDeptVo.getGongjijin().isEmpty()) { if (changeDeptVo.getGongjijin() != null && !changeDeptVo.getGongjijin().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getGongjijin()) { for (ChangeDeptDetailVo vo : changeDeptVo.getGongjijin()) {
idSet.add(vo.getId()); idSet.add(vo.getId());
......
...@@ -387,4 +387,55 @@ ...@@ -387,4 +387,55 @@
</where> </where>
ORDER BY a.apply_start_date desc ORDER BY a.apply_start_date desc
</select> </select>
<!-- 获取条数-->
<select id="getCountByEdit" resultType="java.lang.Integer">
SELECT
count(1)
FROM sys_base_set_info a
<where>
a.STATUS = 0 and a.ID != #{sysBaseSetInfo.id}
<if test="sysBaseSetInfo.baseType != null and sysBaseSetInfo.baseType.trim() != ''">
AND a.BASE_TYPE = #{sysBaseSetInfo.baseType}
</if>
<if test="sysBaseSetInfo.departId != null and sysBaseSetInfo.departId.trim() != ''">
AND a.DEPART_ID = #{sysBaseSetInfo.departId}
</if>
<if test="sysBaseSetInfo.province != null">
AND a.PROVINCE = #{sysBaseSetInfo.province}
</if>
<if test="sysBaseSetInfo.city != null">
AND a.CITY = #{sysBaseSetInfo.city}
</if>
<if test="sysBaseSetInfo.city == null">
AND a.CITY is null
</if>
<if test="sysBaseSetInfo.town != null">
AND a.TOWN = #{sysBaseSetInfo.town}
</if>
<if test="sysBaseSetInfo.town == null">
AND a.TOWN is null
</if>
<if test="sysBaseSetInfo.applyEndDate == null">
AND a.APPLY_END_DATE <![CDATA[ >= ]]> #{sysBaseSetInfo.applyStartDate}
</if>
<if test="sysBaseSetInfo.applyEndDate != null">
AND (
(apply_end_date is not null and (
(
apply_start_date <![CDATA[ <= ]]> #{sysBaseSetInfo.applyEndDate}
and apply_end_date >= #{sysBaseSetInfo.applyEndDate}
) or (
apply_start_date <![CDATA[ <= ]]> #{sysBaseSetInfo.applyStartDate}
and apply_end_date >= #{sysBaseSetInfo.applyStartDate}
) or (
apply_start_date >= #{sysBaseSetInfo.applyStartDate}
and apply_end_date <![CDATA[ <= ]]> #{sysBaseSetInfo.applyEndDate}
)
)) or (apply_end_date is null and apply_start_date <![CDATA[ <= ]]> #{sysBaseSetInfo.applyEndDate})
)
</if>
</where>
limit 1
</select>
</mapper> </mapper>
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