|
|
|
@ -24,6 +24,8 @@ import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllDeptDTO; |
|
|
|
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; |
|
|
|
import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.dto.EnterpriseReportDTO; |
|
|
|
@ -39,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
@ -57,6 +60,11 @@ public class EnterpriseReportServiceImpl extends BaseServiceImpl<EnterpriseRepor |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<EnterpriseReportDTO> page(Map<String, Object> params) { |
|
|
|
UserDetail userDetail = SecurityUser.getUser(); |
|
|
|
if (null == userDetail.getDeptIdList() || userDetail.getDeptIdList().size() == 0) { |
|
|
|
return new PageData<>(null, 0); |
|
|
|
} |
|
|
|
params.put("deptIdList", userDetail.getDeptIdList()); |
|
|
|
IPage<EnterpriseReportEntity> page = baseDao.selectPage( |
|
|
|
getPage(params, FieldConstant.CREATED_TIME, false), |
|
|
|
getWrapper(params) |
|
|
|
@ -66,6 +74,11 @@ public class EnterpriseReportServiceImpl extends BaseServiceImpl<EnterpriseRepor |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<EnterpriseReportDTO> list(Map<String, Object> params) { |
|
|
|
UserDetail userDetail = SecurityUser.getUser(); |
|
|
|
if (null == userDetail.getDeptIdList() || userDetail.getDeptIdList().size() == 0) { |
|
|
|
return new ArrayList<EnterpriseReportDTO>(); |
|
|
|
} |
|
|
|
params.put("deptIdList", userDetail.getDeptIdList()); |
|
|
|
List<EnterpriseReportEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
|
|
|
|
|
return ConvertUtils.sourceToTarget(entityList, EnterpriseReportDTO.class); |
|
|
|
@ -81,6 +94,7 @@ public class EnterpriseReportServiceImpl extends BaseServiceImpl<EnterpriseRepor |
|
|
|
String legalPerson = (String)params.get("legalPerson"); |
|
|
|
String concat = (String)params.get("concat"); |
|
|
|
String enterpriseStatus = (String)params.get("enterpriseStatus"); |
|
|
|
List<Long> deptIdList = (List<Long>) params.get("deptIdList"); |
|
|
|
|
|
|
|
QueryWrapper<EnterpriseReportEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.apply(StringUtils.isNotBlank(gridId),"FIND_IN_SET ("+gridId+",ALL_DEPT_IDS)"); |
|
|
|
@ -92,7 +106,7 @@ public class EnterpriseReportServiceImpl extends BaseServiceImpl<EnterpriseRepor |
|
|
|
wrapper.like(StringUtils.isNotBlank(legalPerson), "LEGAL_PERSON", legalPerson); |
|
|
|
wrapper.like(StringUtils.isNotBlank(concat), "CONCAT", concat); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(enterpriseStatus), "ENTERPRISE_STATUS", enterpriseStatus); |
|
|
|
|
|
|
|
wrapper.in("GRID_ID",deptIdList); |
|
|
|
return wrapper; |
|
|
|
} |
|
|
|
|
|
|
|
|