Commit 60a33981 by 何文超

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-webapp-plug into developer
parents cd38893b 8a173552
......@@ -44,9 +44,9 @@ public class ProvincesController {
ServiceResponse<List<ProvinceDTO>> serviceResponse = this.provincesApiService.selectAllProvince();
return RestResponse.success(EntityUtil.changeEntityListByJSON(ProvinceVO.class, serviceResponse.getResult()));
case 2:
ServiceResponse<List<CityDTO>> serviceResponse1 = this.provincesApiService.selectAllCity();
if(serviceResponse1.isSuccess()){
List<CityDTO> list = serviceResponse1.getResult();
ServiceResponse<List<CityDTO>> cityResponse = this.provincesApiService.selectAllCity();
if(cityResponse.isSuccess()){
List<CityDTO> list = cityResponse.getResult();
List<CityVO> resultList = new ArrayList<>();
for(CityDTO cityDTO : list){
if(cityDTO.getProvinceId().equals(id)){
......@@ -56,9 +56,9 @@ public class ProvincesController {
return RestResponse.success(resultList);
}
case 3:
ServiceResponse<List<CountyDTO>> serviceResponse2 = this.provincesApiService.selectAllCounty();
if(serviceResponse2.isSuccess()){
List<CountyDTO> list = serviceResponse2.getResult();
ServiceResponse<List<CountyDTO>> countyResponse = this.provincesApiService.selectAllCounty();
if(countyResponse.isSuccess()){
List<CountyDTO> list = countyResponse.getResult();
List<CountyDTO> resultList = new ArrayList<>();
for(CountyDTO countyDTO : list){
if(countyDTO.getCityId().equals(id)){
......@@ -120,8 +120,8 @@ public class ProvincesController {
}
List<String> result = new ArrayList<>();
ServiceResponse<List<ProvinceDTO>> serviceResponse = this.provincesApiService.selectAllProvince();
ServiceResponse<List<CityDTO>> serviceResponse1 = this.provincesApiService.selectAllCity();
ServiceResponse<List<CountyDTO>> serviceResponse2 = this.provincesApiService.selectAllCounty();
ServiceResponse<List<CityDTO>> cityResponse = this.provincesApiService.selectAllCity();
ServiceResponse<List<CountyDTO>> countyResponse = this.provincesApiService.selectAllCounty();
String[] idArr = ids.split(",");
for(String id : idArr){
if(serviceResponse.isSuccess()){
......@@ -133,8 +133,8 @@ public class ProvincesController {
}
}
}
if(serviceResponse1.isSuccess()){
List<CityDTO> cityDTOList = serviceResponse1.getResult();
if(cityResponse.isSuccess()){
List<CityDTO> cityDTOList = cityResponse.getResult();
for(CityDTO cityDTO : cityDTOList){
if(id.equals(cityDTO.getCityId())){
result.add(cityDTO.getCityName());
......@@ -142,8 +142,8 @@ public class ProvincesController {
}
}
}
if(serviceResponse2.isSuccess()){
List<CountyDTO> countyDTOList = serviceResponse2.getResult();
if(countyResponse.isSuccess()){
List<CountyDTO> countyDTOList = countyResponse.getResult();
for(CountyDTO countyDTO : countyDTOList){
if(id.equals(countyDTO.getCountyId())){
result.add(countyDTO.getCountyName());
......@@ -160,7 +160,7 @@ public class ProvincesController {
@IgnoreLogin
public RestResponse listProvincesCitys(){
ServiceResponse<List<ProvinceDTO>> serviceResponse = this.provincesApiService.selectAllProvince();
ServiceResponse<List<CityDTO>> serviceResponse1 = this.provincesApiService.selectAllCity();
ServiceResponse<List<CityDTO>> citResponse = this.provincesApiService.selectAllCity();
List<JSONObject> result = new ArrayList<>();
if(serviceResponse.isSuccess()){
List<ProvinceDTO> list = serviceResponse.getResult();
......@@ -169,8 +169,8 @@ public class ProvincesController {
JSONObject jsonObject = new JSONObject();
jsonObject.put("provinceId", provinceDTO.getProvinceId());
jsonObject.put("provinceName", provinceDTO.getProvinceName());
if(serviceResponse1.isSuccess()){
List<CityDTO> cityDTOList = serviceResponse1.getResult();
if(citResponse.isSuccess()){
List<CityDTO> cityDTOList = citResponse.getResult();
if(CollectionUtils.isNotEmpty(cityDTOList)){
List<JSONObject> jsonObjectList = new ArrayList<>();
for(CityDTO cityDTO : cityDTOList){
......
......@@ -158,41 +158,41 @@ public class StoreCustomBackImpl implements ScreenBackStrategy {
public String yearMonthDateHourMinuteSecondBack(String value) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return this.dateBack(value, simpleDateFormat, simpleDateFormat1);
SimpleDateFormat simpleDateFormatCommon = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return this.dateBack(value, simpleDateFormat, simpleDateFormatCommon);
}
public String yearMonthDateBack(String value) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd");
return this.dateBack(value, simpleDateFormat, simpleDateFormat1);
SimpleDateFormat simpleDateFormatCommon = new SimpleDateFormat("yyyy-MM-dd");
return this.dateBack(value, simpleDateFormat, simpleDateFormatCommon);
}
public String yearMonth(String value) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMM");
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM");
return this.dateBack(value, simpleDateFormat, simpleDateFormat1);
SimpleDateFormat simpleDateFormatCommon = new SimpleDateFormat("yyyy-MM");
return this.dateBack(value, simpleDateFormat, simpleDateFormatCommon);
}
public String monthDateBack(String value) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMdd");
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("MM-dd");
return this.dateBack(value, simpleDateFormat, simpleDateFormat1);
SimpleDateFormat simpleDateFormatCommon = new SimpleDateFormat("MM-dd");
return this.dateBack(value, simpleDateFormat, simpleDateFormatCommon);
}
public String hourMinuteSecondBack(String value) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HHmmss");
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("HH:mm:ss");
return this.dateBack(value, simpleDateFormat, simpleDateFormat1);
SimpleDateFormat simpleDateFormatCommon = new SimpleDateFormat("HH:mm:ss");
return this.dateBack(value, simpleDateFormat, simpleDateFormatCommon);
}
private String dateBack(String value, SimpleDateFormat simpleDateFormat, SimpleDateFormat simpleDateFormat1) throws ParseException {
private String dateBack(String value, SimpleDateFormat simpleDateFormat, SimpleDateFormat simpleDateFormatCommon) throws ParseException {
String[] valueArr = value.split(" ");
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("【").append(simpleDateFormat1.format(simpleDateFormat.parse(valueArr[0]))).append("】").append(" ");
stringBuilder.append("【").append(simpleDateFormatCommon.format(simpleDateFormat.parse(valueArr[0]))).append("】").append(" ");
if (valueArr.length > 1) {
stringBuilder.append("至");
stringBuilder.append("【").append(simpleDateFormat1.format(simpleDateFormat.parse(valueArr[1]))).append("】").append(" ");
stringBuilder.append("【").append(simpleDateFormatCommon.format(simpleDateFormat.parse(valueArr[1]))).append("】").append(" ");
}
return stringBuilder.toString();
}
......
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