Commit b6973d10 authored by fangxinjiang's avatar fangxinjiang

节假日配置表及社保医疗截止配置表调整

parent a58b8929
...@@ -288,7 +288,9 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI ...@@ -288,7 +288,9 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
} }
} }
TSocialDeadlineInfo save; TSocialDeadlineInfo save;
LambdaQueryWrapper<TSocialDeadlineInfo> queryWrapper;
for (TSocialDeadlineInfo sd:baseLists){ for (TSocialDeadlineInfo sd:baseLists){
queryWrapper= null;
save = new TSocialDeadlineInfo(); save = new TSocialDeadlineInfo();
BeanUtil.copyProperties(sd,save); BeanUtil.copyProperties(sd,save);
save.setId(null); save.setId(null);
...@@ -296,6 +298,10 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI ...@@ -296,6 +298,10 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
save.setType(CommonConstants.ZERO_STRING); save.setType(CommonConstants.ZERO_STRING);
initSocialEndDate(holidayMap, save); initSocialEndDate(holidayMap, save);
initMedicalEndDate(holidayMap, save); initMedicalEndDate(holidayMap, save);
queryWrapper = initCountQuery(save,queryWrapper);
if (baseMapper.selectCount(queryWrapper) > 0){
continue;
}
saveList.add(save); saveList.add(save);
} }
if (Common.isNotNull(saveList)){ if (Common.isNotNull(saveList)){
...@@ -303,6 +309,24 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI ...@@ -303,6 +309,24 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
} }
} }
} }
private LambdaQueryWrapper<TSocialDeadlineInfo> initCountQuery(TSocialDeadlineInfo save,LambdaQueryWrapper<TSocialDeadlineInfo> queryWrapper) {
queryWrapper = Wrappers.lambdaQuery();
queryWrapper.eq(TSocialDeadlineInfo::getMonth, save.getMonth());
queryWrapper.eq(TSocialDeadlineInfo::getProvince, save.getProvince());
if (Common.isNotNull(save.getCity())){
queryWrapper.eq(TSocialDeadlineInfo::getCity, save.getCity());
if (Common.isNotNull(save.getTown())){
queryWrapper.eq(TSocialDeadlineInfo::getTown, save.getTown());
}else {
queryWrapper.isNull(TSocialDeadlineInfo::getTown);
}
}else {
queryWrapper.isNull(TSocialDeadlineInfo::getCity);
}
return queryWrapper;
}
@Transactional @Transactional
@Override @Override
public R<Boolean> updateByIdAsso(TSocialDeadlineInfo tSocialDeadlineInfo) { public R<Boolean> updateByIdAsso(TSocialDeadlineInfo tSocialDeadlineInfo) {
......
...@@ -120,5 +120,6 @@ ...@@ -120,5 +120,6 @@
1=1 1=1
<include refid="tSocialDeadlineInfo_where"/> <include refid="tSocialDeadlineInfo_where"/>
</where> </where>
order by a.month DESC
</select> </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