|
@@ -55,12 +55,13 @@ import org.springblade.modules.mdjfdj.entity.MdjfDjEntity;
|
|
|
import org.springblade.modules.mdjfdj.service.IMdjfDjService;
|
|
|
import org.springblade.modules.mdjfry.entity.MdjfRyEntity;
|
|
|
import org.springblade.modules.mdjfry.service.IMdjfRyService;
|
|
|
+import org.springblade.modules.rhzf.aqxcff.pojo.entity.RhzfAqxcffEntity;
|
|
|
+import org.springblade.modules.rhzf.aqxcff.service.IRhzfAqxcffService;
|
|
|
import org.springblade.modules.rhzf.fwFz.entity.FwFzEntity;
|
|
|
import org.springblade.modules.rhzf.fwFz.service.IFwFzService;
|
|
|
import org.springblade.modules.rhzf.fwInfo.entity.FwInfoEntity;
|
|
|
import org.springblade.modules.rhzf.fwInfo.entity.Fwccjgb;
|
|
|
import org.springblade.modules.rhzf.fwInfo.entity.HcbdEntity;
|
|
|
-import org.springblade.modules.rhzf.fwInfo.excel.ExportFwRyExcel;
|
|
|
import org.springblade.modules.rhzf.fwInfo.excel.FwInfoExcel;
|
|
|
import org.springblade.modules.rhzf.fwInfo.excel.HcbdExcel;
|
|
|
import org.springblade.modules.rhzf.fwInfo.excel.HcbdsExcel;
|
|
@@ -74,7 +75,10 @@ import org.springblade.modules.rhzf.fwInfo.wrapper.FwInfoWrapper;
|
|
|
import org.springblade.modules.rhzf.fwRy.entity.FwRyEntity;
|
|
|
import org.springblade.modules.rhzf.fwRy.service.IFwRyService;
|
|
|
import org.springblade.modules.rhzf.fwRy.vo.FwRyVO;
|
|
|
+import org.springblade.modules.rhzf.fwqz.pojo.entity.RhzfFwqzEntity;
|
|
|
import org.springblade.modules.rhzf.fwqz.service.IRhzfFwqzService;
|
|
|
+import org.springblade.modules.rhzf.gzyj.pojo.entity.RhzfGzyjEntity;
|
|
|
+import org.springblade.modules.rhzf.gzyj.service.IRhzfGzyjService;
|
|
|
import org.springblade.modules.rhzf.jxcs.entity.JxcsEntity;
|
|
|
import org.springblade.modules.rhzf.jxcs.service.IJxcsService;
|
|
|
import org.springblade.modules.rhzf.jxcs.vo.JxcsVO;
|
|
@@ -88,9 +92,10 @@ import org.springblade.modules.rhzf.ryWlrk.entity.RyWlrkEntity;
|
|
|
import org.springblade.modules.rhzf.ryWlrk.service.IRyWlrkService;
|
|
|
import org.springblade.modules.rhzf.ryZzrk.entity.RyZzrkEntity;
|
|
|
import org.springblade.modules.rhzf.ryZzrk.service.IRyZzrkService;
|
|
|
+import org.springblade.modules.rhzf.wtfy.pojo.entity.RhzfWtfyEntity;
|
|
|
+import org.springblade.modules.rhzf.wtfy.service.IRhzfWtfyService;
|
|
|
import org.springblade.modules.system.entity.Dept;
|
|
|
import org.springblade.modules.system.entity.User;
|
|
|
-import org.springblade.modules.system.excel.DeptExcel;
|
|
|
import org.springblade.modules.system.service.IDeptService;
|
|
|
import org.springblade.modules.system.service.IDictBizService;
|
|
|
import org.springblade.modules.system.service.IRegionService;
|
|
@@ -149,6 +154,12 @@ public class FwInfoController extends BladeController {
|
|
|
|
|
|
private final IRhzfFwqzService fwqzService;
|
|
|
|
|
|
+ private final IRhzfGzyjService gzyjService;
|
|
|
+
|
|
|
+ private final IRhzfWtfyService wtfyService;
|
|
|
+
|
|
|
+ private final IRhzfAqxcffService aqxcffService;
|
|
|
+
|
|
|
private final IDictBizService dictService;
|
|
|
|
|
|
private final IRegionService regionService;
|
|
@@ -238,6 +249,16 @@ public class FwInfoController extends BladeController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 入户走访_走访历史
|
|
|
+ */
|
|
|
+ @GetMapping("/history")
|
|
|
+ public R history(@RequestParam Map<String, Object> params, Query query) {
|
|
|
+ params.put("deptId", AuthUtil.getDeptId());
|
|
|
+ IPage<RhzfHistoryVO> pages = fwInfoService.history(Condition.getPage(query), params);
|
|
|
+ return R.data(pages);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 入户走访_房屋_基本信息 新增
|
|
|
*/
|
|
|
@PostMapping("/save")
|
|
@@ -492,121 +513,45 @@ public class FwInfoController extends BladeController {
|
|
|
// 房主列表
|
|
|
FwFzEntity fz = fwFzService.getFzList(params);
|
|
|
rhzfSaveVO.setFzInfo(fz);
|
|
|
+ // 实有人口列表
|
|
|
+ List<SyjzryVO> syjzryList = new ArrayList<>();
|
|
|
+ List<FwRyVO> ryList = fwInfoService.getRyList(params);
|
|
|
+ for (FwRyVO fwRyVO : ryList) {
|
|
|
+ SyjzryVO syjzryVO = new SyjzryVO();
|
|
|
+ params.put("ryId", fwRyVO.getRyId());
|
|
|
+ if (fwRyVO.getRyType().equals("czrk")) {
|
|
|
+ syjzryVO = fwInfoService.getCzrk(params);
|
|
|
+ } else if (fwRyVO.getRyType().equals("jwrk")) {
|
|
|
+ syjzryVO = fwInfoService.getJwrk(params);
|
|
|
+ syjzryVO.setRyYwm(syjzryVO.getRyMz());
|
|
|
+ } else if (fwRyVO.getRyType().equals("jzrk")) {
|
|
|
+ syjzryVO = fwInfoService.getJzrk(params);
|
|
|
+ } else if (fwRyVO.getRyType().equals("wlrk")) {
|
|
|
+ syjzryVO = fwInfoService.getWlrk(params);
|
|
|
+ } else if (fwRyVO.getRyType().equals("zzrk")) {
|
|
|
+ syjzryVO = fwInfoService.getZzrk(params);
|
|
|
+ }
|
|
|
+ syjzryList.add(syjzryVO);
|
|
|
+ }
|
|
|
+ rhzfSaveVO.setSyjzryList(syjzryList);
|
|
|
// 九小场所列表
|
|
|
List<JxcsVO> jxcsList = jxcsService.getJxcsList(params);
|
|
|
rhzfSaveVO.setJxcsList(jxcsList);
|
|
|
+ // 工作意见
|
|
|
+ List<RhzfGzyjEntity> gzyjHistory = gzyjService.getByDzbm(params);
|
|
|
+ rhzfSaveVO.setGzyjHistory(gzyjHistory);
|
|
|
+ // 问题反映
|
|
|
+ List<RhzfWtfyEntity> wtfyHistory = wtfyService.getByDzbm(params);
|
|
|
+ rhzfSaveVO.setWtfyHistory(wtfyHistory);
|
|
|
+ // 服务群众
|
|
|
+ List<RhzfFwqzEntity> fwqzHistory = fwqzService.getByDzbm(params);
|
|
|
+ rhzfSaveVO.setFwqzHistory(fwqzHistory);
|
|
|
+ // 安全宣传防范
|
|
|
+ List<RhzfAqxcffEntity> aqxcffHistory = aqxcffService.getByDzbm(params);
|
|
|
+ rhzfSaveVO.setAqxcffHistory(aqxcffHistory);
|
|
|
} else {
|
|
|
rhzfSaveVO = new RhzfSaveVO();
|
|
|
}
|
|
|
- // 根据dzbm 查rhzf_fw_info是否已有数据
|
|
|
- FwInfoEntity fwInfo = new FwInfoEntity();
|
|
|
- fwInfo.setDzbm(params.get("dzbm").toString());
|
|
|
- FwInfoEntity oldRecord = fwInfoService.getFwIsExist(fwInfo);
|
|
|
- List<SyjzryVO> syjzryList2 = new ArrayList<>();
|
|
|
-// if (null == params.get("id") || StringUtils.isBlank(params.get("id").toString())) {
|
|
|
- if (null == oldRecord) {
|
|
|
- // 如果房屋之前没有走访过,从三实平台回显人员列表
|
|
|
- List<SyjzryVO> syjzryList = fwRyService.getSyrkList(params);
|
|
|
- try {
|
|
|
- // 保存五类人到五张人员表
|
|
|
- for (SyjzryVO syjzryVO : syjzryList) {
|
|
|
- Long ryId = 0L;
|
|
|
- int num = fwRyService.getCountByRyXlh(syjzryVO.getRyjbxxxlh());
|
|
|
- if (syjzryVO.getRyType().equals("1")) {
|
|
|
- // 常口
|
|
|
- syjzryVO.setRyType("czrk");
|
|
|
- RyCzrkEntity czrkEntity = new RyCzrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, czrkEntity);
|
|
|
- czrkEntity.setFwId(rhzfSaveVO.getId());
|
|
|
- czrkEntity.setDzbm(params.get("dzbm").toString());
|
|
|
- czrkEntity.setRyMzDm(dictService.getKey("mz", czrkEntity.getRyMz()));
|
|
|
- if (num == 0) {
|
|
|
- czrkService.save(czrkEntity);
|
|
|
- ryId = czrkEntity.getId();
|
|
|
- }
|
|
|
- } else if (syjzryVO.getRyType().equals("2")) {
|
|
|
- // 暂住人口
|
|
|
- syjzryVO.setRyType("zzrk");
|
|
|
- RyZzrkEntity zzrkEntity = new RyZzrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, zzrkEntity);
|
|
|
- zzrkEntity.setFwId(rhzfSaveVO.getId());
|
|
|
- zzrkEntity.setDzbm(params.get("dzbm").toString());
|
|
|
- zzrkEntity.setRyMzDm(dictService.getKey("mz", zzrkEntity.getRyMz()));
|
|
|
- if (num == 0) {
|
|
|
- zzrkService.save(zzrkEntity);
|
|
|
- ryId = zzrkEntity.getId();
|
|
|
- }
|
|
|
- } else if (syjzryVO.getRyType().equals("3")) {
|
|
|
- // 未落
|
|
|
- syjzryVO.setRyType("wlrk");
|
|
|
- RyWlrkEntity wlrkEntity = new RyWlrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, wlrkEntity);
|
|
|
- wlrkEntity.setFwId(rhzfSaveVO.getId());
|
|
|
- wlrkEntity.setDzbm(params.get("dzbm").toString());
|
|
|
- wlrkEntity.setRyMzDm(dictService.getKey("mz", wlrkEntity.getRyMz()));
|
|
|
- if (num == 0) {
|
|
|
- wlrkService.save(wlrkEntity);
|
|
|
- ryId = wlrkEntity.getId();
|
|
|
- }
|
|
|
- } else if (syjzryVO.getRyType().equals("4")) {
|
|
|
- // 境外
|
|
|
- syjzryVO.setRyType("jwrk");
|
|
|
- RyJwrkEntity jwrkEntity = new RyJwrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, jwrkEntity);
|
|
|
- jwrkEntity.setFwId(rhzfSaveVO.getId());
|
|
|
- jwrkEntity.setRyMz(syjzryVO.getRyXm());
|
|
|
- jwrkEntity.setDzbm(params.get("dzbm").toString());
|
|
|
- if (num == 0) {
|
|
|
- jwrkService.save(jwrkEntity);
|
|
|
- ryId = jwrkEntity.getId();
|
|
|
- }
|
|
|
- } else if (syjzryVO.getRyType().equals("5")) {
|
|
|
- // 寄住
|
|
|
- syjzryVO.setRyType("jzrk");
|
|
|
- RyJzrkEntity jzrkEntity = new RyJzrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, jzrkEntity);
|
|
|
- jzrkEntity.setFwId(rhzfSaveVO.getId());
|
|
|
- jzrkEntity.setDzbm(params.get("dzbm").toString());
|
|
|
- jzrkEntity.setRyMzDm(dictService.getKey("mz", jzrkEntity.getRyMz()));
|
|
|
- if (num == 0) {
|
|
|
- jzrkService.save(jzrkEntity);
|
|
|
- ryId = jzrkEntity.getId();
|
|
|
- }
|
|
|
- }
|
|
|
- // 保存到房屋-人员关系表
|
|
|
- if (num == 0) {
|
|
|
- FwRyEntity fwRyEntity = new FwRyEntity();
|
|
|
- fwRyEntity.setFwId(rhzfSaveVO.getId());
|
|
|
- fwRyEntity.setRyId(ryId);
|
|
|
- fwRyEntity.setRyType(syjzryVO.getRyType());
|
|
|
- fwRyEntity.setRyjbxxxlh(syjzryVO.getRyjbxxxlh());
|
|
|
- fwRyEntity.setDzbm(params.get("dzbm").toString());
|
|
|
- fwRyService.save(fwRyEntity);
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("yhjh==" + AuthUtil.getUserAccount() + " || ldphxlh==" + params.get("ldphxlh").toString() + " || dzbm==" + params.get("dzbm").toString() + ",人口列表无数据");
|
|
|
- }
|
|
|
- }
|
|
|
- List<FwRyVO> ryList = fwInfoService.getRyList(params);
|
|
|
- for (FwRyVO fwRyVO : ryList) {
|
|
|
- SyjzryVO syjzryVO = new SyjzryVO();
|
|
|
- params.put("ryId", fwRyVO.getRyId());
|
|
|
- if (fwRyVO.getRyType().equals("czrk")) {
|
|
|
- syjzryVO = fwInfoService.getCzrk(params);
|
|
|
- } else if (fwRyVO.getRyType().equals("jwrk")) {
|
|
|
- syjzryVO = fwInfoService.getJwrk(params);
|
|
|
- syjzryVO.setRyYwm(syjzryVO.getRyMz());
|
|
|
- } else if (fwRyVO.getRyType().equals("jzrk")) {
|
|
|
- syjzryVO = fwInfoService.getJzrk(params);
|
|
|
- } else if (fwRyVO.getRyType().equals("wlrk")) {
|
|
|
- syjzryVO = fwInfoService.getWlrk(params);
|
|
|
- } else if (fwRyVO.getRyType().equals("zzrk")) {
|
|
|
- syjzryVO = fwInfoService.getZzrk(params);
|
|
|
- }
|
|
|
- syjzryList2.add(syjzryVO);
|
|
|
- }
|
|
|
- rhzfSaveVO.setSyjzryList(syjzryList2);
|
|
|
return R.data(rhzfSaveVO);
|
|
|
}
|
|
|
|
|
@@ -660,16 +605,9 @@ public class FwInfoController extends BladeController {
|
|
|
return R.fail("上传失败,提交的数据中不能只有空格");
|
|
|
}
|
|
|
}
|
|
|
- Dept sq = deptService.getById(Long.valueOf(AuthUtil.getDeptId().split(",")[0]));
|
|
|
- if (rhzfSaveVO.getFwSyyt().equals("空房")) {
|
|
|
+ if (null != rhzfSaveVO.getFwSyyt() && rhzfSaveVO.getFwSyyt().equals("空房")) {
|
|
|
int kfTotal = dictService.getKfsl();
|
|
|
int kfsl = fwInfoService.getKfsl(AuthUtil.getUserId());
|
|
|
- if (sq.getAncestors().contains("220105290000") || sq.getAncestors().contains("220105330000")) {
|
|
|
- kfTotal = 25;
|
|
|
- }
|
|
|
- if (AuthUtil.getUserId().equals(1678286861087535105L)) {
|
|
|
- kfTotal = 99;
|
|
|
- }
|
|
|
if (kfsl >= kfTotal) {
|
|
|
return R.fail("今日空房登记户数已达上限(" + kfTotal + "户),辛苦了!");
|
|
|
}
|
|
@@ -682,276 +620,52 @@ public class FwInfoController extends BladeController {
|
|
|
return R.fail("今日非空房登记户数已达上限(" + total + "户),辛苦了!");
|
|
|
}
|
|
|
}
|
|
|
- Long mjId = rhzfSaveVO.getMjId();
|
|
|
- // 先保存房屋信息
|
|
|
+ // 保存房屋信息
|
|
|
FwInfoEntity fwInfo = new FwInfoEntity();
|
|
|
BeanUtil.copy(rhzfSaveVO, fwInfo);
|
|
|
+ Long mjId = rhzfSaveVO.getMjId();
|
|
|
// 根据dzbm 查rhzf_fw_info是否已有数据
|
|
|
FwInfoEntity oldRecord = fwInfoService.getFwIsExist(fwInfo);
|
|
|
- if (null == oldRecord) {
|
|
|
- fwInfo.setTimes(1);
|
|
|
- fwInfo.setMjId(mjId);
|
|
|
- fwInfoService.save(fwInfo);
|
|
|
- // 向吉林数据库插入
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- fwInfoService.saveToJl(fwInfo);
|
|
|
- }
|
|
|
- } else {
|
|
|
- // 先更新
|
|
|
- fwInfo.setId(oldRecord.getId());
|
|
|
- fwInfo.setTimes(oldRecord.getTimes() + 1);
|
|
|
- fwInfoService.updateById(fwInfo);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- fwInfoService.updateByIdToJl(fwInfo);
|
|
|
+ if (StringUtils.isNotBlank(rhzfSaveVO.getFwSyyt())) {
|
|
|
+ if (null == oldRecord) {
|
|
|
+ fwInfo.setTimes(1);
|
|
|
+ fwInfo.setMjId(mjId);
|
|
|
+ fwInfoService.save(fwInfo);
|
|
|
+ } else {
|
|
|
+ // 先更新
|
|
|
+ fwInfo.setId(oldRecord.getId());
|
|
|
+ fwInfo.setTimes(oldRecord.getTimes() + 1);
|
|
|
+ fwInfoService.updateById(fwInfo);
|
|
|
}
|
|
|
+ // 保存房屋操作记录
|
|
|
+ RhzfFwEntity fwLogEntity = new RhzfFwEntity();
|
|
|
+ BeanUtil.copy(fwInfo, fwLogEntity);
|
|
|
+ fwLogEntity.setMjId(mjId);
|
|
|
+ fwLogService.save(fwLogEntity);
|
|
|
}
|
|
|
- // 保存房屋操作记录
|
|
|
- RhzfFwEntity fwLogEntity = new RhzfFwEntity();
|
|
|
- BeanUtil.copy(fwInfo, fwLogEntity);
|
|
|
- fwLogEntity.setMjId(mjId);
|
|
|
- fwLogService.save(fwLogEntity);
|
|
|
// 保存房主信息
|
|
|
- if (null == oldRecord) {
|
|
|
- rhzfSaveVO.getFzInfo().setFwId(fwInfo.getId());
|
|
|
- rhzfSaveVO.getFzInfo().setMjId(mjId);
|
|
|
- fwFzService.save(rhzfSaveVO.getFzInfo());
|
|
|
- // 向吉林数据库插入
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- fwFzService.saveToJl(rhzfSaveVO.getFzInfo());
|
|
|
- }
|
|
|
- } else if (null != rhzfSaveVO.getFzInfo()) {
|
|
|
- rhzfSaveVO.getFzInfo().setFwId(fwInfo.getId());
|
|
|
- fwFzService.updateFzByFwId(rhzfSaveVO.getFzInfo());
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- fwFzService.updateFzByFwIdToJl(rhzfSaveVO.getFzInfo());
|
|
|
- }
|
|
|
- }
|
|
|
- // 保存房主操作记录
|
|
|
- RhzfFzEntity fzLogEntity = new RhzfFzEntity();
|
|
|
- BeanUtil.copy(rhzfSaveVO.getFzInfo(), fzLogEntity);
|
|
|
- fzLogEntity.setMjId(mjId);
|
|
|
- fzLogService.save(fzLogEntity);
|
|
|
- // 保存实有居住人员信息
|
|
|
- if (null != rhzfSaveVO.getSyjzryList() && !rhzfSaveVO.getSyjzryList().isEmpty()) {
|
|
|
- for (SyjzryVO syjzryVO : rhzfSaveVO.getSyjzryList()) {
|
|
|
- if (syjzryVO.getIsDeleted() != 1 && !syjzryVO.getRyType().equals("jwrk") && StringUtils.isBlank(syjzryVO.getRySfzh())) {
|
|
|
- return R.fail("请填写身份证号");
|
|
|
- }
|
|
|
- Long fwId = fwInfo.getId();
|
|
|
- Long ryId = 0L;
|
|
|
- int type = 1; // 1=新增 2=修改 3=删除
|
|
|
- if (syjzryVO.getRyType().equals("czrk")) {
|
|
|
- // 常住人口
|
|
|
- RyCzrkEntity czrkEntity = new RyCzrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, czrkEntity);
|
|
|
- czrkEntity.setFwId(fwId);
|
|
|
- czrkEntity.setDzbm(rhzfSaveVO.getDzbm());
|
|
|
- if (null == czrkEntity.getId()) {
|
|
|
- czrkEntity.setMjId(mjId);
|
|
|
- czrkService.save(czrkEntity);
|
|
|
- // 向吉林数据库插入
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- czrkService.saveToJl(czrkEntity);
|
|
|
- }
|
|
|
- } else if (czrkEntity.getIsDeleted() == 0) {
|
|
|
- czrkService.updateById(czrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- czrkService.updateByIdToJl(czrkEntity);
|
|
|
- }
|
|
|
- type = 2;
|
|
|
- } else if (czrkEntity.getIsDeleted() == 1) {
|
|
|
- czrkEntity.setZxrq(sdf.format(new Date()));
|
|
|
- czrkService.czrkZx(czrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- czrkService.czrkZxToJl(czrkEntity);
|
|
|
- }
|
|
|
- type = 3;
|
|
|
- }
|
|
|
- ryId = czrkEntity.getId();
|
|
|
- RhzfCzrkEntity czrkLogEntity = new RhzfCzrkEntity();
|
|
|
- BeanUtil.copy(czrkEntity, czrkLogEntity);
|
|
|
- czrkLogEntity.setMjId(mjId);
|
|
|
- czrkLogService.save(czrkLogEntity);
|
|
|
- } else if (syjzryVO.getRyType().equals("jwrk")) {
|
|
|
- // 境外人口
|
|
|
- RyJwrkEntity jwrkEntity = new RyJwrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, jwrkEntity);
|
|
|
- jwrkEntity.setFwId(fwId);
|
|
|
- jwrkEntity.setRyMz(syjzryVO.getRyYwm());
|
|
|
- jwrkEntity.setDzbm(rhzfSaveVO.getDzbm());
|
|
|
- if (null == jwrkEntity.getId()) {
|
|
|
- jwrkEntity.setMjId(mjId);
|
|
|
- jwrkService.save(jwrkEntity);
|
|
|
- // 向吉林数据库插入
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- jwrkService.saveToJl(jwrkEntity);
|
|
|
- }
|
|
|
- } else if (jwrkEntity.getIsDeleted() == 0) {
|
|
|
- jwrkService.updateById(jwrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- jwrkService.updateByIdToJl(jwrkEntity);
|
|
|
- }
|
|
|
- type = 2;
|
|
|
- } else if (jwrkEntity.getIsDeleted() == 1) {
|
|
|
- jwrkEntity.setZxrq(sdf.format(new Date()));
|
|
|
- jwrkService.jwrkZx(jwrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- jwrkService.jwrkZxToJl(jwrkEntity);
|
|
|
- }
|
|
|
- type = 3;
|
|
|
- }
|
|
|
- ryId = jwrkEntity.getId();
|
|
|
- RhzfJwrkEntity jwrkLogEntity = new RhzfJwrkEntity();
|
|
|
- BeanUtil.copy(jwrkEntity, jwrkLogEntity);
|
|
|
- jwrkLogEntity.setMjId(mjId);
|
|
|
- jwrkLogService.save(jwrkLogEntity);
|
|
|
- } else if (syjzryVO.getRyType().equals("jzrk")) {
|
|
|
- // 寄住人口
|
|
|
- RyJzrkEntity jzrkEntity = new RyJzrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, jzrkEntity);
|
|
|
- jzrkEntity.setFwId(fwId);
|
|
|
- jzrkEntity.setDzbm(rhzfSaveVO.getDzbm());
|
|
|
- if (null == jzrkEntity.getId()) {
|
|
|
- jzrkEntity.setMjId(mjId);
|
|
|
- jzrkService.save(jzrkEntity);
|
|
|
- // 向吉林数据库插入
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- jzrkService.saveToJl(jzrkEntity);
|
|
|
- }
|
|
|
- } else if (jzrkEntity.getIsDeleted() == 0) {
|
|
|
- jzrkService.updateById(jzrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- jzrkService.updateByIdToJl(jzrkEntity);
|
|
|
- }
|
|
|
- type = 2;
|
|
|
- } else if (jzrkEntity.getIsDeleted() == 1) {
|
|
|
- jzrkEntity.setZxrq(sdf.format(new Date()));
|
|
|
- jzrkService.jzrkZx(jzrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- jzrkService.jzrkZxToJl(jzrkEntity);
|
|
|
- }
|
|
|
- type = 3;
|
|
|
- }
|
|
|
- ryId = jzrkEntity.getId();
|
|
|
- RhzfJzrkEntity jzrkLogEntity = new RhzfJzrkEntity();
|
|
|
- BeanUtil.copy(jzrkEntity, jzrkLogEntity);
|
|
|
- jzrkLogEntity.setMjId(mjId);
|
|
|
- jzrkLogService.save(jzrkLogEntity);
|
|
|
- } else if (syjzryVO.getRyType().equals("wlrk")) {
|
|
|
- // 未落常口
|
|
|
- RyWlrkEntity wlrkEntity = new RyWlrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, wlrkEntity);
|
|
|
- wlrkEntity.setFwId(fwId);
|
|
|
- wlrkEntity.setDzbm(rhzfSaveVO.getDzbm());
|
|
|
- if (null == wlrkEntity.getId()) {
|
|
|
- wlrkEntity.setMjId(mjId);
|
|
|
- wlrkService.save(wlrkEntity);
|
|
|
- // 向吉林数据库插入
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- wlrkService.saveToJl(wlrkEntity);
|
|
|
- }
|
|
|
- } else if (wlrkEntity.getIsDeleted() == 0) {
|
|
|
- wlrkService.updateById(wlrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- wlrkService.updateByIdToJl(wlrkEntity);
|
|
|
- }
|
|
|
- type = 2;
|
|
|
- } else if (wlrkEntity.getIsDeleted() == 1) {
|
|
|
- wlrkEntity.setZxrq(sdf.format(new Date()));
|
|
|
- wlrkService.wlrkZx(wlrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- wlrkService.wlrkZxToJl(wlrkEntity);
|
|
|
- }
|
|
|
- type = 3;
|
|
|
- }
|
|
|
- ryId = wlrkEntity.getId();
|
|
|
- RhzfWlrkEntity wlrkLogEntity = new RhzfWlrkEntity();
|
|
|
- BeanUtil.copy(wlrkEntity, wlrkLogEntity);
|
|
|
- wlrkLogEntity.setMjId(mjId);
|
|
|
- wlrkLogService.save(wlrkLogEntity);
|
|
|
- } else if (syjzryVO.getRyType().equals("zzrk")) {
|
|
|
- // 暂住人口
|
|
|
- RyZzrkEntity zzrkEntity = new RyZzrkEntity();
|
|
|
- BeanUtil.copy(syjzryVO, zzrkEntity);
|
|
|
- zzrkEntity.setFwId(fwId);
|
|
|
- zzrkEntity.setDzbm(rhzfSaveVO.getDzbm());
|
|
|
- if (null == zzrkEntity.getId()) {
|
|
|
- zzrkEntity.setMjId(mjId);
|
|
|
- zzrkService.save(zzrkEntity);
|
|
|
- // 向吉林数据库插入
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- zzrkService.saveToJl(zzrkEntity);
|
|
|
- }
|
|
|
- } else if (zzrkEntity.getIsDeleted() == 0) {
|
|
|
- zzrkService.updateById(zzrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- zzrkService.updateByIdToJl(zzrkEntity);
|
|
|
- }
|
|
|
- type = 2;
|
|
|
- } else if (zzrkEntity.getIsDeleted() == 1) {
|
|
|
- zzrkEntity.setZxrq(sdf.format(new Date()));
|
|
|
- zzrkService.zzrkZx(zzrkEntity);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- zzrkService.zzrkZxToJl(zzrkEntity);
|
|
|
- }
|
|
|
- type = 3;
|
|
|
- }
|
|
|
- ryId = zzrkEntity.getId();
|
|
|
- RhzfZzrkEntity zzrkLogEntity = new RhzfZzrkEntity();
|
|
|
- BeanUtil.copy(zzrkEntity, zzrkLogEntity);
|
|
|
- zzrkLogEntity.setMjId(mjId);
|
|
|
- zzrkLogService.save(zzrkLogEntity);
|
|
|
- }
|
|
|
- // 新增人员 需要 保存房屋_人员关系
|
|
|
- if (type == 1) {
|
|
|
- FwRyEntity fwRyEntity = new FwRyEntity();
|
|
|
- fwRyEntity.setFwId(fwId);
|
|
|
- fwRyEntity.setRyId(ryId);
|
|
|
- fwRyEntity.setRyType(syjzryVO.getRyType());
|
|
|
- fwRyEntity.setDzbm(rhzfSaveVO.getDzbm());
|
|
|
- fwRyEntity.setMjId(mjId);
|
|
|
- fwRyService.save(fwRyEntity);
|
|
|
- // 向吉林数据库插入
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- fwRyService.saveToJl(fwRyEntity);
|
|
|
- }
|
|
|
- } else if (type == 2) {
|
|
|
- fwRyService.updateFwId(fwId, rhzfSaveVO.getDzbm(), syjzryVO.getRyType(), ryId);
|
|
|
- // 向吉林数据库更新
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- fwRyService.updateFwIdToJl(fwId, rhzfSaveVO.getDzbm(), syjzryVO.getRyType(), ryId);
|
|
|
- }
|
|
|
- } else if (type == 3) {
|
|
|
- Map<String, Object> params = new HashMap<>();
|
|
|
- params.put("ryId", ryId);
|
|
|
- params.put("ryType", syjzryVO.getRyType());
|
|
|
- fwRyService.deleteByRyidAndType(params);
|
|
|
- // 向吉林数据库删除
|
|
|
- if (sq.getAncestors().contains("220200000000")) {
|
|
|
- fwRyService.deleteByRyidAndTypeToJl(params);
|
|
|
- }
|
|
|
- }
|
|
|
+ if (null != rhzfSaveVO.getFzInfo()) {
|
|
|
+ if (null == oldRecord) {
|
|
|
+ rhzfSaveVO.getFzInfo().setFwId(fwInfo.getId());
|
|
|
+ rhzfSaveVO.getFzInfo().setMjId(mjId);
|
|
|
+ fwFzService.save(rhzfSaveVO.getFzInfo());
|
|
|
+ } else if (null != rhzfSaveVO.getFzInfo()) {
|
|
|
+ rhzfSaveVO.getFzInfo().setFwId(fwInfo.getId());
|
|
|
+ fwFzService.updateFzByFwId(rhzfSaveVO.getFzInfo());
|
|
|
}
|
|
|
+ // 保存房主操作记录
|
|
|
+ RhzfFzEntity fzLogEntity = new RhzfFzEntity();
|
|
|
+ BeanUtil.copy(rhzfSaveVO.getFzInfo(), fzLogEntity);
|
|
|
+ fzLogEntity.setMjId(mjId);
|
|
|
+ fzLogService.save(fzLogEntity);
|
|
|
}
|
|
|
+ // 保存九小场所信息
|
|
|
if (null != rhzfSaveVO.getJxcsList() && !rhzfSaveVO.getJxcsList().isEmpty()) {
|
|
|
- // 保存九小场所信息
|
|
|
List<JxcsEntity> jxcsList = new ArrayList<>();
|
|
|
for (JxcsVO jxcs : rhzfSaveVO.getJxcsList()) {
|
|
|
JxcsEntity cs = new JxcsEntity();
|
|
|
BeanUtil.copy(jxcs, cs);
|
|
|
- cs.setFwId(fwInfo.getId());
|
|
|
+ cs.setFwId(rhzfSaveVO.getId());
|
|
|
if (null == cs.getId()) {
|
|
|
// 新增
|
|
|
jxcsList.add(cs);
|
|
@@ -965,9 +679,33 @@ public class FwInfoController extends BladeController {
|
|
|
}
|
|
|
jxcsService.saveBatch(jxcsList);
|
|
|
}
|
|
|
- if (null != rhzfSaveVO.getFwqz()) {
|
|
|
+ // 工作意见
|
|
|
+ if (null != rhzfSaveVO.getGzyj()) {
|
|
|
+ rhzfSaveVO.getGzyj().setFwId(rhzfSaveVO.getId());
|
|
|
+ rhzfSaveVO.getGzyj().setDzbm(rhzfSaveVO.getDzbm());
|
|
|
// 保存
|
|
|
- fwqzService.saveOrUpdate(rhzfSaveVO.getFwqz());
|
|
|
+ gzyjService.saveOrUpdate(rhzfSaveVO.getGzyj());
|
|
|
+ }
|
|
|
+ // 问题反映
|
|
|
+ if (null != rhzfSaveVO.getWtfy()) {
|
|
|
+ rhzfSaveVO.getWtfy().setFwId(rhzfSaveVO.getId());
|
|
|
+ rhzfSaveVO.getWtfy().setDzbm(rhzfSaveVO.getDzbm());
|
|
|
+ // 保存
|
|
|
+ wtfyService.saveOrUpdate(rhzfSaveVO.getWtfy());
|
|
|
+ }
|
|
|
+ // 服务群众
|
|
|
+// if (null != rhzfSaveVO.getFwqz()) {
|
|
|
+// rhzfSaveVO.getFwqz().setFwId(fwInfo.getId());
|
|
|
+// rhzfSaveVO.getFwqz().setDzbm(rhzfSaveVO.getDzbm());
|
|
|
+// // 保存
|
|
|
+// fwqzService.saveOrUpdate(rhzfSaveVO.getFwqz());
|
|
|
+// }
|
|
|
+ // 安全宣传防范
|
|
|
+ if (null != rhzfSaveVO.getAqxcff()) {
|
|
|
+ rhzfSaveVO.getAqxcff().setFwId(rhzfSaveVO.getId());
|
|
|
+ rhzfSaveVO.getAqxcff().setDzbm(rhzfSaveVO.getDzbm());
|
|
|
+ // 保存
|
|
|
+ aqxcffService.saveOrUpdate(rhzfSaveVO.getAqxcff());
|
|
|
}
|
|
|
return R.data(fwInfo);
|
|
|
}
|
|
@@ -1840,12 +1578,12 @@ public class FwInfoController extends BladeController {
|
|
|
paramfw.put("fwlx",rhzfSaveVO.getFwlx());
|
|
|
|
|
|
//问题反应
|
|
|
- if(StringUtils.isNotBlank(rhzfSaveVO.getWtfy())){
|
|
|
- paramfw.put("sfywtfy","有".equals(rhzfSaveVO.getWtfy())?"☑有 □无":"□有 ☑无");
|
|
|
- paramfw.put("wtfy", rhzfSaveVO.getWtfyFj() );
|
|
|
- }
|
|
|
+// if(StringUtils.isNotBlank(rhzfSaveVO.getWtfy())){
|
|
|
+// paramfw.put("sfywtfy","有".equals(rhzfSaveVO.getWtfy())?"☑有 □无":"□有 ☑无");
|
|
|
+// paramfw.put("wtfy", rhzfSaveVO.getWtfyFj() );
|
|
|
+// }
|
|
|
//工作建议
|
|
|
- paramfw.put("gzyj",StringUtils.isNotBlank(rhzfSaveVO.getGzyj())?rhzfSaveVO.getGzyj():"暂无建议");
|
|
|
+// paramfw.put("gzyj",StringUtils.isNotBlank(rhzfSaveVO.getGzyj())?rhzfSaveVO.getGzyj():"暂无建议");
|
|
|
//签名 http://192.168.50.93:9000/jdrh/upload/20231227/Signature_1703639042681.jpg
|
|
|
String qzzp = new String();
|
|
|
if (rhzfSaveVO.getQzzp() != null){
|