|
@@ -7,6 +7,7 @@ import com.jeeplus.pubmodules.serialNumTpl.domain.SysSerialnumTpl;
|
|
|
import com.jeeplus.pubmodules.serialNumTpl.mapper.SerialnumTplMapper;
|
|
|
import com.jeeplus.sys.domain.Office;
|
|
|
import com.jeeplus.sys.mapper.OfficeMapper;
|
|
|
+import com.jeeplus.sys.service.dto.OfficeDTO;
|
|
|
import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
import com.jeeplus.sys.utils.UserUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -74,7 +75,7 @@ public class SerialnumTplService {
|
|
|
public String genSerialNum(String companyId, String bizCode) throws Exception {
|
|
|
//获取当前登录人信息
|
|
|
UserDTO dto = UserUtils.getCurrentUserDTO();
|
|
|
- Office office = officeMapper.selectById(companyId);
|
|
|
+ OfficeDTO office = officeMapper.getOfficeById(companyId);
|
|
|
if (StringUtils.isBlank(bizCode)){
|
|
|
throw new Exception("生成编号失败,业务类型不能为空");
|
|
|
}
|
|
@@ -146,7 +147,7 @@ public class SerialnumTplService {
|
|
|
public String genSerialNumNoSort(String companyId, String bizCode) throws Exception {
|
|
|
//获取当前登录人信息
|
|
|
UserDTO dto = UserUtils.getCurrentUserDTO();
|
|
|
- Office office = officeMapper.selectById(companyId);
|
|
|
+ OfficeDTO office = officeMapper.getOfficeById(companyId);
|
|
|
if (StringUtils.isBlank(bizCode)){
|
|
|
throw new Exception("生成编号失败,业务类型不能为空");
|
|
|
}
|
|
@@ -215,7 +216,7 @@ public class SerialnumTplService {
|
|
|
public String genSerialReviewNum(String companyId, String bizCode) throws Exception {
|
|
|
//获取当前登录人信息
|
|
|
UserDTO dto = UserUtils.getCurrentUserDTO();
|
|
|
- Office office = officeMapper.selectById(companyId);
|
|
|
+ OfficeDTO office = officeMapper.getOfficeById(companyId);
|
|
|
if (StringUtils.isBlank(bizCode)){
|
|
|
throw new Exception("生成编号失败,业务类型不能为空");
|
|
|
}
|
|
@@ -283,10 +284,10 @@ public class SerialnumTplService {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
- private SysSerialnumTpl querySerialTpl(Office company, String bizCode) {
|
|
|
+ private SysSerialnumTpl querySerialTpl(OfficeDTO company, String bizCode) {
|
|
|
SysSerialnumTpl numTpl = serialnumTplMapper.queryByComAndBizCode(company.getId(), bizCode);
|
|
|
if (numTpl==null && company.getParentId()!=null && !"0".equals(company.getParentId())){
|
|
|
- Office office = officeMapper.selectById(company.getParentId());
|
|
|
+ OfficeDTO office = officeMapper.getOfficeById(company.getParentId());
|
|
|
numTpl = this.querySerialTpl(office,bizCode);
|
|
|
}
|
|
|
return numTpl;
|