新购任务--批量增加人员通知API
This commit is contained in:
parent
a542efc44d
commit
8093deda18
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.material.purchase.controller;
|
package com.bonus.material.purchase.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||||
|
|
@ -26,15 +27,15 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购短信通知人员Controller
|
* 新购短信通知人员Controller
|
||||||
*
|
*
|
||||||
* @author xsheng
|
* @author syruan
|
||||||
* @date 2024-10-16
|
|
||||||
*/
|
*/
|
||||||
@Api(tags = "新购短信通知人员接口")
|
@Api(tags = "新购短信通知人员接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/purchase_notice_person")
|
@RequestMapping("/purchase_notice_person")
|
||||||
public class PurchaseNoticePersonController extends BaseController {
|
public class PurchaseNoticePersonController extends BaseController {
|
||||||
@Autowired
|
|
||||||
|
@Resource
|
||||||
private IPurchaseNoticePersonService purchaseNoticePersonService;
|
private IPurchaseNoticePersonService purchaseNoticePersonService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -89,13 +90,29 @@ public class PurchaseNoticePersonController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增--新购短信通知人员
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "批量新增新购短信通知人员")
|
||||||
|
@PreventRepeatSubmit
|
||||||
|
@RequiresPermissions("purchase:person:add")
|
||||||
|
@SysLog(title = "批量新增新购短信通知人员", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->批量新增新购短信通知人员")
|
||||||
|
@PostMapping("/batchAddNoticePerson")
|
||||||
|
public AjaxResult batchAddNoticePerson(@RequestBody List<PurchaseNoticePerson> purchaseNoticePersonList) {
|
||||||
|
try {
|
||||||
|
return toAjax(purchaseNoticePersonService.insertBatchPurchaseNoticePerson(purchaseNoticePersonList));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return error("系统错误, " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改新购短信通知人员
|
* 修改新购短信通知人员
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "修改新购短信通知人员")
|
@ApiOperation(value = "修改新购短信通知人员")
|
||||||
@PreventRepeatSubmit
|
@PreventRepeatSubmit
|
||||||
@RequiresPermissions("purchase:person:edit")
|
@RequiresPermissions("purchase:person:edit")
|
||||||
@SysLog(title = "新购短信通知人员", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改新购短信通知人员")
|
@SysLog(title = "新购短信通知人员", businessType = OperaType.UPDATE, module = "仓储管理->修改新购短信通知人员")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody PurchaseNoticePerson purchaseNoticePerson) {
|
public AjaxResult edit(@RequestBody PurchaseNoticePerson purchaseNoticePerson) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@ public class PurchaseCheckInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "任务状态")
|
@ApiModelProperty(value = "任务状态")
|
||||||
private String taskStatus;
|
private String taskStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "采购单号")
|
||||||
|
private String code;
|
||||||
|
|
||||||
/** 采购日期 */
|
/** 采购日期 */
|
||||||
@ApiModelProperty(value = "采购日期")
|
@ApiModelProperty(value = "采购日期")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
|
@ -64,4 +67,7 @@ public class PurchaseCheckInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "采购数量--外层Table字段")
|
@ApiModelProperty(value = "采购数量--外层Table字段")
|
||||||
private String purchaseMaNumber;
|
private String purchaseMaNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作人名称")
|
||||||
|
private String createUserName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,10 @@ public class PurchaseNoticePerson extends BaseEntity {
|
||||||
@ApiModelProperty(value = "用户名")
|
@ApiModelProperty(value = "用户名")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
/** 用户角色名 */
|
||||||
|
@ApiModelProperty(value = "用户角色名")
|
||||||
|
private String userRoleName;
|
||||||
|
|
||||||
/** 联系电话 */
|
/** 联系电话 */
|
||||||
@Excel(name = "联系电话")
|
@Excel(name = "联系电话")
|
||||||
@ApiModelProperty(value = "联系电话")
|
@ApiModelProperty(value = "联系电话")
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,14 @@ public interface PurchaseNoticePersonMapper {
|
||||||
*/
|
*/
|
||||||
public int insertPurchaseNoticePerson(PurchaseNoticePerson purchaseNoticePerson);
|
public int insertPurchaseNoticePerson(PurchaseNoticePerson purchaseNoticePerson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新购短信通知人员
|
||||||
|
*
|
||||||
|
* @param purchaseNoticePersonList 新购短信通知人员集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertBatchPurchaseNoticePerson(List<PurchaseNoticePerson> purchaseNoticePersonList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改新购短信通知人员
|
* 修改新购短信通知人员
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,14 @@ public interface IPurchaseNoticePersonService {
|
||||||
*/
|
*/
|
||||||
public int insertPurchaseNoticePerson(PurchaseNoticePerson purchaseNoticePerson);
|
public int insertPurchaseNoticePerson(PurchaseNoticePerson purchaseNoticePerson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增新购短信通知人员
|
||||||
|
*
|
||||||
|
* @param purchaseNoticePersonList 新购短信通知人员集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertBatchPurchaseNoticePerson(List<PurchaseNoticePerson> purchaseNoticePersonList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改新购短信通知人员
|
* 修改新购短信通知人员
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
@Override
|
@Override
|
||||||
public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfoDto) {
|
public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfoDto) {
|
||||||
// 查询新购info列表
|
// 查询新购info列表
|
||||||
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPurchaseCheckInfoList(purchaseCheckInfoDto);
|
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPurchaseCheckInfoJoinList(purchaseCheckInfoDto);
|
||||||
// 过滤info列表中空的对象
|
// 过滤info列表中空的对象
|
||||||
purchaseCheckInfos.removeIf(purchaseCheckInfo -> purchaseCheckInfo.getTaskId() == null);
|
purchaseCheckInfos.removeIf(purchaseCheckInfo -> purchaseCheckInfo.getTaskId() == null);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,21 @@ public class PurchaseNoticePersonServiceImpl implements IPurchaseNoticePersonSer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增新购短信通知人员
|
||||||
|
*
|
||||||
|
* @param purchaseNoticePersonList 新购短信通知人员集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBatchPurchaseNoticePerson(List<PurchaseNoticePerson> purchaseNoticePersonList) {
|
||||||
|
try {
|
||||||
|
return purchaseNoticePersonMapper.insertBatchPurchaseNoticePerson(purchaseNoticePersonList);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("批量新增执行SQL错误:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改新购短信通知人员
|
* 修改新购短信通知人员
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<resultMap type="com.bonus.material.purchase.domain.PurchaseCheckInfo" id="PurchaseCheckInfoResult">
|
<resultMap type="com.bonus.material.purchase.domain.PurchaseCheckInfo" id="PurchaseCheckInfoResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="taskId" column="task_id" />
|
<result property="taskId" column="task_id" />
|
||||||
|
<result property="code" column="code" />
|
||||||
<result property="purchaseTime" column="purchase_time" />
|
<result property="purchaseTime" column="purchase_time" />
|
||||||
<result property="arrivalTime" column="arrival_time" />
|
<result property="arrivalTime" column="arrival_time" />
|
||||||
<result property="purchaser" column="purchaser" />
|
<result property="purchaser" column="purchaser" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createUserName" column="purchaser_name" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
|
@ -30,10 +32,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select
|
select
|
||||||
pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by,
|
pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by,
|
||||||
pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id,
|
pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id,
|
||||||
t.task_status, t.task_type
|
t.task_status, t.task_type, t.code, su.user_name as create_user_name
|
||||||
from
|
from
|
||||||
purchase_check_info pci
|
purchase_check_info pci
|
||||||
left join tm_task t on t.task_id = pci.task_id
|
left join tm_task t on t.task_id = pci.task_id
|
||||||
|
left join sys_user su ON pci.create_by = su.user_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPurchaseCheckInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseCheckInfo" resultMap="PurchaseCheckInfoResult">
|
<select id="selectPurchaseCheckInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseCheckInfo" resultMap="PurchaseCheckInfoResult">
|
||||||
|
|
|
||||||
|
|
@ -70,4 +70,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<insert id="insertBatchPurchaseNoticePerson">
|
||||||
|
insert into purchase_notice_person(user_id,user_name,telphone,create_time) values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.userId},#{item.userName},#{item.telphone},now())
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue