Browse Source

新增:设备维护库设置对应得机构

zhongwei
ty 4 months ago
parent
commit
bc2604e93b
  1. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceLibraryServiceImpl.java

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceLibraryServiceImpl.java

@ -20,6 +20,7 @@ import org.apache.commons.lang3.RandomUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*;
import org.springframework.beans.factory.annotation.Autowired;
@ -50,6 +51,7 @@ public class OperMaintenanceLibraryServiceImpl extends ServiceImpl<OperMaintenan
req.setLibraryCode(DateUtil.format(DateUtil.now(), DateUtil.PATTERN_DATETIME_MINI) + RandomUtils.nextInt(0, 999));
List<String> disposers = Arrays.stream(StringUtil.splitTrim(req.getDisposers(), ",")).filter(o -> StringUtil.isNotBlank(o)).collect(Collectors.toList());
req.setCreatePlanStartDisposer(disposers.size()>0 ? Long.valueOf(disposers.get(0)) : null);
req.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
super.save(req);
return R.data(req);
}

Loading…
Cancel
Save