Commit daab46fd authored by 刘凡's avatar 刘凡

勘察实例列表倒叙显示,勘察审核完成后同步修改农户状态

parent fbf8e69d
......@@ -83,7 +83,9 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
} else if (item.getSurveyOrNot() == 1) {
item.setSurveyOrNotText("已勘察");
} else if (item.getSurveyOrNot() == 2) {
item.setSurveyOrNotText("提交审核");
item.setSurveyOrNotText("审核中");
} else if (item.getSurveyOrNot() == 3) {
item.setSurveyOrNotText("审核完成");
}
}
......
......@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum;
import com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.WorkDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.DesignInformation;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import com.yeejoin.amos.boot.module.hygf.api.entity.PowerStation;
import com.yeejoin.amos.boot.module.hygf.api.fegin.IdxFeginService;
import com.yeejoin.amos.boot.module.hygf.api.mapper.DesignInformationMapper;
......@@ -55,6 +56,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
DesignInformationMapper designInformationMapper;
@Autowired
DesignInformationServiceImpl designInformationService;
@Autowired
PeasantHouseholdServiceImpl peasantHouseholdService;
private static final String IDX_REQUEST_STATE="200";
private static final String VERIFY_RESULT_YES="0";
......@@ -84,7 +87,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
* 分页查询
*/
public Page<PowerStationDto> queryForPowerStationPage(Page<PowerStationDto> page,@Condition(Operator.like) String powerStationCode,@Condition(Operator.like) String ownersName,String serviceAgent) {
return this.queryForPage(page, null, false,powerStationCode,ownersName,serviceAgent);
return this.queryForPage(page, "rec_date", false,powerStationCode,ownersName,serviceAgent);
}
/**
......@@ -174,6 +177,13 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
powerStation.setFlowTaskId(flowTaskId);
}
powerStationService.savePowerStation(powerStation, flag);
if(!flag){
//更新农户状态
String peasantHouseholdId = powerStation.getPeasantHouseholdId();
PeasantHousehold peasantHousehold = peasantHouseholdService.getBaseMapper().selectById(Long.valueOf(peasantHouseholdId));
peasantHousehold.setSurveyOrNot(3);
peasantHouseholdService.saveOrUpdate(peasantHousehold);
}
}
}catch (Exception e){
throw new BaseException("获取工作流节点失败!","400","获取工作流节点失败!");
......
......@@ -93,7 +93,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
* 分页查询
*/
public Page<SurveyInformationDto> queryForSurveyInformationPage(Page<SurveyInformationDto> page) {
return this.queryForPage(page, null, false);
return this.queryForPage(page, "rec_date", false);
}
/**
......
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