|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|