|
@@ -15,6 +15,7 @@ import com.metro.entity.vo.WarFruitTopVO;
|
|
|
import com.metro.entity.vo.WarFruitVO;
|
|
|
import com.metro.mapper.CompanysMapper;
|
|
|
import com.metro.mapper.DataShowMapper;
|
|
|
+import com.metro.mapper.JPersonsMapper;
|
|
|
import com.metro.mapper.WarFruitMapper;
|
|
|
import com.metro.restful.ServiceException;
|
|
|
import com.metro.service.CompanyService;
|
|
@@ -28,7 +29,6 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.net.URLEncoder;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -48,6 +48,8 @@ public class WarFruitServiceImpl implements WarFruitService {
|
|
|
@Resource
|
|
|
private WarFruitMapper warFruitMapper;
|
|
|
@Resource
|
|
|
+ private JPersonsMapper jPersonsMapper;
|
|
|
+ @Resource
|
|
|
private CompanysMapper companysMapper;
|
|
|
@Resource
|
|
|
private CompanyService companyService;
|
|
@@ -87,15 +89,13 @@ public class WarFruitServiceImpl implements WarFruitService {
|
|
|
|
|
|
@Override
|
|
|
public WarFruitTopVO policeTop10(WarFruitSearch warFruitSearch) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
JPersonVO jPersonVO = this.rootTrue();
|
|
|
PoliceSearch policeSearch = new PoliceSearch();
|
|
|
policeSearch.setPageNum(0);
|
|
|
policeSearch.setPageSize(10);
|
|
|
- policeSearch.setStartTime(warFruitSearch.getStartTime() == null?null:sdf.format(warFruitSearch.getStartTime()));
|
|
|
- policeSearch.setEndTime(warFruitSearch.getEndTime() == null?null:sdf.format(warFruitSearch.getStartTime()));
|
|
|
+ policeSearch.setStartTime(warFruitSearch.getStartTime());
|
|
|
+ policeSearch.setEndTime(warFruitSearch.getEndTime());
|
|
|
policeSearch.setCompanyId(jPersonVO.getCompanyId() !=null ? jPersonVO.getCompanyId() : null);
|
|
|
- policeSearch.setBranchId(jPersonVO.getBranchId() !=null ? jPersonVO.getBranchId() : null);
|
|
|
/*如果是一级账号的话 可以传入派出所*/
|
|
|
if(jPersonVO.getType() == 1 && StringUtils.isNotEmpty(warFruitSearch.getCompanyId())){
|
|
|
policeSearch.setCompanyId(warFruitSearch.getCompanyId());
|
|
@@ -129,17 +129,18 @@ public class WarFruitServiceImpl implements WarFruitService {
|
|
|
private IPage<WarFruitVO> policePageListType(PoliceSearch policeSearch ,Integer type){
|
|
|
JPersonVO jPersonVO = jPersonsService.getUserInfo();
|
|
|
if(jPersonVO.getType() == 3)policeSearch.setCardId(jPersonVO.getCardId());
|
|
|
- if(jPersonVO.getType() == 1 && StringUtils.isNotEmpty(policeSearch.getCompanyId())){
|
|
|
-
|
|
|
- }
|
|
|
- else{
|
|
|
+ if(jPersonVO.getType() != 1){
|
|
|
policeSearch.setCompanyId(jPersonVO.getCompanyId() !=null ? jPersonVO.getCompanyId() : null);
|
|
|
}
|
|
|
- policeSearch.setBranchId(jPersonVO.getBranchId() !=null ? jPersonVO.getBranchId() : null);
|
|
|
- policeSearch.setType(type);//需要照片
|
|
|
-
|
|
|
+ policeSearch.setType(type);
|
|
|
Page<WarFruitVO> page = new Page<>(policeSearch.getPageNum(),policeSearch.getPageSize());
|
|
|
IPage<WarFruitVO> warFruitVOIPage = warFruitMapper.policePageList(page, policeSearch);
|
|
|
+// /*type = 1 代表需要照片*/
|
|
|
+// List<WarFruitVO> records = warFruitVOIPage.getRecords();
|
|
|
+// List<String> collect = records.stream().map(WarFruitVO::getCardId).collect(Collectors.toList());//身份证列表
|
|
|
+// jPersonsMapper.selectList(new LambdaQueryWrapper<JPersons>().in)
|
|
|
+
|
|
|
+
|
|
|
return warFruitVOIPage;
|
|
|
}
|
|
|
@Override
|