Commit 0bb8c2eb authored by 赵啸非's avatar 赵啸非

修改配置文件

parent 88b46f98
...@@ -72,3 +72,8 @@ CREATE TABLE `mortals_ent_life_matter_sub` ...@@ -72,3 +72,8 @@ CREATE TABLE `mortals_ent_life_matter_sub`
) ENGINE = InnoDB ) ENGINE = InnoDB
CHARACTER SET = utf8 CHARACTER SET = utf8
COLLATE = utf8_general_ci COMMENT = '企业周期事项子表'; COLLATE = utf8_general_ci COMMENT = '企业周期事项子表';
ALTER TABLE mortals_sys_matter ADD COLUMN `areaName` varchar(255) COMMENT '区域名称';
ALTER TABLE mortals_sys_matter ADD COLUMN `areaLevel` tinyint(2) COMMENT '区域等级(1.省,2.地市州,3.区县,4.街道,5.社区)';
...@@ -221,14 +221,10 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE ...@@ -221,14 +221,10 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
} }
AreaEntity areaEntity = this.selectOne(new AreaQuery().pid(rootId)); AreaEntity areaEntity = this.selectOne(new AreaQuery().pid(rootId));
AreaTreeSelect areaTreeSelect = new AreaTreeSelect(areaEntity); AreaTreeSelect areaTreeSelect = new AreaTreeSelect(areaEntity);
rebuildList(areaTreeSelect); rebuildList(areaTreeSelect);
List<AreaTreeSelect> areaTreeSelectList = new ArrayList<>(); List<AreaTreeSelect> areaTreeSelectList = new ArrayList<>();
areaTreeSelectList.add(areaTreeSelect); areaTreeSelectList.add(areaTreeSelect);
return areaTreeSelectList; return areaTreeSelectList;
} }
......
...@@ -74,32 +74,6 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic ...@@ -74,32 +74,6 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic
} }
/**
* 获取站点下拉树列表
*/
@PostMapping("authAreaTree")
public String authAreaTree() {
Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc();
int code = VALUE_RESULT_SUCCESS;
try {
List<String> areaCodeList = Arrays.asList(this.getContext().getUser().getAreaCodes().split(","));
AreaQuery areaQuery = new AreaQuery();
areaQuery.setAreaCodeList(areaCodeList);
List<AreaEntity> list = this.service.find(areaQuery);
List<AreaTreeSelect> treeSelects = this.service.buildCustomAreaTreeSelect(list);
model.put(KEY_RESULT_DATA, treeSelects);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_DATA, model);
ret.put(KEY_RESULT_CODE, code);
return ret.toJSONString();
}
/** /**
* 根据parentId查询子信息 * 根据parentId查询子信息
......
...@@ -11,6 +11,8 @@ import com.mortals.xhx.base.framework.config.InterceptorConfig; ...@@ -11,6 +11,8 @@ import com.mortals.xhx.base.framework.config.InterceptorConfig;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.service.AreaService;
import com.mortals.xhx.module.base.service.BaseAreaService; import com.mortals.xhx.module.base.service.BaseAreaService;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
...@@ -77,20 +79,26 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -77,20 +79,26 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
@Autowired @Autowired
private BaseAreaService baseAreaService; private BaseAreaService baseAreaService;
@Autowired
private AreaService areaService;
@Override @Override
protected void saveBefore(MatterEntity entity, Context context) throws AppException { protected void saveBefore(MatterEntity entity, Context context) throws AppException {
//判断如果是自定义事项,需要更新区域编码 //判断如果是自定义事项,需要更新区域编码
if (SourceEnum.自定义.getValue().equals(entity.getSource())) {
if (!ObjectUtils.isEmpty(entity.getSiteId())) {
SiteEntity siteEntity = siteService.get(entity.getSiteId(), context);
entity.setAreaCode(siteEntity.getAreaCode());
DeptEntity extCache = deptService.getExtCache(entity.getDeptCode());
entity.setDeptName(extCache == null ? "" : extCache.getName());
}
DeptEntity extCache = deptService.getExtCache(entity.getDeptCode());
entity.setDeptName(extCache == null ? "" : extCache.getName());
if (!ObjectUtils.isEmpty(entity.getAreaCode())) {
AreaEntity areaEntity = areaService.getExtCache(entity.getAreaCode());
entity.setAreaName(areaEntity == null ? "" : areaEntity.getName());
entity.setAreaLevel(areaEntity == null ? 0 : areaEntity.getAreaLevel());
} }
super.saveBefore(entity, context); super.saveBefore(entity, context);
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"baseUrl": "http://192.168.0.98:11078/bill", "baseUrl": "http://192.168.0.98:11078/bill",
"baseLogin": "http://192.168.0.98:11078/base" "baseLogin": "http://192.168.0.98:11078/base"
}, },
"product": { "product": {
"baseUrl": "http://192.168.0.250:11089/entservice" "baseUrl": "http://192.168.0.250:11089/entservice"
} }
}
...@@ -5,7 +5,7 @@ Content-Type: application/json ...@@ -5,7 +5,7 @@ Content-Type: application/json
{ {
"loginName":"admin", "loginName":"admin",
"password":"xhxADMIN8@a", "password":"admin",
"securityCode":"admin" "securityCode":"admin"
} }
...@@ -72,7 +72,7 @@ POST {{baseUrl}}/base/area/genSubAreaByAreaName ...@@ -72,7 +72,7 @@ POST {{baseUrl}}/base/area/genSubAreaByAreaName
Content-Type: application/json Content-Type: application/json
{ {
"areaCode": "511124000000" "areaCode": "511700000000"
} }
......
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