Commit 527094e8 authored by 张俊's avatar 张俊

楼盘清册导入优化开发

parent e9123a3a
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
Copyright 2018 人人开源
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
......@@ -3,29 +3,22 @@ package io.renren.modules.app.controller;
import com.alibaba.fastjson.JSON;
import io.renren.common.utils.R;
import io.renren.modules.app.annotation.Login;
import io.renren.modules.app.entity.DhbmyjEntity;
import io.renren.modules.app.entity.DyxxEntity;
import io.renren.modules.app.entity.FwxxEntity;
import io.renren.modules.app.entity.LpqcEntity;
import io.renren.modules.app.entity.YwpzEntity;
import io.renren.modules.app.entity.ZhxxEntity;
import io.renren.modules.app.service.DyxxService;
import io.renren.modules.app.service.FwxxService;
import io.renren.modules.app.service.GrwxzjService;
import io.renren.modules.app.service.GrwxzjfhService;
import io.renren.modules.app.service.LpqcService;
import io.renren.modules.app.service.ZhxxService;
import io.renren.modules.app.entity.*;
import io.renren.modules.app.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 楼盘清册导入
......@@ -36,6 +29,8 @@ import java.util.Map;
@RequestMapping("app/lpqcdr")
@Api(tags = "楼盘清册导入")
public class LpqcController {
@Autowired
private LpqcService lpqcService;
......@@ -56,37 +51,29 @@ public class LpqcController {
@Login
@PostMapping("insertLpqc")
@Transactional
@ApiOperation(value = "清册导入", notes = "楼盘清册导入", response = LpqcEntity.class)
public R queryByPage(@RequestBody Map<String, Object> map) {
List<ZhxxEntity> zhxxList = new ArrayList<ZhxxEntity>();
List<DyxxEntity> dyxxList = new ArrayList<DyxxEntity>();
List<FwxxEntity> fwxxList = new ArrayList<FwxxEntity>();
zhxxList = (List<ZhxxEntity>) map.get("zhxxList");
dyxxList = (List<DyxxEntity>) map.get("dyxxList");
fwxxList = (List<FwxxEntity>) map.get("fwxxList");
List<ZhxxEntity> zhxxList = (List<ZhxxEntity>) map.get("zhxxList");
List<DyxxEntity> dyxxList = (List<DyxxEntity>) map.get("dyxxList");
List<FwxxEntity> fwxxList = JSON.parseArray(JSON.toJSONString(map.get("fwxxList")), FwxxEntity.class);
String dwbm = map.get("dwbm").toString();
String xqbm = map.get("xqbm").toString();
String xmbm = map.get("xmbm").toString();
String wygsbm = "00010037";
int nx = 100;
String fwlx = "0115";
for(int i = 0;i < zhxxList.size();i++){
for (int i = 0; i < zhxxList.size(); i++) {
// 主键定义
String a = lpqcService.selectDhbm2();
String b = a.substring(0, 3);
String c = Integer.toString(Integer.parseInt(a.substring(3)) + 1);
String dhbm = b + c;
ZhxxEntity zhxxEntity = JSON.parseObject(JSON.toJSONString(zhxxList.get(i)),ZhxxEntity.class);
int num = lpqcService.selectDhmc(xmbm,zhxxEntity.getDhmc());
if (num > 0){
return R.ok().put("data","栋号名称已存在!");
ZhxxEntity zhxxEntity = JSON.parseObject(JSON.toJSONString(zhxxList.get(i)), ZhxxEntity.class);
int num = lpqcService.selectDhmc(xmbm, zhxxEntity.getDhmc());
if (num > 0) {
return R.ok().put("data", "栋号名称已存在!");
}
//房屋性质
// String fwjg = "0208";
zhxxEntity.setSfdt("0");
zhxxEntity.setSfgf("0");
zhxxEntity.setHwlx("0315");
......@@ -97,35 +84,36 @@ public class LpqcController {
zhxxEntity.setDwbm(dwbm);
zhxxEntity.setHwjg("0208");
zhxxEntity.setDhbm(dhbm);
//楼栋导入
// 楼栋导入
zhxxService.insert(zhxxEntity);
}
for(int i = 0;i < dyxxList.size();i++){
DyxxEntity dyxxEntity = JSON.parseObject(JSON.toJSONString(dyxxList.get(i)),DyxxEntity.class);
String dhbm = lpqcService.selectDhbm(xmbm,dyxxEntity.getDhmc());
for (int i = 0; i < dyxxList.size(); i++) {
DyxxEntity dyxxEntity = JSON.parseObject(JSON.toJSONString(dyxxList.get(i)), DyxxEntity.class);
String dhbm = lpqcService.selectDhbm(xmbm, dyxxEntity.getDhmc());
String a = dyxxService.queryfwdybm();
String b = a.substring(0, 3);
String c = Integer.toString(Integer.parseInt(a.substring(3)) + 1);
String fwdybm = b + c;
dyxxEntity.setFwdybm(fwdybm);
dyxxEntity.setDhbm(dhbm);
//单元导入
// 单元导入
lpqcService.insertDyxx(dyxxEntity);
}
// lpqcService.updateLcs();
String lc = "";
for(int i = 0;i < fwxxList.size();i++){
FwxxEntity fwxxEntity = JSON.parseObject(JSON.toJSONString(fwxxList.get(i)),FwxxEntity.class);
// 批量获取楼栋信息
List<String> dhmcList = fwxxList.stream().map(vo -> vo.getDhmc()).collect(Collectors.toList());
List<ZhxxEntity> zhxxEntities = zhxxService.selectDhbmList(xmbm, dhmcList);
Map<String, String> dhbmMap = zhxxEntities.stream().collect(Collectors.toMap(vo -> vo.getDhmc(), vo -> vo.getDhbm()));
List<DyxxEntity> dyxxEntities = dyxxService.selectDybmList(new ArrayList<>(dhbmMap.values()));
Map<String, String> fwdybmMap = dyxxEntities.stream().collect(Collectors.toMap(vo -> vo.getDhbm().concat(vo.getDymc()), vo -> vo.getFwdybm()));
String fwbm = lpqcService.querydhbm();
for (int i = 0; i < fwxxList.size(); i++) {
FwxxEntity fwxxEntity = fwxxList.get(i);
// 房屋编码
String a = lpqcService.querydhbm();
//房屋编码
String fwbm = Integer.toString(Integer.parseInt(a) + 1);
//栋号编码
String dhbm = lpqcService.selectDhbm(xmbm,fwxxEntity.getDhmc());
//单元编码
String mh = lpqcService.selectDybm(dhbm,fwxxEntity.getDymc());
fwbm = Integer.toString(Integer.parseInt(fwbm) + 1);
// 栋号编码
String dhbm = dhbmMap.get(fwxxEntity.getDhmc());
// 单元编码
String mh = fwdybmMap.get(dhbm.concat(fwxxEntity.getDymc()));
fwxxEntity.setDhbm(dhbm);
fwxxEntity.setMh(mh);
fwxxEntity.setFwbm(fwbm);
......@@ -133,33 +121,32 @@ public class LpqcController {
fwxxEntity.setSfyj("0");
fwxxEntity.setHx("0401");
fwxxEntity.setFwxz("0115");
//房屋导入
lpqcService.insertFwxx(fwxxEntity);
}
//当出现同一楼栋不同单元楼层不一样的时候,在此处处理一下,因为导入的时候是按照同一楼栋每个单元楼层数一样处理的
for(int i = 0;i < zhxxList.size();i++){
ZhxxEntity zhxxEntity = JSON.parseObject(JSON.toJSONString(zhxxList.get(i)),ZhxxEntity.class);
// int num = lpqcService.selectDhmc(xmbm,zhxxEntity.getDhmc());
//查dhbm再set导zhxxentity里面
// 房屋导入
if (!CollectionUtils.isEmpty(fwxxList)) {
lpqcService.insertFwxxList(fwxxList);
}
// 当出现同一楼栋不同单元楼层不一样的时候,在此处处理一下,因为导入的时候是按照同一楼栋每个单元楼层数一样处理的
for (int i = 0; i < zhxxList.size(); i++) {
ZhxxEntity zhxxEntity = JSON.parseObject(JSON.toJSONString(zhxxList.get(i)), ZhxxEntity.class);
// 查dhbm再set导zhxxentity里面
zhxxEntity.setXmbm(xmbm);
ZhxxEntity z=lpqcService.selectdhbmbymc(zhxxEntity);
List<Integer> list=lpqcService.selectdhbmbyxmdh(zhxxEntity);
Integer max=list.get(0);
Integer min=list.get(0);
for(int j=0;j<list.size();j++){
if(min>list.get(j)){
min=list.get(j);
ZhxxEntity z = lpqcService.selectdhbmbymc(zhxxEntity);
List<Integer> list = lpqcService.selectdhbmbyxmdh(zhxxEntity);
Integer max = list.get(0);
Integer min = list.get(0);
for (int j = 0; j < list.size(); j++) {
if (min > list.get(j)) {
min = list.get(j);
}
if(max<list.get(j)){
max=list.get(j);
if (max < list.get(j)) {
max = list.get(j);
}
}
zhxxEntity.setLcs(max);
zhxxEntity.setDhbm(z.getDhbm());
lpqcService.updatezhxxlcs(zhxxEntity);
}
return R.ok();
}
......@@ -167,31 +154,31 @@ public class LpqcController {
@PostMapping("/selectdhbmfwbm")
@ApiOperation(value = "通过楼盘清册勾选对应的房屋批量个人预交房屋的接口", notes = "", response = FwxxEntity.class)
public R selectdhbmfwbm(@RequestBody List<ZhxxEntity> list) {
List<FwxxEntity> fs=new ArrayList<FwxxEntity>();
List<FwxxEntity> fs2=new ArrayList<FwxxEntity>();
List<YwpzEntity> listy=new ArrayList<YwpzEntity>();
List<DhbmyjEntity> dhyjs=new ArrayList<DhbmyjEntity>();
for(ZhxxEntity z:list){
FwxxEntity f=new FwxxEntity();
FwxxEntity f2=new FwxxEntity();
List<FwxxEntity> fs = new ArrayList<FwxxEntity>();
List<FwxxEntity> fs2 = new ArrayList<FwxxEntity>();
List<YwpzEntity> listy = new ArrayList<YwpzEntity>();
List<DhbmyjEntity> dhyjs = new ArrayList<DhbmyjEntity>();
for (ZhxxEntity z : list) {
FwxxEntity f = new FwxxEntity();
FwxxEntity f2 = new FwxxEntity();
String fwbm = lpqcService.selectdhbmfwbm(z);
if("".equals(fwbm)||fwbm==null){
if ("".equals(fwbm) || fwbm == null) {
f.setMphm(z.getMphm());
fs.add(f);
}else{
} else {
f2.setFwbm(fwbm);
f2.setDjrq(z.getDjrq());
}
fs2.add(f2);
}
if(!fs.isEmpty()){
return R.error("存在勾选的房屋在系统中不存在").put("data", fs);//fs只要不为空,就存在没有找到对应的房屋
}else{
for(FwxxEntity f3:fs2){
YwpzEntity y=new YwpzEntity();
FwxxEntity f4=lpqcService.selectfwxx(f3.getFwbm());
Double je=f4.getMj()*f4.getGrjjl();
ZhxxEntity z=grwxzjService.selectdhdw(f3.getFwbm());
if (!fs.isEmpty()) {
return R.error("存在勾选的房屋在系统中不存在").put("data", fs);// fs只要不为空,就存在没有找到对应的房屋
} else {
for (FwxxEntity f3 : fs2) {
YwpzEntity y = new YwpzEntity();
FwxxEntity f4 = lpqcService.selectfwxx(f3.getFwbm());
Double je = f4.getMj() * f4.getGrjjl();
ZhxxEntity z = grwxzjService.selectdhdw(f3.getFwbm());
y.setDjrq(f3.getDjrq());
y.setKjqj(f3.getDjrq().substring(0, 7));
y.setCbwdbm("0001");
......@@ -207,23 +194,23 @@ public class LpqcController {
y.setSfyj(f4.getSfyj());
listy.add(y);
}
for(YwpzEntity y2:listy){
if("0".equals(y2.getSfyj())){
String djbh=grwxzjService.insertGr2(y2);
for (YwpzEntity y2 : listy) {
if ("0".equals(y2.getSfyj())) {
String djbh = grwxzjService.insertGr2(y2);
try {
//避免批量插入高并发,主键中的时间相同,导致主键冲突,此处设置每次停顿1秒
// 避免批量插入高并发,主键中的时间相同,导致主键冲突,此处设置每次停顿1秒
Thread.currentThread().sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
DhbmyjEntity d=new DhbmyjEntity();
DhbmyjEntity d = new DhbmyjEntity();
d.setDjbh(djbh);
d.setShrbm("7");
d.setShrxm("系统");
dhyjs.add(d);
}else{
//该房屋已经缴过
} else {
// 该房屋已经缴过
}
}
......
......@@ -4,6 +4,8 @@ import io.renren.modules.app.entity.DyxxEntity;
import io.renren.modules.app.entity.XlkEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
......@@ -34,4 +36,5 @@ public interface DyxxDao extends BaseMapper<DyxxEntity> {
String queryfwdybm();
List<DyxxEntity> selectDybmList(@Param("dhbmList") List<String> dhbmList);
}
......@@ -24,6 +24,9 @@ public interface LpqcDao extends BaseMapper<LpqcEntity> {
//插入房屋信息
void insertFwxx(FwxxEntity fwxxEntity);
//插入房屋信息
void insertFwxxList(List<FwxxEntity> fwxxEntity);
// 获取最新的房屋编码
String querydhbm();
......
......@@ -5,6 +5,7 @@ import io.renren.modules.app.entity.XlkEntity;
import io.renren.modules.app.entity.ZhxxEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
......@@ -49,4 +50,5 @@ public interface ZhxxDao extends BaseMapper<ZhxxEntity> {
void updatezhxxyjje(ZhxxEntity zhxxEntity);
List<ZhxxEntity> selectDhbmList(@Param("xmbm") String xmbm, @Param("dhmcList") List<String> dhmcList);
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.service.IService;
import com.github.pagehelper.PageInfo;
import io.renren.modules.app.entity.DyxxEntity;
import io.renren.modules.app.entity.XlkEntity;
import io.renren.modules.app.entity.ZhxxEntity;
import java.util.List;
import java.util.Map;
......@@ -40,5 +41,10 @@ public interface DyxxService extends IService<DyxxEntity> {
List<XlkEntity> selectDjld(Map<String,String> map);
String queryfwdybm();
//查询栋号编码
List<DyxxEntity> selectDybmList( List<String> dhbmList);
}
......@@ -29,6 +29,9 @@ public interface LpqcService extends IService<LpqcEntity> {
//插入房屋信息
void insertFwxx(FwxxEntity fwxxEntity);
//插入房屋信息
void insertFwxxList(List<FwxxEntity> fwxxEntityList);
// 获取最新的房屋编码
String querydhbm();
......
......@@ -45,5 +45,10 @@ public interface ZhxxService extends IService<ZhxxEntity> {
WtTyEntity selectkm(ZhxxEntity zhxxEntity);
List<ZhxxEntity> selectzhxx(String id);
//查询栋号编码
List<ZhxxEntity> selectDhbmList(String xmbm,List<String> dhmcList);
}
......@@ -76,4 +76,9 @@ public class DyxxServiceImpl extends ServiceImpl<DyxxDao, DyxxEntity> implements
return baseMapper.queryfwdybm();
}
@Override
public List<DyxxEntity> selectDybmList(List<String> dhbmList) {
return baseMapper.selectDybmList(dhbmList);
}
}
\ No newline at end of file
......@@ -44,6 +44,13 @@ public class LpqcServiceImpl extends ServiceImpl<LpqcDao, LpqcEntity> implements
public void insertFwxx(FwxxEntity fwxxEntity) {
baseMapper.insertFwxx(fwxxEntity);
}
/**
* 插入房屋信息
*/
@Override
public void insertFwxxList(List<FwxxEntity> fwxxEntityList) {
baseMapper.insertFwxxList(fwxxEntityList);
}
/**
* 获取房屋编码
......
......@@ -117,6 +117,11 @@ public class ZhxxServiceImpl extends ServiceImpl<ZhxxDao, ZhxxEntity> implements
return baseMapper.selectzhxx(id);
}
@Override
public List<ZhxxEntity> selectDhbmList(String xmbm, List<String> dhmcList) {
return baseMapper.selectDhbmList(xmbm,dhmcList);
}
@Override
public void updatezhxxyjje(ZhxxEntity zhxxEntity) {
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="TRACE" />
<!-- 日志存放路径 -->
<property name="log.path" value="logs/app"/>
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50}:%L-%msg%n"/>
<!-- 开发、测试环境 -->
<springProfile name="dev,test">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO" />
<logger name="io.renren" level="DEBUG" />
</springProfile>
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 生产环境 -->
<springProfile name="prod">
<logger name="org.springframework.web" level="ERROR"/>
<logger name="org.springboot.sample" level="ERROR" />
<logger name="io.renren" level="ERROR" />
</springProfile>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}-error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}-error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="console"/>
<appender-ref ref="file_info"/>
<appender-ref ref="file_error"/>
</root>
<!-- 系统模块日志级别控制 -->
<logger name="io.renren" level="debug"/>
</configuration>
\ No newline at end of file
......@@ -72,5 +72,11 @@
<select id="queryfwdybm" resultType="string">
SELECT fwdybm FROM dyxx WHERE LENGTH(fwdybm)>=8 ORDER BY fwdybm DESC LIMIT 1
</select>
<select id="selectDybmList" resultType="io.renren.modules.app.entity.DyxxEntity">
select dhbm,dymc,fwdybm from dyxx where dhbm in
<foreach collection="dhbmList" item="item" index="index" separator="," open=" (" close=")">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
......@@ -145,6 +145,14 @@
)
</insert>
<insert id="insertFwxxList">
INSERT INTO fwxx(`cczh`, `fwbm`, `dhbm`, `mphm`, `lc`, `hx`, `fwxz`, `ssdj`, `mj`, `fwje`, `gfrq`, `lfmj`, `lfdj`, `lfje`, `zjk`, `hxt`, `xm`, `sfzh`, `lxdh`, `jjze`, `sfsc`, `mh`, `grjjl`, `jsbz`, `gzdbm`, `htbh`, `fpbh`, `zjlb`, `dz`, `bz`, `jcbzbm`, `fwyt`, `spzt`, `yzkm`, `sfyj`, `sfjq` )
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.cczh}, #{item.fwbm}, #{item.dhbm}, #{item.mphm}, #{item.lc}, #{item.hx}, #{item.fwxz}, #{item.ssdj}, #{item.mj}, #{item.fwje}, #{item.gfrq}, #{item.lfmj}, #{item.lfdj}, #{item.lfje}, #{item.zjk}, #{item.hxt}, #{item.xm}, #{item.sfzh}, #{item.lxdh}, #{item.jjze}, #{item.sfsc}, #{item.mh}, #{item.grjjl}, #{item.jsbz}, #{item.gzdbm}, #{item.htbh}, #{item.fpbh}, #{item.zjlb}, #{item.dz}, #{item.bz}, #{item.jcbzbm}, #{item.fwyt}, #{item.spzt}, #{item.yzkm}, #{item.sfyj}, '0')
</foreach>
</insert>
<select id="selectdhbmbyxmdh" parameterType="io.renren.modules.app.entity.ZhxxEntity"
resultType="Integer">
select lcs from dyxx where dhbm=(select dhbm from zhxx
......
......@@ -74,6 +74,15 @@
select dhmc from zhxx where xmbm=#{id}
</select>
<select id="selectDhbmList" resultType="io.renren.modules.app.entity.ZhxxEntity">
select xmbm,dhmc,dhbm from zhxx
where xmbm = #{xmbm}
and dhmc in
<foreach collection="dhmcList" item="item" index="index" separator="," open=" (" close=")">
#{item}
</foreach>
</select>
<update id="updatezhxxyjje" parameterType="io.renren.modules.app.entity.ZhxxEntity">
update zhxx set
yjje=#{yjje} where dhbm=#{dhbm}
......
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