|
@@ -24,8 +24,10 @@ import com.jeeplus.psimanage.supplier.mapper.PsiMaterialSupplierMapper;
|
|
|
import com.jeeplus.psimanage.oss.service.dto.WorkAttachmentDto;
|
|
import com.jeeplus.psimanage.oss.service.dto.WorkAttachmentDto;
|
|
|
import com.jeeplus.psimanage.serialNumTpl.service.PsiSerialnumTplService;
|
|
import com.jeeplus.psimanage.serialNumTpl.service.PsiSerialnumTplService;
|
|
|
import com.jeeplus.sys.feign.IDictApi;
|
|
import com.jeeplus.sys.feign.IDictApi;
|
|
|
|
|
+import com.jeeplus.sys.feign.IRoleApi;
|
|
|
import com.jeeplus.sys.feign.IUserApi;
|
|
import com.jeeplus.sys.feign.IUserApi;
|
|
|
import com.jeeplus.sys.feign.IWorkAttachmentApi;
|
|
import com.jeeplus.sys.feign.IWorkAttachmentApi;
|
|
|
|
|
+import com.jeeplus.sys.service.dto.RoleDTO;
|
|
|
import com.jeeplus.sys.service.dto.UserDTO;
|
|
import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.jeeplus.utils.StringUtils;
|
|
import com.jeeplus.utils.StringUtils;
|
|
@@ -310,6 +312,36 @@ public class PsiMaterialService {
|
|
|
info.setHandledBy(dto.getHandledById());
|
|
info.setHandledBy(dto.getHandledById());
|
|
|
info.setUpdateTime(new Date());
|
|
info.setUpdateTime(new Date());
|
|
|
basicMapper.updateById(info);
|
|
basicMapper.updateById(info);
|
|
|
|
|
+
|
|
|
|
|
+ //审核通过抄送仓库管理员
|
|
|
|
|
+ if(dto.getStatus().equals("5")){
|
|
|
|
|
+ Map<String, String> keyMap = new HashMap<>();
|
|
|
|
|
+ keyMap.put("name", "仓库管理员");
|
|
|
|
|
+ keyMap.put("tenantId", "10009");
|
|
|
|
|
+ List<RoleDTO> roleDTO = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
|
|
|
|
|
+ RoleDTO role = roleDTO.get(0);
|
|
|
|
|
+ List<UserDTO> notifiedPartyUsers =SpringUtil.getBean(IUserApi.class).findListByRoleId(role.getId());
|
|
|
|
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
|
|
|
|
+ String day = format.format(new Date());
|
|
|
|
|
+ String title = "[采购编号:"+dto.getPurchaseNo()+"]-采购申请审批通过";
|
|
|
|
|
+ //向用户发起通知
|
|
|
|
|
+ if (null != notifiedPartyUsers) {
|
|
|
|
|
+ for (UserDTO userDTO1 : notifiedPartyUsers) {
|
|
|
|
|
+ //发送通知
|
|
|
|
|
+ Map<String ,String > map = new HashMap<>();
|
|
|
|
|
+ map.put("taskId",dto.getProcInsId());
|
|
|
|
|
+ map.put("title",title);
|
|
|
|
|
+ map.put("defId",dto.getProcessDefinitionId());
|
|
|
|
|
+ map.put("taskName","采购申请审批通过");
|
|
|
|
|
+ map.put("createUser","管理员");
|
|
|
|
|
+ map.put("createTime",day);
|
|
|
|
|
+ map.put("noticeName",userDTO1.getLoginName());
|
|
|
|
|
+ map.put("noticeId",userDTO1.getId());
|
|
|
|
|
+ map.put("createById",userDTO.getId());
|
|
|
|
|
+ flowTaskService.add(map);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// 修改报销详情列表信息
|
|
// 修改报销详情列表信息
|
|
|
// 删除原有数据
|
|
// 删除原有数据
|
|
|
// LambdaQueryWrapper<MaterialDetailed> detailWrapper = new LambdaQueryWrapper<>();
|
|
// LambdaQueryWrapper<MaterialDetailed> detailWrapper = new LambdaQueryWrapper<>();
|