Commit 1ff823de authored by chenhao's avatar chenhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents b51b4771 c69b2d49
package com.yeejoin.amos.boot.module.command.api.dto;
import org.springframework.web.bind.annotation.PathVariable;
/**
* @description:
* @author: tw
* @createDate: 2021/10/20
*/
public class CarTaskDto {
private Long carid;
private Long alertCalledId;
private String code;
private int type;
private String remarks;
public Long getCarid() {
return carid;
}
public void setCarid(Long carid) {
this.carid = carid;
}
public Long getAlertCalledId() {
return alertCalledId;
}
public void setAlertCalledId(Long alertCalledId) {
this.alertCalledId = alertCalledId;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
}
...@@ -46,6 +46,10 @@ public class PowerTransferCompanyResources extends BaseEntity { ...@@ -46,6 +46,10 @@ public class PowerTransferCompanyResources extends BaseEntity {
@ApiModelProperty(value = "车辆任务状态") @ApiModelProperty(value = "车辆任务状态")
private String carStatus; private String carStatus;
@ApiModelProperty(value = "任务备注")
private String remarks;
@ApiModelProperty(value = "任务状态") @ApiModelProperty(value = "任务状态")
@TableField(exist = false) @TableField(exist = false)
private String statusName; private String statusName;
......
...@@ -18,6 +18,6 @@ public interface IPowerTransferCompanyResourcesService { ...@@ -18,6 +18,6 @@ public interface IPowerTransferCompanyResourcesService {
PowerTransferCompanyResources getByAlertCalledIdCarId(Long alertCalledId,Long carId); PowerTransferCompanyResources getByAlertCalledIdCarId(Long alertCalledId,Long carId);
void updatePowerTransferCompanyResourcesService(Long alertCalledId,Long carId,String code,int type); void updatePowerTransferCompanyResourcesService(Long alertCalledId,Long carId,String code,int type,String remarks);
} }
...@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.biz.common.enums.HomePageEnum; ...@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.biz.common.enums.HomePageEnum;
import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService; import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils; import com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils;
import com.yeejoin.amos.boot.module.command.api.dao.SeismometeorologyDtoDao; import com.yeejoin.amos.boot.module.command.api.dao.SeismometeorologyDtoDao;
import com.yeejoin.amos.boot.module.command.api.dto.CarTaskDto;
import com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto; import com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto;
import com.yeejoin.amos.boot.module.command.biz.service.impl.RemoteSecurityService; import com.yeejoin.amos.boot.module.command.biz.service.impl.RemoteSecurityService;
import com.yeejoin.amos.boot.module.common.api.dto.*; import com.yeejoin.amos.boot.module.common.api.dto.*;
...@@ -1274,14 +1275,16 @@ public class CommandController extends BaseController { ...@@ -1274,14 +1275,16 @@ public class CommandController extends BaseController {
return ResponseHelper.buildResponse(powerTransferCompanyResources); return ResponseHelper.buildResponse(powerTransferCompanyResources);
} }
@TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "updatePowerTransferCompanyResourcesService/{carid}/{alertCalledId}/{code}/{type}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "updatePowerTransferCompanyResourcesService", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
@ApiOperation(httpMethod = "GET", value = "修改任务,车辆状态", notes = "修改任务,车辆状态") @ApiOperation(httpMethod = "POST", value = "修改任务,车辆状态", notes = "修改任务,车辆状态")
public ResponseModel<Object> updatePowerTransferCompanyResourcesService(@PathVariable Long carid, public ResponseModel<Object> updatePowerTransferCompanyResourcesService(@RequestBody CarTaskDto carTaskDto) {
@PathVariable Long alertCalledId,
@PathVariable String code,
@PathVariable int type) {
//获取正在进行的灾情 //获取正在进行的灾情
powerTransferCompanyResourcesService.updatePowerTransferCompanyResourcesService(alertCalledId,carid,code,type); powerTransferCompanyResourcesService.updatePowerTransferCompanyResourcesService(
carTaskDto.getAlertCalledId(),
carTaskDto.getCarid(),
carTaskDto.getCode(),
carTaskDto.getType(),
carTaskDto.getRemarks());
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
......
...@@ -51,19 +51,18 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT ...@@ -51,19 +51,18 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
return powerTransferCompanyResourcesMapper.getByAlertCalledIdCarId(alertCalledId,carId); return powerTransferCompanyResourcesMapper.getByAlertCalledIdCarId(alertCalledId,carId);
} }
@Override @Override
@Transactional @Transactional
public void updatePowerTransferCompanyResourcesService(Long alertCalledId, Long carId, String code,int type) { public void updatePowerTransferCompanyResourcesService(Long alertCalledId, Long carId, String code,int type , String remarks) {
PowerTransferCompanyResources powerTransferCompanyResources= powerTransferCompanyResourcesMapper.getByAlertCalledIdCarId(alertCalledId,carId); PowerTransferCompanyResources powerTransferCompanyResources= powerTransferCompanyResourcesMapper.getByAlertCalledIdCarId(alertCalledId,carId);
try { try {
if(1==type){ powerTransferCompanyResources.setCarStatus(code);
powerTransferCompanyResources.setCarStatus(code); powerTransferCompanyResources.setRemarks(remarks);
powerTransferCompanyResourcesMapper.updateById(powerTransferCompanyResources); powerTransferCompanyResourcesMapper.updateById(powerTransferCompanyResources);
}else{ if(type==2){
powerTransferCompanyResources.setStatus(code);
powerTransferCompanyResourcesMapper.updateById(powerTransferCompanyResources);
List<Object> carStatusInfoDtoList = new ArrayList(); List<Object> carStatusInfoDtoList = new ArrayList();
//修改装备信息 //修改装备信息
CarStatusInfoDto carStatusInfo = new CarStatusInfoDto(); CarStatusInfoDto carStatusInfo = new CarStatusInfoDto();
......
...@@ -1895,5 +1895,19 @@ ...@@ -1895,5 +1895,19 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="tw" id="2021-10-20-2">
<preConditions onFail="MARK_RAN">
<tableExists tableName="jc_power_transfer_company_resources"/>
</preConditions>
<comment>增加车辆状态</comment>
<sql>
ALTER TABLE `jc_power_transfer_company_resources` add remarks varchar(5000) DEFAULT NULL COMMENT '任务备注'
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
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