|
|
|
|
@ -12,6 +12,8 @@ import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.core.tool.utils.SpringUtil; |
|
|
|
|
import org.springblade.desk.common.constant.BizTypeConstant; |
|
|
|
|
import org.springblade.desk.common.service.IMesNotifyMessageService; |
|
|
|
|
import org.springblade.desk.dashboard.constant.TaskingConstant; |
|
|
|
|
import org.springblade.desk.dashboard.excel.DsPartExcel; |
|
|
|
|
import org.springblade.desk.dashboard.mapper.DsPartMapper; |
|
|
|
|
@ -95,6 +97,9 @@ public class DsPartServiceImpl extends BaseServiceImpl<DsPartMapper, DsPartEntit |
|
|
|
|
@Autowired |
|
|
|
|
IPrReworkProcessService prReworkProcessService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
IMesNotifyMessageService mesNotifyMessageService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<DsPartVO> selectDsPartPage(IPage<DsPartVO> page, DsPartVO dsPart) { |
|
|
|
|
|
|
|
|
|
@ -250,7 +255,20 @@ public class DsPartServiceImpl extends BaseServiceImpl<DsPartMapper, DsPartEntit |
|
|
|
|
for (DsPartEntity partEntity : dsPartEntityList) { |
|
|
|
|
//获取工艺员
|
|
|
|
|
String technician = partEntity.getTechnician(); |
|
|
|
|
//todo 推送相关负责人待办
|
|
|
|
|
|
|
|
|
|
UserInfo craftUserInfo = userClient.userInfo(Func.toLong(partEntity.getTechnician())).getData(); |
|
|
|
|
if (craftUserInfo == null || craftUserInfo.getUser() == null) { |
|
|
|
|
log.error("零件失效预警,工艺员查询失败:{}",partEntity.getPartCode()); |
|
|
|
|
} |
|
|
|
|
Long craftManId = craftUserInfo.getUser().getId(); |
|
|
|
|
|
|
|
|
|
// 推送相关负责人待办
|
|
|
|
|
mesNotifyMessageService.saveMsg( |
|
|
|
|
BizTypeConstant.CRAFT_TASK_REDEPLOY, |
|
|
|
|
"零件即将过期", |
|
|
|
|
"零件即将过期,请及时处理,零件号:"+partEntity.getPartCode(), |
|
|
|
|
craftManId |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
@ -394,9 +412,7 @@ public class DsPartServiceImpl extends BaseServiceImpl<DsPartMapper, DsPartEntit |
|
|
|
|
updateById(dsPart); |
|
|
|
|
if (!TaskingConstant.IS_SINTERING.equals(dsPart.getIsSintering())) { |
|
|
|
|
if ((org.apache.commons.lang3.StringUtils.isNotBlank(dsPart.getCraftWay()) && dsPart.getCraftWay().contains("4"))) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// todo getErpDataPartClient().sendingPartGiveErp(dsPart);
|
|
|
|
|
// todo getErpDataPartClient().sendingPartGiveErp(dsPart);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!CollectionUtils.isEmpty(zPartList)) { |
|
|
|
|
|