新购通知

This commit is contained in:
itcast 2026-01-16 17:44:14 +08:00
parent a98c39a2df
commit e4789dd930
3 changed files with 15 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import javax.validation.constraints.NotNull;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.service.ITypeService;
import com.bonus.material.purchase.domain.dto.PurchaseNoticePersonDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -41,6 +42,9 @@ public class PurchaseNoticePersonController extends BaseController {
@Resource
private IPurchaseNoticePersonService purchaseNoticePersonService;
@Resource
private ITypeService typeService;
/**
* 查询新购短信通知人员列表
*/
@ -48,6 +52,8 @@ public class PurchaseNoticePersonController extends BaseController {
//@RequiresPermissions("purchase:person:notice")
@GetMapping("/list")
public TableDataInfo list(PurchaseNoticePerson purchaseNoticePerson) {
Long deptId = typeService.getUserDeptId();
purchaseNoticePerson.setCompanyId(deptId);
List<PurchaseNoticePerson> list = purchaseNoticePersonService.selectPurchaseNoticePersonList(purchaseNoticePerson);
return getDataTable(list);
}
@ -59,6 +65,8 @@ public class PurchaseNoticePersonController extends BaseController {
//@RequiresPermissions("purchase:person:notice")
@GetMapping("/listUnSelected")
public TableDataInfo listUnSelected(PurchaseNoticePerson purchaseNoticePerson) {
Long deptId = typeService.getUserDeptId();
purchaseNoticePerson.setCompanyId(deptId);
List<PurchaseNoticePerson> list = purchaseNoticePersonService.getUnSelectedUserList(purchaseNoticePerson);
return getDataTable(list);
}

View File

@ -55,4 +55,5 @@ public class PurchaseNoticePerson extends BaseEntity {
@ApiModelProperty("任务id")
private String taskId;
private Long companyId;
}

View File

@ -38,6 +38,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sys_dept d2 ON d1.parent_id = d2.dept_id
WHERE
u.STATUS = '0'
<if test="companyId != null ">
AND (d.dept_id = #{companyId} OR d1.dept_id = #{companyId} OR d2.dept_id = #{companyId})
</if>
<if test="userName != null and userName != ''">
AND pnp.user_name like concat('%', #{userName}, '%')
</if>
@ -72,6 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null and userName != ''">
AND u.nick_name like concat('%', #{userName}, '%')
</if>
<if test="companyId != null ">
AND (d.dept_id = #{companyId} OR d1.dept_id = #{companyId} OR d2.dept_id = #{companyId})
</if>
GROUP BY u.user_id
</select>