Merge pull request 'demand: TMS系统 - 员工提成方案配置 - 启用状态优化' (#133) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/133
This commit is contained in:
heyu 2025-07-28 16:18:29 +08:00
commit cb8b6c370b
2 changed files with 20 additions and 9 deletions

View File

@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.github.pagehelper.PageHelper;
import com.xdadan.erp.common.annotation.Log;
import com.xdadan.erp.common.core.controller.BaseController;
import com.xdadan.erp.common.core.domain.AjaxResult;
@ -54,8 +55,17 @@ public class EmisCommissionQuoteController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('emis:emisCommissionQuote:list')")
@GetMapping("/list")
public TableDataInfo list(EmisCommissionQuote emisCommissionQuote)
{
public TableDataInfo list(EmisCommissionQuote emisCommissionQuote) {
if ("2".equals(emisCommissionQuote.getBlOpen())) {
// blOpen=2: 启用且已过期,修改为查询启用状态且结束日期早于当前日期
emisCommissionQuote.setBlOpen("1");
emisCommissionQuote.getParams().put("endDateBeforeNow", true);
} else if ("3".equals(emisCommissionQuote.getBlOpen())) {
// blOpen=3: 启用且未过期,修改为查询启用状态且结束日期晚于等于当前日期
emisCommissionQuote.setBlOpen("1");
emisCommissionQuote.getParams().put("endDateAfterNow", true);
}
startPage();
List<EmisCommissionQuote> list = emisCommissionQuoteService.selectEmisCommissionQuoteList(emisCommissionQuote);
return getDataTable(list);

View File

@ -60,17 +60,16 @@
<if test="calcWeightType != null and calcWeightType != ''"> and calc_weight_type=#{calcWeightType}</if>
<if test="postType != null and postType != ''"> and post_type=#{postType}</if>
<if test="transType != null and transType != ''"> and ( FIND_IN_SET(#{transType},trans_type) )</if>
<!-- blOpen=2: 启用且已过期,blOpen=3: 启用且未过期,其他按原逻辑 -->
<if test="blOpen == '2'">
and bl_open = '1'
<if test="blOpen != null and blOpen != ''">
and bl_open = #{blOpen}
</if>
<!-- 处理blOpen=2/3的特殊逻辑 -->
<if test="params.endDateBeforeNow != null and params.endDateBeforeNow == true">
and end_date &lt; NOW()
</if>
<if test="blOpen == '3'">
and bl_open = '1'
<if test="params.endDateAfterNow != null and params.endDateAfterNow == true">
and end_date &gt;= NOW()
</if>
<if test="blOpen != null and blOpen != '' and blOpen != '2' and blOpen != '3'">
and bl_open=#{blOpen}</if>
<if test="empCode != null and empCode != ''"> and ( FIND_IN_SET(#{empCode},emp_code) or emp_code='-1')</if>
<if test="empName != null and empName != ''"> and ( FIND_IN_SET(#{empName},emp_name) or emp_name='全部') </if>
@ -88,6 +87,8 @@
order by create_time desc
</select>
<select id="selectValidQuoteList" parameterType="EmisCommissionQuote" resultMap="EmisCommissionQuoteResult">
<include refid="selectEmisCommissionQuoteVo"/>
<where>