feat:分公司统计bug修复
parent
35efb01188
commit
d038170c90
|
|
@ -91,11 +91,11 @@ public class VehicleApplyController {
|
|||
|
||||
@ApiOperation("车牌号唯一性校验")
|
||||
@GetMapping("/check-licence-no")
|
||||
public SingleResponse<Map<String, Boolean>> checkLicenceNo(@RequestParam String licenceNo,
|
||||
public SingleResponse<Map<String, Object>> checkLicenceNo(@RequestParam String licenceNo,
|
||||
@RequestParam(required = false) Long id) {
|
||||
Boolean available = vehicleApplyService.checkLicenceNo(licenceNo, id);
|
||||
Map<String, Boolean> result = new HashMap<>();
|
||||
result.put("available", available);
|
||||
Map<String, Object> result = vehicleApplyService.checkLicenceNo(licenceNo, id);
|
||||
// Map<String, Boolean> result = new HashMap<>();
|
||||
// result.put("available", available);
|
||||
return SingleResponse.of(result);
|
||||
}
|
||||
@ApiOperation("分公司统计")
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class PersonApplyQueryExe {
|
|||
|
||||
public PageResponse<PersonCountCO> personnelVehicleManagementList(PersonCountPageQry qry) {
|
||||
Map<String, Object> parmas = PageQueryHelper.toHashMap(qry);
|
||||
parmas.put("applyCorpId", AuthContext.getTenantId());
|
||||
parmas.put("applyCorpId", qry.getCorpId());
|
||||
PageResponse<PersonCountDto> pageResponse = xgfPersonApplyRepository.personnelVehicleManagementList(parmas);
|
||||
List<PersonCountCO> examCenterCOS = personApplyCoConvertor.converDtosToCOs(pageResponse.getData());
|
||||
|
||||
|
|
|
|||
|
|
@ -17,15 +17,14 @@ import com.zcloud.primeport.dto.clientobject.FgsVehicleCountCo;
|
|||
import com.zcloud.primeport.dto.clientobject.VehicleApplyCO;
|
||||
import com.zcloud.primeport.dto.clientobject.VehicleAuditCO;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleApplyDO;
|
||||
import com.zcloud.primeport.persistence.dataobject.VehicleBlackDO;
|
||||
import com.zcloud.primeport.persistence.repository.VehicleApplyRepository;
|
||||
import com.zcloud.primeport.persistence.repository.VehicleBlackRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* web-app
|
||||
|
|
@ -41,6 +40,7 @@ public class VehicleApplyServiceImpl implements VehicleApplyServiceI {
|
|||
private final VehicleApplyRemoveExe vehicleApplyRemoveExe;
|
||||
private final VehicleApplyQueryExe vehicleApplyQueryExe;
|
||||
private final VehicleApplyRepository vehicleApplyRepository;
|
||||
private final VehicleBlackRepository blackRepository;
|
||||
|
||||
@Override
|
||||
public PageResponse<VehicleApplyCO> listPage(VehicleApplyPageQry qry) {
|
||||
|
|
@ -75,14 +75,27 @@ public class VehicleApplyServiceImpl implements VehicleApplyServiceI {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkLicenceNo(String licenceNo, Long id) {
|
||||
public Map<String, Object> checkLicenceNo(String licenceNo, Long id) {
|
||||
QueryWrapper<VehicleApplyDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("licence_no", licenceNo);
|
||||
queryWrapper.eq("delete_enum", "false");
|
||||
if (id != null) {
|
||||
queryWrapper.ne("id", id);
|
||||
}
|
||||
return vehicleApplyRepository.count(queryWrapper) == 0;
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("available", true);
|
||||
if (vehicleApplyRepository.count(queryWrapper) == 0) {
|
||||
result.put("available", false);
|
||||
result.put("availableMessage", "该车牌号已存在");
|
||||
}
|
||||
QueryWrapper<VehicleBlackDO> queryBlackWrapper = new QueryWrapper<>();
|
||||
queryBlackWrapper.eq("licence_no", licenceNo);
|
||||
queryBlackWrapper.eq("delete_enum", "false");
|
||||
if (blackRepository.count(queryBlackWrapper) == 0) {
|
||||
result.put("available", false);
|
||||
result.put("availableMessage", "车牌号已拉黑");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -127,8 +140,8 @@ public class VehicleApplyServiceImpl implements VehicleApplyServiceI {
|
|||
@Override
|
||||
public void xgfCarAuthorization(CarAuthCmd cmd) {
|
||||
UpdateWrapper<VehicleApplyDO> objectUpdateWrapper = new UpdateWrapper<>();
|
||||
objectUpdateWrapper.set("mkmj_permission",cmd.getMkmjPermission());
|
||||
objectUpdateWrapper.eq("id",cmd.getVehicleApplyId());
|
||||
objectUpdateWrapper.set("mkmj_permission", cmd.getMkmjPermission());
|
||||
objectUpdateWrapper.eq("id", cmd.getVehicleApplyId());
|
||||
vehicleApplyRepository.update(objectUpdateWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.zcloud.primeport.dto.clientobject.VehicleApplyCO;
|
|||
import com.zcloud.primeport.dto.clientobject.VehicleAuditCO;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
|
|
@ -29,7 +30,7 @@ public interface VehicleApplyServiceI {
|
|||
|
||||
VehicleApplyCO getInfoById(Long id);
|
||||
|
||||
Boolean checkLicenceNo(String licenceNo, Long id);
|
||||
Map<String, Object> checkLicenceNo(String licenceNo, Long id);
|
||||
|
||||
void inspectCarSave(VehicleApplyInspectAddCmd cmd);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class FgsVehicleCountCo extends ClientObject {
|
|||
@ApiModelProperty(value = "企业id",name = "corpId")
|
||||
private Long corpId;
|
||||
@ApiModelProperty(value = "企业名称",name = "corpName")
|
||||
private Long corpName;
|
||||
private String corpName;
|
||||
@ApiModelProperty(value = "人员数",name = "userCount")
|
||||
private Integer userCount;
|
||||
@ApiModelProperty(value = "个人车辆数",name = "priCarCount")
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public class FgsVehicleCountDto {
|
|||
@ApiModelProperty(value = "企业id",name = "corpId")
|
||||
private Long corpId;
|
||||
@ApiModelProperty(value = "企业名称",name = "corpName")
|
||||
private Long corpName;
|
||||
private String corpName;
|
||||
@ApiModelProperty(value = "人员数",name = "userCount")
|
||||
private Integer userCount;
|
||||
@ApiModelProperty(value = "个人车辆数",name = "priCarCount")
|
||||
|
|
|
|||
|
|
@ -49,5 +49,7 @@ public class PersonCountDto{
|
|||
private Integer mkmjPermission;
|
||||
@ApiModelProperty(value = "用户头像URL")
|
||||
private String userFaceUrl;
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String userCard;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@
|
|||
u.id user_id,
|
||||
u.phone user_phone,
|
||||
u.name user_name,
|
||||
u.user_id_card ,
|
||||
d.id department_id,
|
||||
d.`name` department_name,
|
||||
p.post_name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue