|
@@ -12,6 +12,7 @@ import com.technology.huahai.common.exception.CsmException;
|
|
|
import com.technology.huahai.common.utils.JsonUtils;
|
|
|
import com.technology.huahai.common.utils.RedisUtils;
|
|
|
import com.technology.huahai.common.utils.file.FileUtils;
|
|
|
+import com.technology.huahai.common.utils.uuid.IdUtils;
|
|
|
import com.technology.huahai.web.dto.ScanRecordDto;
|
|
|
import com.technology.huahai.web.vo.*;
|
|
|
import com.technology.huahai.web.mapper.coremapper.CsmMapper;
|
|
@@ -131,12 +132,14 @@ public class CsmServiceImpl implements CsmService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public AjaxResult saveScanCodeRecord(ScanCodeRecordVo scanCodeRecordVo) {
|
|
|
//本地留存一份只保留扫码时间及姓名及场所码id
|
|
|
csmMapper.saveScanRecord(scanCodeRecordVo);
|
|
|
AjaxResult ajaxResult = zxService.cmsEmsInterfaceOperation(scanCodeRecordVo,"saveScanRecord");
|
|
|
if(0!=ajaxResult.getCode()){
|
|
|
- throw new CsmException(ajaxResult.getMsg());
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return ajaxResult;
|
|
|
}else{
|
|
|
return ajaxResult;
|
|
|
}
|
|
@@ -192,12 +195,14 @@ public class CsmServiceImpl implements CsmService {
|
|
|
}else{
|
|
|
tableDataInfo = zxService.cmsEmsInterfaceQueryList(technologyQueryVo,"getDdSelect");
|
|
|
List<TechnologyListResultVo> rows = tableDataInfo.getRows();
|
|
|
- for(TechnologyListResultVo technologyListResultVo:rows){
|
|
|
+ List<TechnologyListResultVo> rowList = JsonUtils.parseJson(JsonUtils.writeValueAsString(rows),new TypeReference<List<TechnologyListResultVo>>() {});
|
|
|
+ for(TechnologyListResultVo technologyListResultVo:rowList){
|
|
|
Object labelName = redisUtils.get(RedisKeyConstant.dictKey+"SCENARIO_LABEL"+"::"+technologyListResultVo.getLabelId());
|
|
|
if(labelName!=null){
|
|
|
technologyListResultVo.setLabelName(labelName.toString());
|
|
|
}
|
|
|
}
|
|
|
+ tableDataInfo.setRows(rowList);
|
|
|
}
|
|
|
return tableDataInfo;
|
|
|
}
|
|
@@ -271,13 +276,35 @@ public class CsmServiceImpl implements CsmService {
|
|
|
ajaxResult = response.getBody();
|
|
|
}else{
|
|
|
ajaxResult = zxService.cmsEmsInterfaceOperation(queryAdressVo,"getAdressByBzdzbm");
|
|
|
+ if(0==ajaxResult.getCode()){
|
|
|
+ List<TechnologyListResultVo> rowList = JsonUtils.parseJson(JsonUtils.writeValueAsString(ajaxResult.getData()),new TypeReference<List<TechnologyListResultVo>>() {});
|
|
|
+ for(TechnologyListResultVo technologyListResultVo:rowList){
|
|
|
+ Object labelName = redisUtils.get(RedisKeyConstant.dictKey+"SCENARIO_LABEL"+"::"+technologyListResultVo.getLabelId());
|
|
|
+ if(labelName!=null){
|
|
|
+ technologyListResultVo.setLabelName(labelName.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ajaxResult.setData(rowList);
|
|
|
+ }
|
|
|
}
|
|
|
return ajaxResult;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public AjaxResult getAddressByBzdzbm(QueryAddressByBzdzbmVo queryAdressByDzVo) {
|
|
|
- return zxService.cmsEmsInterfaceOperation(queryAdressByDzVo,"getAddressByBzdzbm");
|
|
|
+
|
|
|
+ AjaxResult ajaxResult = zxService.cmsEmsInterfaceOperation(queryAdressByDzVo,"getAddressByBzdzbm");
|
|
|
+ if(0==ajaxResult.getCode()){
|
|
|
+ List<TechnologyListResultVo> rowList = JsonUtils.parseJson(JsonUtils.writeValueAsString(ajaxResult.getData()),new TypeReference<List<TechnologyListResultVo>>() {});
|
|
|
+ for(TechnologyListResultVo technologyListResultVo:rowList){
|
|
|
+ Object labelName = redisUtils.get(RedisKeyConstant.dictKey+"SCENARIO_LABEL"+"::"+technologyListResultVo.getLabelId());
|
|
|
+ if(labelName!=null){
|
|
|
+ technologyListResultVo.setLabelName(labelName.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ajaxResult.setData(rowList);
|
|
|
+ }
|
|
|
+ return ajaxResult;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -286,6 +313,16 @@ public class CsmServiceImpl implements CsmService {
|
|
|
return scanRecordDto;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public AjaxResult cancellationCsm(CancellationCsmDto cancellationCsmDto) {
|
|
|
+ return zxService.cmsEmsInterfaceOperation(cancellationCsmDto,"cancellationCsm");
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public AjaxResult csmAuthentication(CsmAuthenticationVo csmAuthenticationVo) {
|
|
|
+ return zxService.cmsEmsInterfaceOperation(csmAuthenticationVo,"csmAuthentication");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public String getAmapRegeo(GdQueryDzVo gdQueryDzVo) {
|