|
|
@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import com.yxt.anrui.portal.api.sysflowableconfig.*; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.StringUtils; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@ -36,12 +37,19 @@ public class SysFlowableConfigService extends MybatisBaseService<SysFlowableConf |
|
|
|
sysFlowableConfigVo = new SysFlowableConfigVo(); |
|
|
|
sysFlowableConfigVo.setStartDate(DateUtil.format(new Date(),"yyyy-MM-dd HH:mm")); |
|
|
|
sysFlowableConfigVo.setStartDateLong(System.currentTimeMillis()); |
|
|
|
sysFlowableConfigVo.setUserSid(userSid); |
|
|
|
} |
|
|
|
return rb.success().setData(sysFlowableConfigVo); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean saveOrUpdateDto(SysFlowableConfigDto dto) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
if(StringUtils.isNotBlank(dto.getEndDate())){ |
|
|
|
int res=dto.getEndDate().compareTo(dto.getStartDate()); |
|
|
|
if(res<=0){ |
|
|
|
return rb.setMsg("结束时间需要比开始时间大"); |
|
|
|
} |
|
|
|
} |
|
|
|
//查询是否包含该用户的数据
|
|
|
|
SysFlowableConfig sysFlowableConfig = baseMapper.selectByUserSids(dto.getUserSid()); |
|
|
|
if(sysFlowableConfig != null){ |
|
|
|