|
@ -1,5 +1,8 @@ |
|
|
package org.dromara.business.service.impl; |
|
|
package org.dromara.business.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.convert.Convert; |
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
import org.dromara.business.domain.BusinessTask; |
|
|
import org.dromara.business.domain.BusinessTask; |
|
|
import org.dromara.business.domain.bo.BusinessTaskBo; |
|
|
import org.dromara.business.domain.bo.BusinessTaskBo; |
|
|
import org.dromara.business.domain.vo.BusinessTaskVo; |
|
|
import org.dromara.business.domain.vo.BusinessTaskVo; |
|
@ -90,6 +93,7 @@ public class BusinessTaskServiceImpl implements IBusinessTaskService { |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public Boolean insertByBo(BusinessTaskBo bo) { |
|
|
public Boolean insertByBo(BusinessTaskBo bo) { |
|
|
|
|
|
System.out.println("数据"+bo.getPolygonRegion()); |
|
|
// 获取当前登录用户信息
|
|
|
// 获取当前登录用户信息
|
|
|
LoginUser currentUser = DataPermissionHelper.getVariable("user"); |
|
|
LoginUser currentUser = DataPermissionHelper.getVariable("user"); |
|
|
bo.setCreateBy(currentUser.getUserId()); |
|
|
bo.setCreateBy(currentUser.getUserId()); |
|
@ -99,7 +103,12 @@ public class BusinessTaskServiceImpl implements IBusinessTaskService { |
|
|
bo.setTenantId(currentUser.getTenantId()); |
|
|
bo.setTenantId(currentUser.getTenantId()); |
|
|
bo.setStatus("0"); |
|
|
bo.setStatus("0"); |
|
|
bo.setCreateTime(new Date()); |
|
|
bo.setCreateTime(new Date()); |
|
|
|
|
|
String jsonString = JSON.toJSONString(bo.getPolygonRegion()); |
|
|
BusinessTask add = MapstructUtils.convert(bo, BusinessTask.class); |
|
|
BusinessTask add = MapstructUtils.convert(bo, BusinessTask.class); |
|
|
|
|
|
add.setPolygonRegion(jsonString); |
|
|
|
|
|
if(StrUtil.isNotBlank(bo.getExpectTime())){ |
|
|
|
|
|
add.setExpectTime(Convert.toDate(bo.getExpectTime())); |
|
|
|
|
|
} |
|
|
boolean flag = baseMapper.insert(add) > 0; |
|
|
boolean flag = baseMapper.insert(add) > 0; |
|
|
if (flag) { |
|
|
if (flag) { |
|
|
bo.setId(add.getId()); |
|
|
bo.setId(add.getId()); |
|
|