领料电子签名通知材料员接口修改

This commit is contained in:
bonus 2025-07-26 13:22:31 +08:00
parent 264061c917
commit a86638a9a6
4 changed files with 60 additions and 12 deletions

View File

@ -336,4 +336,8 @@ public class LeaseApplyInfo extends BaseEntity{
@ApiModelProperty(value = "发布人id")
private Long publisher;
@ApiModelProperty(value = "账号")
private String cno;
}

View File

@ -10,14 +10,14 @@ import org.apache.ibatis.annotations.Param;
/**
* 领料任务Mapper接口
*
*
* @author xsheng
* @date 2024-10-16
*/
public interface LeaseApplyInfoMapper {
/**
* 查询领料任务
*
*
* @param leaseApplyInfo
* @return 领料任务
*/
@ -25,7 +25,7 @@ public interface LeaseApplyInfoMapper {
/**
* 查询领料任务列表
*
*
* @param leaseApplyInfo 领料任务
* @return 领料任务集合
*/
@ -33,7 +33,7 @@ public interface LeaseApplyInfoMapper {
/**
* 新增领料任务
*
*
* @param leaseApplyInfo 领料任务
* @return 结果
*/
@ -41,7 +41,7 @@ public interface LeaseApplyInfoMapper {
/**
* 修改领料任务
*
*
* @param leaseApplyInfo 领料任务
* @return 结果
*/
@ -61,7 +61,7 @@ public interface LeaseApplyInfoMapper {
/**
* 删除领料任务
*
*
* @param id 领料任务主键
* @return 结果
*/
@ -69,7 +69,7 @@ public interface LeaseApplyInfoMapper {
/**
* 批量删除领料任务
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
@ -170,10 +170,9 @@ public interface LeaseApplyInfoMapper {
*/
List<LeaseApplyInfo> selectPublish(LeaseApplyInfo leaseApplyInfo);
/**
* 根据id去查询出库数量
* @param applyInfo
* @return
*/
List<LeaseApplyInfo> getUserList(LeaseApplyInfo leaseApplyInfo);
LeaseApplyInfo getUserPhoneById(LeaseApplyInfo item);
LeaseApplyInfo getOutList(LeaseApplyInfo applyInfo);
}

View File

@ -7,7 +7,11 @@ import java.util.*;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONObject;
import com.ah.sbd.SmsTool;
import com.ah.sbd.utils.param.BatchSmsByContentParam;
import com.bonus.common.biz.config.PoiOutPage;
import com.bonus.common.biz.constant.BmConfigItems;
import com.bonus.common.biz.constant.MaterialConstants;
import com.bonus.common.biz.domain.BmFileInfo;
import com.bonus.common.biz.domain.lease.*;
@ -1132,6 +1136,24 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
}
}
}
List<LeaseApplyInfo> userList = leaseApplyInfoMapper.getUserList(leaseApplyInfo);
// 省公司短信发送
List<String> mobileList = new ArrayList();
if(userList !=null && userList.size()>0){
for (LeaseApplyInfo item : userList){
LeaseApplyInfo item1 = leaseApplyInfoMapper.getUserPhoneById(item);
mobileList.add(item1.getPhone());
}
}
if (mobileList != null && mobileList.size() > 0){
JSONObject sendResult = SmsTool.sendSms(new BatchSmsByContentParam(mobileList, "您有一条待确认的领料信息,请尽快登录机具系统进行确认!"), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
if (sendResult != null) {
// 短信发送成功
result =1;
}
}
return result;
}

View File

@ -803,4 +803,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
is_confirm = 2
where id = #{id}
</update>
<select id="getUserList" resultMap="LeaseApplyInfoResult">
SELECT
sgp.cno
FROM
bm_project bp
LEFT JOIN `data_center`.dx_fb_son dfs on bp.external_id = dfs.id
LEFT JOIN `sbd_audit`.sg_project_post_personnel sgp on sgp.depart_id = dfs.project_dept_id
WHERE sgp.post_id = '3de0eb390f3611efa1940242ac130004'
AND bp.pro_id = #{leaseProjectId}
</select>
<select id="getUserPhoneById" resultMap="LeaseApplyInfoResult">
select
user_id,
phonenumber AS phone
from
sys_user
where user_name = #{cno}
</select>
</mapper>