Commit 38caf583 authored by suhuiguang's avatar suhuiguang

1.修改自测缺陷

parent ba01715e
package com.yeejoin.amos.fas.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
......@@ -39,7 +42,8 @@ public class FireEquipment extends BasicEntity {
@Column(name="create_by")
private String createBy;
@Temporal(TemporalType.DATE)
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@Column(name="effective_date")
private Date effectiveDate;
......@@ -66,7 +70,8 @@ public class FireEquipment extends BasicEntity {
@Column(name="production_area")
private String productionArea;
@Temporal(TemporalType.DATE)
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@Column(name="production_date")
private Date productionDate;
......
......@@ -90,7 +90,6 @@ public class FireSourceController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "查询消防车", notes = "查询消防车")
@RequestMapping(value = "/fire-car/det/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryFireCar(@ApiParam(value = "查询条件", required = true) @PathVariable Long id) {
FireCarDetailVo car = fireCarService.findFireCarById(getToken(),getProduct(),getAppKey(),id);
return CommonResponseUtil.success(car);
}
......
......@@ -117,7 +117,7 @@ public class FireCarServiceImpl implements IFireCarService {
public FireCarDetailVo findFireCarById(String toke,String product,String appKey,Long truckId) {
FireCarDetailVo carVo = fireCarMapper.getFireCarDetailById(truckId);
DepartmentModel departmentModel= remoteSecurityService.getDepartmentByDeptId(toke, product, appKey, carVo.getDeptId());
carVo.setDepartmentName(departmentModel.getDepartmentName());
carVo.setDepartmentName(departmentModel != null ? departmentModel.getDepartmentName() : "");
return carVo;
}
......
......@@ -53,6 +53,7 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
return fireCar;
}
@Override
public String[] deletePoint(String[] idArray) throws Exception {
for (String id : idArray) {
Optional<FireEquipmentPoint> fireEquipmentPoint1 = fireEquipmentPointDao.findById(Long.parseLong(id));
......@@ -95,8 +96,11 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
if (total.equals(0L)) {
return CommonResponseUtil.success(new PageImpl<>(Lists.newArrayList(), null, total));
}
int pageNumber = map.get("pageNumber") != null ? Integer.parseInt(map.get("pageNumber").toString()) : 0;
int pageSize = map.get("pageSize") != null ? Integer.parseInt(map.get("pageSize").toString()) : 0;
CommonPageable commonPageable = new CommonPageable(pageNumber, pageSize);
List<FireEquipmentPointEntity> list = fireEquipPointMapper.listByMap(map);
return CommonResponseUtil.success(new PageImpl<>(list, null, total));
return CommonResponseUtil.success(new PageImpl<>(list, commonPageable, total));
}
@Override
......
......@@ -429,8 +429,6 @@
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
and
fire_equipment_id = 0
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment