Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
map-parent
Commits
315ef8c2
Commit
315ef8c2
authored
Jul 12, 2021
by
YANGYANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标识号新增和修改
parent
6fffee05
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
69 deletions
+121
-69
common/common_utils/src/main/java/com/founder/commonutils/bzptEntity/TbXwFwbsh.java
+87
-0
service/bzpt/src/main/java/com/founder/bzpt/controller/DetailController.java
+19
-57
service/bzpt/src/main/java/com/founder/bzpt/mapper/DetailMapper.java
+1
-1
service/bzpt/src/main/java/com/founder/bzpt/mapper/xml/DetailMapper.xml
+9
-7
service/bzpt/src/main/java/com/founder/bzpt/service/IDetailService.java
+2
-1
service/bzpt/src/main/java/com/founder/bzpt/service/impl/DetailServiceImpl.java
+3
-3
No files found.
common/common_utils/src/main/java/com/founder/commonutils/bzptEntity/TbXwFwbsh.java
0 → 100644
View file @
315ef8c2
package
com
.
founder
.
commonutils
.
bzptEntity
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"服务标识号"
,
description
=
"服务标识号对象"
)
public
class
TbXwFwbsh
implements
Serializable
{
private
String
rcdid
;
private
String
zjbh
;
private
String
gjc
;
private
String
bshxq
;
private
String
bshlx
;
private
String
bm
;
private
String
rylx
;
private
String
ztbs
;
public
String
getRcdid
()
{
return
rcdid
;
}
public
void
setRcdid
(
String
rcdid
)
{
this
.
rcdid
=
rcdid
;
}
public
String
getZjbh
()
{
return
zjbh
;
}
public
void
setZjbh
(
String
zjbh
)
{
this
.
zjbh
=
zjbh
;
}
public
String
getGjc
()
{
return
gjc
;
}
public
void
setGjc
(
String
gjc
)
{
this
.
gjc
=
gjc
;
}
public
String
getBshxq
()
{
return
bshxq
;
}
public
void
setBshxq
(
String
bshxq
)
{
this
.
bshxq
=
bshxq
;
}
public
String
getBshlx
()
{
return
bshlx
;
}
public
void
setBshlx
(
String
bshlx
)
{
this
.
bshlx
=
bshlx
;
}
public
String
getBm
()
{
return
bm
;
}
public
void
setBm
(
String
bm
)
{
this
.
bm
=
bm
;
}
public
String
getRylx
()
{
return
rylx
;
}
public
void
setRylx
(
String
rylx
)
{
this
.
rylx
=
rylx
;
}
public
String
getZtbs
()
{
return
ztbs
;
}
public
void
setZtbs
(
String
ztbs
)
{
this
.
ztbs
=
ztbs
;
}
}
service/bzpt/src/main/java/com/founder/bzpt/controller/DetailController.java
View file @
315ef8c2
package
com
.
founder
.
bzpt
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.founder.bzpt.service.IDetailService
;
import
com.founder.commonutils.bzptEntity.*
;
...
...
@@ -13,15 +12,10 @@ import org.elasticsearch.action.update.UpdateRequest;
import
org.elasticsearch.action.update.UpdateResponse
;
import
org.elasticsearch.client.Client
;
import
org.elasticsearch.common.xcontent.XContentFactory
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
...
...
@@ -260,11 +254,11 @@ public class DetailController {
@ApiOperation
(
value
=
"删除标识号"
)
@PostMapping
(
value
=
"/deleteBsh"
)
@ResponseBody
public
MapRestResult
deleteBsh
(
@RequestParam
(
value
=
"
zjbh"
,
defaultValue
=
""
)
String
zjbh
)
{
public
MapRestResult
deleteBsh
(
@RequestParam
(
value
=
"
rcdid"
)
String
rcdid
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashedMap
();
int
res
;
String
state
=
"error"
;
res
=
detailervice
.
deleteBsh
(
zjbh
);
res
=
detailervice
.
deleteBsh
(
rcdid
);
if
(
res
>
0
)
{
state
=
"success"
;
}
...
...
@@ -275,71 +269,39 @@ public class DetailController {
@ApiOperation
(
value
=
"新增服务标识号信息"
)
@PostMapping
(
"/insertFwbsh"
)
@ResponseBody
public
MapRestResult
insertFwbsh
(
@Request
Param
(
value
=
"insertBshItem"
)
String
insertBshItem
,
HttpServletRequest
requset
)
public
MapRestResult
insertFwbsh
(
@Request
Body
List
<
TbXwFwbsh
>
listParams
,
HttpServletRequest
requset
)
{
//拿到登录用户
//User user = (User)requset.getSession().getAttribute("USER");
//String trueName=user.getTrueName();
int
res
;
String
state
=
"error"
;
Map
<
String
,
Object
>
resultMap
=
new
HashedMap
();
String
zjbh
=
""
;
String
bm
=
""
;
String
gjc
=
""
;
String
bshxq
=
""
;
String
bshlx
=
""
;
String
rylx
=
""
;
String
ztbs
=
""
;
//解析json数据
JSONArray
json
=
JSONArray
.
parseArray
(
insertBshItem
);
Iterator
<
Object
>
iterator
=
json
.
iterator
();
while
(
iterator
.
hasNext
())
{
JSONObject
obj
=
(
JSONObject
)
iterator
.
next
();
zjbh
=
(
String
)
obj
.
get
(
"zjbh"
);
bm
=
(
String
)
obj
.
get
(
"bm"
);
gjc
=
(
String
)
obj
.
get
(
"gjc"
);
bshxq
=
(
String
)
obj
.
get
(
"bshxq"
);
bshlx
=
(
String
)
obj
.
get
(
"bshlx"
);
rylx
=
(
String
)
obj
.
get
(
"rylx"
);
ztbs
=
(
String
)
obj
.
get
(
"ztbs"
);
listParams
.
stream
().
forEach
(
p
->{
TbTzxxjqTzxxlxdy
tbTzxxjqTzxxlxdy
=
new
TbTzxxjqTzxxlxdy
();
tbTzxxjqTzxxlxdy
.
setLrr
(
"admin"
);
tbTzxxjqTzxxlxdy
.
setScbz
(
"0"
);
tbTzxxjqTzxxlxdy
.
setGxr
(
"admin"
);
tbTzxxjqTzxxlxdy
.
setBshlx
(
bshlx
);
tbTzxxjqTzxxlxdy
.
setZtbs
(
ztbs
);
tbTzxxjqTzxxlxdy
.
setZjbh
(
zjbh
);
tbTzxxjqTzxxlxdy
.
setBm
(
bm
);
tbTzxxjqTzxxlxdy
.
setBshxq
(
bshxq
);
if
(
gjc
!=
null
){
tbTzxxjqTzxxlxdy
.
setGjc
(
gjc
.
trim
());
//由于前台界面录入时复制粘贴存在前后空格的情况,故在关键词不为null时去掉字符串前后空格后入库
tbTzxxjqTzxxlxdy
.
setBshlx
(
p
.
getBshlx
()
);
tbTzxxjqTzxxlxdy
.
setZtbs
(
p
.
getZtbs
()
);
tbTzxxjqTzxxlxdy
.
setZjbh
(
p
.
getZjbh
()
);
tbTzxxjqTzxxlxdy
.
setBm
(
p
.
getBm
()
);
tbTzxxjqTzxxlxdy
.
setBshxq
(
p
.
getBshxq
()
);
if
(
p
.
getGjc
()
!=
null
){
tbTzxxjqTzxxlxdy
.
setGjc
(
p
.
getGjc
()
.
trim
());
//由于前台界面录入时复制粘贴存在前后空格的情况,故在关键词不为null时去掉字符串前后空格后入库
}
tbTzxxjqTzxxlxdy
.
setRylx
(
rylx
);
tbTzxxjqTzxxlxdy
.
setRylx
(
p
.
getRylx
()
);
String
seq
=
CommonFunc
.
getMainSeq1
();
tbTzxxjqTzxxlxdy
.
setRcdid
(
seq
);
res
=
detailervice
.
insertFwbsh
(
tbTzxxjqTzxxlxdy
);
if
(
res
>
0
)
{
state
=
"success"
;
resultMap
.
put
(
"state"
,
state
);
}
else
{
return
MapRestResult
.
build
(
200
,
"新增标识号失败"
,
"1"
,
"fail"
);
}
}
detailervice
.
insertFwbsh
(
tbTzxxjqTzxxlxdy
);
});
return
MapRestResult
.
build
(
200
,
"新增标识号成功"
,
"1"
,
"success"
);
}
@ApiOperation
(
value
=
"更新服务标识号信息"
)
@PostMapping
(
"/updateBsh"
)
@ResponseBody
public
MapRestResult
updateBsh
(
@RequestParam
(
value
=
"zjbh"
)
String
zjbh
,
@RequestParam
(
value
=
"ryxq"
)
String
ryxq
,
@RequestParam
(
value
=
"bjBshHm"
)
String
bjBshHm
,
@RequestParam
(
value
=
"bjBshXq"
)
String
bjBshXq
,
@RequestParam
(
value
=
"bshlx"
)
String
bshlx
){
Map
<
String
,
Object
>
resultMap
=
new
HashedMap
();
int
res
;
String
state
=
"error"
;
res
=
detailervice
.
updateBsh
(
zjbh
,
ryxq
,
bjBshHm
,
bjBshXq
,
bshlx
);
if
(
res
>
0
)
{
state
=
"success"
;
}
resultMap
.
put
(
"state"
,
state
);
public
MapRestResult
updateBsh
(
@RequestBody
List
<
TbXwFwbsh
>
listParams
){
listParams
.
stream
().
forEach
(
p
->{
detailervice
.
updateBsh
(
p
);
});
return
MapRestResult
.
build
(
200
,
"更新服务标识号信息成功"
,
"1"
,
"success"
);
}
...
...
service/bzpt/src/main/java/com/founder/bzpt/mapper/DetailMapper.java
View file @
315ef8c2
...
...
@@ -28,7 +28,7 @@ public interface DetailMapper {
Integer
insertFwbsh
(
TbTzxxjqTzxxlxdy
tbTzxxjqTzxxlxdy
);
Integer
updateBsh
(
@Param
(
value
=
"zjbh"
)
String
zjbh
,
@Param
(
value
=
"ryxq"
)
String
ryxq
,
@Param
(
value
=
"bjBshHm"
)
String
bjBshHm
,
@Param
(
value
=
"bjBshXq"
)
String
bjBshXq
,
@Param
(
value
=
"bshlx"
)
String
bshlx
);
Integer
updateBsh
(
TbXwFwbsh
tbXwFwbsh
);
Integer
updateTbXwAsjbzByObject
(
TbXwAsjbz
tbXwAsjbz
);
...
...
service/bzpt/src/main/java/com/founder/bzpt/mapper/xml/DetailMapper.xml
View file @
315ef8c2
...
...
@@ -417,22 +417,24 @@
AND T.ASJBH = #{asjbh}
</select>
<!--修改服务标识号-->
<update
id=
"updateBsh"
parameterType=
"com.founder.commonutils.bzptEntity.Tb
TzxxjqTzxxlxdy
"
>
<update
id=
"updateBsh"
parameterType=
"com.founder.commonutils.bzptEntity.Tb
XwFwbsh
"
>
update tb_tzxxjq_tzxxlxdy
<set>
rylx=#{ryxq},
<if
test=
"bjBshHm != null and bjBshHm !=''"
>
gjc=#{bjBshHm},
<if
test=
"rylx != null and rylx !=''"
>
rylx=#{rylx},
</if>
<if
test=
"bjBshXq != null and bjBshXq !=''"
>
bshxq=#{bjBshXq},
<if
test=
"gjc != null and gjc !=''"
>
gjc=#{gjc},
</if>
<if
test=
"bshxq != null and bshxq !=''"
>
bshxq=#{bshxq},
</if>
<if
test=
"bshlx != null and bshlx !=''"
>
bshlx=#{bshlx}
</if>
</set>
where
<if
test=
"
zjbh!=null and zjbh!=''"
>
rcdid = #{zjbh
}
</if>
<if
test=
"
rcdid!=null and rcdid!=''"
>
rcdid = #{rcdid
}
</if>
</update>
<!--现场勘验信息-->
<select
id=
"getXckyXxByObjects"
parameterType=
"String"
resultType=
"com.founder.commonutils.bzptEntity.XkXcJbXx"
>
...
...
service/bzpt/src/main/java/com/founder/bzpt/service/IDetailService.java
View file @
315ef8c2
...
...
@@ -4,6 +4,7 @@ import com.founder.commonutils.bzptEntity.*;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
public
interface
IDetailService
{
...
...
@@ -19,7 +20,7 @@ public interface IDetailService {
Integer
insertFwbsh
(
TbTzxxjqTzxxlxdy
tbTzxxjqTzxxlxdy
);
Integer
updateBsh
(
String
zjhb
,
String
ryxq
,
String
bjBshHm
,
String
bjBshXq
,
String
bshlx
);
Integer
updateBsh
(
TbXwFwbsh
tbXwFwbsh
);
Integer
updateTbXwAsjbzByObject
(
TbXwAsjbz
tbXwAsjbz
);
...
...
service/bzpt/src/main/java/com/founder/bzpt/service/impl/DetailServiceImpl.java
View file @
315ef8c2
...
...
@@ -89,12 +89,12 @@ public class DetailServiceImpl implements IDetailService {
/**
* 更新服务标识号信息
*
* @param
zjhb
* @param
* @return
*/
@Override
public
Integer
updateBsh
(
String
zjhb
,
String
ryxq
,
String
bjBshHm
,
String
bjBshXq
,
String
bshlx
)
{
return
detailDao
.
updateBsh
(
zjhb
,
ryxq
,
bjBshHm
,
bjBshXq
,
bshlx
);
public
Integer
updateBsh
(
TbXwFwbsh
tbXwFwbsh
)
{
return
detailDao
.
updateBsh
(
tbXwFwbsh
);
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment