|
@@ -7,11 +7,16 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.jeeplus.core.query.QueryWrapperGenerator;
|
|
|
+import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
+import com.jeeplus.sys.utils.StringUtils;
|
|
|
+import com.jeeplus.sys.utils.UserUtils;
|
|
|
+import com.jeeplus.test.cw.contractRegistration.domain.ContractInfo;
|
|
|
import com.jeeplus.test.cw.projectRecords.domain.CwProjectRecords;
|
|
|
import com.jeeplus.test.cw.projectRecords.mapper.CwProjectRecordsMapper;
|
|
|
import com.jeeplus.test.cw.projectRecords.service.dto.CwProjectClientInfoDTO;
|
|
|
import com.jeeplus.test.cw.projectRecords.service.dto.CwProjectRecordsDTO;
|
|
|
import com.jeeplus.test.cw.projectRecords.service.mapstruct.CwProjectRecordsWrapper;
|
|
|
+import com.jeeplus.test.mould.service.SerialnumTplService;
|
|
|
import com.jeeplus.test.oss.service.OssService;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -34,6 +39,9 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
|
|
|
@Resource
|
|
|
private OssService ossService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private SerialnumTplService serialnumTplService;
|
|
|
+
|
|
|
/**
|
|
|
* 差选项目列表信息
|
|
|
* @param page
|
|
@@ -66,6 +74,13 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String saveForm(CwProjectRecordsDTO cwProjectRecordsDTO) throws Exception{
|
|
|
+ if(StringUtils.isBlank(cwProjectRecordsDTO.getId())){
|
|
|
+ //获取当前登录人信息
|
|
|
+ UserDTO userDTO = UserUtils.getCurrentUserDTO();
|
|
|
+ //项目编号生成
|
|
|
+ String serialNum = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), CwProjectRecordsDTO.BIZ_CODE);
|
|
|
+ cwProjectRecordsDTO.setProjectNumber(serialNum);
|
|
|
+ }
|
|
|
CwProjectRecords cwWorkClientBase = CwProjectRecordsWrapper.INSTANCE.toEntity(cwProjectRecordsDTO);
|
|
|
this.saveOrUpdate(cwWorkClientBase);
|
|
|
if (ObjectUtil.isNotEmpty(cwProjectRecordsDTO)) {
|