|
@@ -24,8 +24,10 @@ import com.jeeplus.psimanage.psiWareHouse.mapper.PsiWareHouseDetailedMapper;
|
|
|
import com.jeeplus.psimanage.psiWareHouse.mapper.PsiWareHouseSummaryMapper;
|
|
import com.jeeplus.psimanage.psiWareHouse.mapper.PsiWareHouseSummaryMapper;
|
|
|
import com.jeeplus.psimanage.purchase.service.PsiMaterialService;
|
|
import com.jeeplus.psimanage.purchase.service.PsiMaterialService;
|
|
|
import com.jeeplus.psimanage.serialNumTpl.service.PsiSerialnumTplService;
|
|
import com.jeeplus.psimanage.serialNumTpl.service.PsiSerialnumTplService;
|
|
|
|
|
+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.jeeplus.utils.StringUtils;
|
|
import com.jeeplus.utils.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -175,7 +177,33 @@ public class PsiLossService {
|
|
|
|
|
|
|
|
if (!isApproved(oldInfo.getStatus()) && isApproved(info.getStatus())) {
|
|
if (!isApproved(oldInfo.getStatus()) && isApproved(info.getStatus())) {
|
|
|
deductInventory(detail);
|
|
deductInventory(detail);
|
|
|
|
|
+ //通知发起人
|
|
|
|
|
+ List<UserDTO> notifiedPartyUsers = new ArrayList<>();
|
|
|
|
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
|
|
|
|
+ String day = format.format(new Date());
|
|
|
|
|
+ String title = "[报损编号:"+dto.getLossNo()+"]-报损申请审批通过";
|
|
|
|
|
+ UserDTO initiator = SpringUtil.getBean(IUserApi.class).getById(dto.getHandledById());
|
|
|
|
|
+ notifiedPartyUsers.add(initiator);
|
|
|
|
|
+ //向用户发起通知
|
|
|
|
|
+ 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);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
return dto.getId();
|
|
return dto.getId();
|
|
|
}
|
|
}
|
|
|
|
|
|