Commit 05b9f110 authored by 赵啸非's avatar 赵啸非

修改根据业务查询部门逻辑

parent 304cff12
...@@ -9,9 +9,19 @@ import com.mortals.framework.model.Context; ...@@ -9,9 +9,19 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseJsonBodyController; import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.model.vo.MatterInfo; import com.mortals.xhx.module.matter.model.vo.MatterInfo;
import com.mortals.xhx.module.matter.service.MatterService; import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.model.SiteMatterQuery;
import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.window.model.*;
import com.mortals.xhx.module.window.service.WindowBusinessService;
import com.mortals.xhx.module.window.service.WindowMatterService;
import com.mortals.xhx.module.window.service.WindowService;
import lombok.extern.apachecommons.CommonsLog; import lombok.extern.apachecommons.CommonsLog;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
...@@ -30,6 +40,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -30,6 +40,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -47,6 +58,16 @@ import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY; ...@@ -47,6 +58,16 @@ import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY;
@Slf4j @Slf4j
public class DemoWebApiController { public class DemoWebApiController {
@Autowired
private WindowService windowService;
@Autowired
private SiteMatterService siteMatterService;
@Autowired
private WindowMatterService windowMatterService;
@Autowired
private DeptService deptService;
@PostMapping(value = "testGov") @PostMapping(value = "testGov")
@UnAuth @UnAuth
public Rest<String> testGov(@RequestBody MatterQuery query) { public Rest<String> testGov(@RequestBody MatterQuery query) {
...@@ -83,6 +104,50 @@ public class DemoWebApiController { ...@@ -83,6 +104,50 @@ public class DemoWebApiController {
} }
@PostMapping(value = "reDepts")
@UnAuth
public Rest<String> reDepts() {
log.info("更新部门与设备关联");
//更新窗口部门
List<WindowEntity> windowEntities = windowService.find(new WindowQuery());
for (WindowEntity windowEntity : windowEntities) {
String deptName = windowEntity.getDeptName();
//根据部门名称查询部门
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().name(deptName));
if (!ObjectUtils.isEmpty(deptEntity)) {
if (deptEntity.getId() != windowEntity.getDeptId()) {
windowEntity.setDeptId(deptEntity.getId());
windowService.update(windowEntity);
}
}
}
//更新窗口事项中的部门id
List<WindowMatterEntity> windowMatterEntities = windowMatterService.find(new WindowMatterQuery());
for (WindowMatterEntity windowMatterEntity : windowMatterEntities) {
DeptEntity extCache = deptService.getExtCache(windowMatterEntity.getDeptCode());
if (!ObjectUtils.isEmpty(extCache)) {
if (extCache.getId() != windowMatterEntity.getDeptId()) {
windowMatterEntity.setDeptId(extCache.getId());
windowMatterService.update(windowMatterEntity);
}
}
}
List<SiteMatterEntity> siteMatterEntities = siteMatterService.find(new SiteMatterQuery());
for (SiteMatterEntity siteMatterEntity : siteMatterEntities) {
DeptEntity extCache = deptService.getExtCache(siteMatterEntity.getDeptCode());
if (!ObjectUtils.isEmpty(extCache)) {
if (extCache.getId() != siteMatterEntity.getDeptId()) {
siteMatterEntity.setDeptId(extCache.getId());
siteMatterService.update(siteMatterEntity);
}
}
}
return Rest.ok();
}
public static void main(String[] args) { public static void main(String[] args) {
HttpClient http = null; HttpClient http = null;
CookieStore httpCookieStore = new BasicCookieStore(); CookieStore httpCookieStore = new BasicCookieStore();
...@@ -96,9 +161,9 @@ public class DemoWebApiController { ...@@ -96,9 +161,9 @@ public class DemoWebApiController {
byte[] data = EntityUtils.toByteArray(httpResponse.getEntity()); byte[] data = EntityUtils.toByteArray(httpResponse.getEntity());
String encode = Base64.encode(data); String encode = Base64.encode(data);
log.info("encode64:{}",encode); log.info("encode64:{}", encode);
// String resp = com.mortals.framework.util.HttpUtil.processMultipartResponse(httpResponse); // String resp = com.mortals.framework.util.HttpUtil.processMultipartResponse(httpResponse);
// log.info("resp:{}", resp); // log.info("resp:{}", resp);
//String content = EntityUtils.toString(entity, charset); //String content = EntityUtils.toString(entity, charset);
//httpResponse.getEntity() //httpResponse.getEntity()
//httpResponse.toString() //httpResponse.toString()
...@@ -107,7 +172,7 @@ public class DemoWebApiController { ...@@ -107,7 +172,7 @@ public class DemoWebApiController {
} }
/* check cookies */ /* check cookies */
String cookieStr = Arrays.asList(httpCookieStore.getCookies()).stream().map(item -> JSON.toJSONString(item)).collect(Collectors.joining("|")); String cookieStr = Arrays.asList(httpCookieStore.getCookies()).stream().map(item -> JSON.toJSONString(item)).collect(Collectors.joining("|"));
// log.info("cookies:{}", cookieStr); // log.info("cookies:{}", cookieStr);
} }
......
...@@ -69,6 +69,21 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -69,6 +69,21 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
return data.getDeptNumber(); return data.getDeptNumber();
} }
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void validData(DeptEntity entity, Context context) throws AppException {
super.validData(entity, context);
//校验部门编码是否重复
DeptEntity extCache = this.getExtCache(entity.getDeptNumber());
if (!ObjectUtils.isEmpty(extCache) && SourceEnum.自定义.getValue() == entity.getSource()) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
}
}
@Override @Override
public void syncDept(String areaCode, Context context) { public void syncDept(String areaCode, Context context) {
List<MattersDeptEntity> deptList = mattersDeptService.find(new MattersDeptQuery()); List<MattersDeptEntity> deptList = mattersDeptService.find(new MattersDeptQuery());
...@@ -96,22 +111,21 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -96,22 +111,21 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
public Rest<String> syncDeptBySiteId(SiteEntity siteEntity, Context context) { public Rest<String> syncDeptBySiteId(SiteEntity siteEntity, Context context) {
String url = GlobalSysInfo.getParamValue(Constant.GOV_DEPT_URL, "http://www.sczwfw.gov.cn/jiq/front/channel/deptSwitch"); String url = GlobalSysInfo.getParamValue(Constant.GOV_DEPT_URL, "http://www.sczwfw.gov.cn/jiq/front/channel/deptSwitch");
Long siteId = siteEntity.getId(); Long siteId = siteEntity.getId();
String areaCode = siteEntity.getAreaCode(); String areaCode = siteEntity.getAreaCode();
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
params.put("areaCode", areaCode); params.put("areaCode", areaCode);
Rest<Map<String, String>> rest = MatterHtmlParseUtil.syncDeptBySiteId(params, url); Rest<Map<String, String>> rest = MatterHtmlParseUtil.syncDeptBySiteId(params, url);
if (rest.getCode() == YesNoEnum.YES.getValue() && rest.getData().keySet().size() > 0) { if (rest.getCode() == YesNoEnum.YES.getValue() && rest.getData().keySet().size() > 0) {
//删除部门中属于政务部门的 //删除部门中属于政务部门的
deptService.deleteGovBySiteId(siteId, context); // deptService.deleteGovBySiteId(siteId, context);
int sortN = 1; int sortN = 1;
Map<String, String> data = rest.getData(); Map<String, String> data = rest.getData();
for (Map.Entry<String, String> item : data.entrySet()) { for (Map.Entry<String, String> item : data.entrySet()) {
String deptCode = item.getKey(); String deptCode = item.getKey();
String deptName = item.getValue(); String deptName = item.getValue();
int count = deptService.count(new DeptQuery().siteId(siteId).deptNumber(deptCode), context); DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
if (count == 0) { if (ObjectUtils.isEmpty(deptEntity)) {
DeptEntity deptEntity = new DeptEntity(); deptEntity = new DeptEntity();
deptEntity.initAttrValue(); deptEntity.initAttrValue();
deptEntity.setDeptNumber(deptCode); deptEntity.setDeptNumber(deptCode);
deptEntity.setSiteId(siteId); deptEntity.setSiteId(siteId);
...@@ -121,6 +135,13 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -121,6 +135,13 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
deptEntity.setCreateTime(new Date()); deptEntity.setCreateTime(new Date());
deptEntity.setCreateUserId(1L); deptEntity.setCreateUserId(1L);
deptService.save(deptEntity, context); deptService.save(deptEntity, context);
} else {
//更新
deptEntity.setName(deptName);
deptEntity.setSource(SourceEnum.政务网.getValue());
deptEntity.setUpdateTime(new Date());
deptEntity.setUpdateUserId(1L);
deptService.update(deptEntity, context);
} }
sortN++; sortN++;
} }
...@@ -136,7 +157,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -136,7 +157,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
List<DeptVo> businessDeptList = this.dao.getBusinessByDept(deptQuery); List<DeptVo> businessDeptList = this.dao.getBusinessByDept(deptQuery);
Map<String, List<DeptVo>> collect = businessDeptList.parallelStream().collect(Collectors.groupingBy(x -> x.getId().toString())); Map<String, List<DeptVo>> collect = businessDeptList.parallelStream().collect(Collectors.groupingBy(x -> x.getId().toString()));
return Rest.ok(collect); return Rest.ok(collect);
/* //查询部门窗口 /* //查询部门窗口
......
...@@ -150,4 +150,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -150,4 +150,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
} }
} }
\ No newline at end of file
...@@ -36,6 +36,8 @@ import com.mortals.xhx.module.site.service.SiteMatterService; ...@@ -36,6 +36,8 @@ import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import com.mortals.xhx.module.site.service.SiteThemeMatterService; import com.mortals.xhx.module.site.service.SiteThemeMatterService;
import com.mortals.xhx.module.site.service.SiteThemeService; import com.mortals.xhx.module.site.service.SiteThemeService;
import com.mortals.xhx.module.window.model.WindowMatterQuery;
import com.mortals.xhx.module.window.service.WindowMatterService;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
...@@ -92,6 +94,8 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -92,6 +94,8 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
private SiteThemeMatterService siteThemeMatterService; private SiteThemeMatterService siteThemeMatterService;
@Autowired @Autowired
private SiteThemeService siteThemeService; private SiteThemeService siteThemeService;
@Autowired
private WindowMatterService windowMatterService;
@Override @Override
...@@ -102,7 +106,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -102,7 +106,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
SiteEntity siteEntity = siteService.get(entity.getSiteId(), context); SiteEntity siteEntity = siteService.get(entity.getSiteId(), context);
entity.setAreaCode(siteEntity.getAreaCode()); entity.setAreaCode(siteEntity.getAreaCode());
DeptEntity extCache = deptService.getExtCache(entity.getDeptCode()); DeptEntity extCache = deptService.getExtCache(entity.getDeptCode());
entity.setDeptName(extCache==null?"":extCache.getName()); entity.setDeptName(extCache == null ? "" : extCache.getName());
} }
} }
...@@ -143,8 +147,34 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -143,8 +147,34 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
SiteEntity siteEntity = siteService.get(entity.getSiteId(), context); SiteEntity siteEntity = siteService.get(entity.getSiteId(), context);
entity.setAreaCode(siteEntity.getAreaCode()); entity.setAreaCode(siteEntity.getAreaCode());
DeptEntity extCache = deptService.getExtCache(entity.getDeptCode()); DeptEntity extCache = deptService.getExtCache(entity.getDeptCode());
entity.setDeptName(extCache==null?"":extCache.getName()); entity.setDeptName(extCache == null ? "" : extCache.getName());
}
MatterEntity beforeMatterEntity = this.get(entity.getId(), context);
//如果部门切换了 级联修改关联的其它项
if (!ObjectUtils.isEmpty(entity.getDeptCode())) {
if (!entity.getDeptCode().equals(beforeMatterEntity.getDeptCode())) {
//更新站点事项关联项
SiteMatterQuery condition = new SiteMatterQuery();
condition.setMatterId(entity.getId());
SiteMatterQuery siteMatterQuery = new SiteMatterQuery();
DeptEntity extCache = deptService.getExtCache(entity.getDeptCode());
siteMatterQuery.setDeptId(extCache == null ? 0L : extCache.getId());
siteMatterQuery.setDeptCode(entity.getDeptCode());
siteMatterQuery.setDeptName(entity.getDeptName());
siteMatterService.updateBatch(siteMatterQuery, condition, context);
//更新站点窗口事项关联项
WindowMatterQuery winCondition = new WindowMatterQuery();
winCondition.setSiteMatterId(entity.getId());
WindowMatterQuery windowMatterQuery = new WindowMatterQuery();
windowMatterQuery.setDeptId(extCache == null ? 0L : extCache.getId());
windowMatterQuery.setDeptCode(entity.getDeptCode());
windowMatterQuery.setDeptName(entity.getDeptName());
windowMatterService.updateBatch(windowMatterQuery, winCondition, context);
}
} }
} }
super.updateBefore(entity, context); super.updateBefore(entity, context);
} }
...@@ -997,7 +1027,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -997,7 +1027,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
//更新部门信息 //更新部门信息
DeptEntity extCache = deptService.getExtCache(matterEntity.getDeptCode()); DeptEntity extCache = deptService.getExtCache(matterEntity.getDeptCode());
matterEntity.setDeptName(extCache==null?"":extCache.getName()); matterEntity.setDeptName(extCache == null ? "" : extCache.getName());
/* if(!ObjectUtils.isEmpty(matterEntity.getDeptCode())&&ObjectUtils.isEmpty(matterEntity.getDeptName())){ /* if(!ObjectUtils.isEmpty(matterEntity.getDeptCode())&&ObjectUtils.isEmpty(matterEntity.getDeptName())){
DeptEntity extCache = deptService.getExtCache(matterEntity.getDeptCode()); DeptEntity extCache = deptService.getExtCache(matterEntity.getDeptCode());
......
package com.mortals.xhx.module.site.service.impl; package com.mortals.xhx.module.site.service.impl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
...@@ -17,12 +18,12 @@ import java.util.List; ...@@ -17,12 +18,12 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* SiteMatterService * SiteMatterService
* 站点事项 service实现 * 站点事项 service实现
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-01-12
*/ */
@Service("siteMatterService") @Service("siteMatterService")
public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao, SiteMatterEntity, Long> implements SiteMatterService { public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao, SiteMatterEntity, Long> implements SiteMatterService {
...@@ -31,10 +32,10 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao ...@@ -31,10 +32,10 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
@Override @Override
protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException { protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException {
list.forEach(item->{ list.forEach(item -> {
if(!ObjectUtils.isEmpty(item.getMatterId())){ if (!ObjectUtils.isEmpty(item.getMatterId())) {
MatterEntity matterEntity = matterService.get(item.getMatterId()); MatterEntity matterEntity = matterService.get(item.getMatterId());
if(!ObjectUtils.isEmpty(matterEntity)){ if (!ObjectUtils.isEmpty(matterEntity)) {
item.setBelongDept(matterEntity.getBelongDept()); item.setBelongDept(matterEntity.getBelongDept());
item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum()); item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum());
item.setOnlineToTheSceneNum(matterEntity.getOnlineToTheSceneNum()); item.setOnlineToTheSceneNum(matterEntity.getOnlineToTheSceneNum());
...@@ -45,6 +46,26 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao ...@@ -45,6 +46,26 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
super.findAfter(params, pageInfo, context, list); super.findAfter(params, pageInfo, context, list);
} }
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void updateBefore(SiteMatterEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
SiteMatterEntity beforeSiteMatterEntity = this.get(entity.getId(), context);
if (!beforeSiteMatterEntity.getDeptId().equals(entity.getDeptId())) {
//更新事项中的部门编号
MatterEntity matterEntity = matterService.get(entity.getMatterId(), context);
if (!ObjectUtils.isEmpty(matterEntity)) {
matterEntity.setDeptCode(entity.getDeptCode());
matterEntity.setDeptName(entity.getDeptName());
matterService.update(matterEntity, context);
}
}
}
@Override @Override
public void deleteBysiteIdAndSource(Long siteId, Integer source, Context context) { public void deleteBysiteIdAndSource(Long siteId, Integer source, Context context) {
Map<String, Object> condition = new HashMap<>(); Map<String, Object> condition = new HashMap<>();
......
...@@ -6,13 +6,17 @@ import com.mortals.framework.ap.GlobalSysInfo; ...@@ -6,13 +6,17 @@ import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.util.HttpUtil; import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.window.model.WindowMatterQuery; import com.mortals.xhx.module.window.model.WindowMatterQuery;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.window.dao.WindowMatterDao; import com.mortals.xhx.module.window.dao.WindowMatterDao;
import com.mortals.xhx.module.window.model.WindowMatterEntity; import com.mortals.xhx.module.window.model.WindowMatterEntity;
import com.mortals.xhx.module.window.service.WindowMatterService; import com.mortals.xhx.module.window.service.WindowMatterService;
import org.springframework.util.ObjectUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
...@@ -31,6 +35,10 @@ import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_PHP_HTTP_URL; ...@@ -31,6 +35,10 @@ import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_PHP_HTTP_URL;
@Service("windowMatterService") @Service("windowMatterService")
@Slf4j @Slf4j
public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatterDao, WindowMatterEntity, Long> implements WindowMatterService { public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatterDao, WindowMatterEntity, Long> implements WindowMatterService {
@Autowired
private MatterService matterService;
/** /**
* @param entity * @param entity
* @param context * @param context
...@@ -90,6 +98,27 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte ...@@ -90,6 +98,27 @@ public class WindowMatterServiceImpl extends AbstractCRUDServiceImpl<WindowMatte
} }
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void updateBefore(WindowMatterEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
WindowMatterEntity beforeWindowMatterEntity = this.get(entity.getId(), context);
if(!beforeWindowMatterEntity.getDeptCode().equals(entity.getDeptCode())){
//更新
MatterEntity matterEntity = matterService.get(entity.getSiteMatterId());
if(!ObjectUtils.isEmpty(matterEntity)){
matterEntity.setDeptCode(entity.getDeptCode());
matterEntity.setDeptName(entity.getDeptName());
matterService.update(matterEntity,context);
}
}
}
/** /**
* @param entity * @param entity
* @param context * @param context
......
...@@ -62,9 +62,10 @@ POST {{baseUrl}}/dept/getDeptListByBusiness ...@@ -62,9 +62,10 @@ POST {{baseUrl}}/dept/getDeptListByBusiness
Content-Type: application/json Content-Type: application/json
{ {
"siteBusinessIdList":[9] "siteBusinessIdList":[12]
} }
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