Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
njzsb
Project
Project
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
徐州
njzsb
Commits
6fe0ff5f
Commit
6fe0ff5f
authored
Sep 29, 2022
by
徐州
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
56aafac5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
251 additions
and
17 deletions
+251
-17
Jfzm_List.jsp
WebRoot/WEB-INF/pages/jfzm/Jfzm_List.jsp
+1
-1
Jfzm_view.jsp
WebRoot/WEB-INF/pages/jfzm/Jfzm_view.jsp
+4
-3
FileUtils.java
src/com/jshx/common/utils/FileUtils.java
+48
-0
struts-jfzm.xml
src/com/jshx/jfzm/conf/struts-jfzm.xml
+4
-0
JfzmAction.java
src/com/jshx/jfzm/web/JfzmAction.java
+194
-13
No files found.
WebRoot/WEB-INF/pages/jfzm/Jfzm_List.jsp
View file @
6fe0ff5f
...
...
@@ -315,7 +315,7 @@
alert
(
'请使用谷歌浏览器或360浏览器急速模式操作'
);
return
;
}
else
{
createSimpleWindow
(
"win_jfzm
_view
"
,
"同步施工许可"
,
"${ctx}/jsp/jfzm/jfzm_view.action?id="
+
id
,
800
,
900
);
createSimpleWindow
(
"win_jfzm
1
"
,
"同步施工许可"
,
"${ctx}/jsp/jfzm/jfzm_view.action?id="
+
id
,
800
,
900
);
}
}
</script>
...
...
WebRoot/WEB-INF/pages/jfzm/Jfzm_view.jsp
View file @
6fe0ff5f
...
...
@@ -451,14 +451,15 @@
<tr>
<td
colspan=
"4"
height=
"50px"
style=
"text-align:center"
>
<a
href=
"#"
class=
"btn_01"
onclick=
"doPrint()"
>
确认同步
<b></b></a>
<a
href=
"#"
class=
"btn_01"
onclick=
"parent.close_win('win_jfzm
_view
');"
>
关闭
<b></b></a>
<a
href=
"#"
class=
"btn_01"
onclick=
"parent.close_win('win_jfzm
1
');"
>
关闭
<b></b></a>
</td>
</tr>
</table>
<form
name=
"myform1"
id=
"myform1"
method=
"post"
enctype=
"multipart/form-data"
action=
"
fujian
tongbu.action"
>
<form
name=
"myform1"
id=
"myform1"
method=
"post"
enctype=
"multipart/form-data"
action=
"
jfpz
tongbu.action"
>
<s:token
/>
<input
type=
"hidden"
name=
"xmxxb.xxylb"
value=
"${rfxm.xxylbbh}"
>
<input
type=
"hidden"
name=
"file"
value=
""
id=
"sgxkz_img"
>
<input
type=
"hidden"
name=
"id"
value=
"缴费凭证.png"
>
<input
type=
"hidden"
name=
"fileBase64"
value=
""
id=
"sgxkz_img"
>
</form>
</body>
</html>
src/com/jshx/common/utils/FileUtils.java
View file @
6fe0ff5f
...
...
@@ -19,6 +19,7 @@ import javax.imageio.ImageIO;
import
org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper
;
import
com.jshx.core.utils.StringUtil
;
import
sun.misc.BASE64Decoder
;
public
class
FileUtils
{
public
static
String
fileRealName
=
""
;
// 保存上传附件的真实名称
...
...
@@ -213,6 +214,53 @@ public class FileUtils {
}
return
filename
;
}
public
static
String
uploadFileStr
(
String
fileBase64
,
String
FileName
,
String
path
)
{
String
filename
=
""
;
try
{
// 如果文件夹不存在,创建文件夹,将文件保存到目录
File
dir
=
new
File
(
path
);
if
(!
dir
.
exists
())
{
dir
.
mkdirs
();
}
filename
=
FileName
;
fileRealName
+=
FileName
+
";"
;
File
file1
=
new
File
(
path
+
FileName
);
byte
[]
data
=
new
byte
[
10
*
1024
];
int
byteRead
=
-
1
;
BASE64Decoder
decoder
=
new
BASE64Decoder
();
//转换前端数据
fileBase64
=
fileBase64
.
replaceAll
(
" "
,
"+"
);
//去除多余部分
fileBase64
=
fileBase64
.
replace
(
"data:image/png;base64,"
,
""
);
byte
[]
b
=
decoder
.
decodeBuffer
(
fileBase64
);
for
(
int
i
=
0
;
i
<
b
.
length
;
i
++)
{
if
(
b
[
i
]
<
0
)
{
// 调整异常数据
b
[
i
]
+=
256
;
}
}
FileOutputStream
out
=
new
FileOutputStream
(
file1
);
out
.
write
(
b
);
out
.
flush
();
out
.
close
();
}
catch
(
FileNotFoundException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
filename
;
}
public
static
String
uploadFile
(
File
file
,
String
FileName
,
String
path
,
String
slbh
,
String
dwdm
,
String
clno
)
{
String
filename
=
""
;
...
...
src/com/jshx/jfzm/conf/struts-jfzm.xml
View file @
6fe0ff5f
...
...
@@ -39,5 +39,9 @@
<result
name=
"invalid.token"
>
/invalid.jsp
</result>
</action>
<action
name=
"jfpztongbu"
class=
"com.jshx.jfzm.web.JfzmAction"
method=
"jfpztongbu"
>
</action>
</package>
</struts>
src/com/jshx/jfzm/web/JfzmAction.java
View file @
6fe0ff5f
...
...
@@ -11,12 +11,15 @@ import com.jshx.core.utils.Struts2Util;
import
com.jshx.core.utils.SysPropertiesUtil
;
import
com.jshx.jktzs.entity.Jktzs
;
import
com.jshx.jktzs.service.JktzsService
;
import
com.jshx.module.admin.web.action.CommonAction
;
import
com.jshx.paymentItemHis.entity.PaymentItemHis
;
import
com.jshx.paymentItemHis.service.PaymentItemHisService
;
import
com.jshx.rfxm.entity.Rfxm
;
import
com.jshx.rfxm.entity.RfxmSfxx
;
import
com.jshx.rfxm.service.RfxmService
;
import
com.jshx.rfxm.service.RfxmSfxxService
;
import
com.jshx.spjlb.entity.Spjlb
;
import
com.jshx.spjlb.service.SpjlbService
;
import
com.jshx.wwjdclinfo.entity.Wwjdclinfo
;
import
com.jshx.wwjdclinfo.service.WwjdclinfoService
;
import
com.jshx.wwsqys.entity.Wwsqys
;
...
...
@@ -29,17 +32,19 @@ import net.sf.json.JSONObject;
import
net.sf.json.JsonConfig
;
import
org.activiti.editor.language.json.converter.util.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
sun.misc.BASE64Decoder
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
public
class
JfzmAction
extends
BaseAction
{
@Autowired
private
JktzsService
jktzsService
;
@Autowired
private
SpjlbService
spjlbService
;
@Autowired
RfxmService
rfxmService
;
...
...
@@ -200,6 +205,166 @@ public class JfzmAction extends BaseAction {
}
private
File
file
;
//文件上传
private
String
fileBase64
;
//文件上传
private
String
ids
;
/**
* 缴费凭证同步
* @throws Exception
*/
public
void
jfpztongbu
()
throws
Exception
{
fujiantongbu
();
xxsyncPz
(
xmxxb
);
}
/**
* 线下项目同步凭证方法
*/
private
void
xxsyncPz
(
Xmxxb
xmxxb
)
throws
Exception
{
//根据信息一览表id查询办件材料表的信息
Map
<
String
,
Object
>
paraMap
=
new
HashMap
<>();
paraMap
.
put
(
"xxylb"
,
xmxxb
.
getXxylb
());
Pagination
pagination
=
wwjdclinfoService
.
findByPage
(
new
Pagination
(
1
,
0
),
paraMap
);
List
<
Wwjdclinfo
>
listOfObject
=
pagination
.
getListOfObject
();
if
(
CollectionUtils
.
isEmpty
(
listOfObject
))
{
this
.
getResponse
().
getWriter
().
println
(
"{\"result\":\"false\",\"info\":\"结果件未上传!\"}"
);
return
;
}
Wwjdclinfo
wwjdclinfo2
=
null
;
String
flag2
=
null
;
for
(
Wwjdclinfo
wwjdclinfo
:
listOfObject
)
{
if
(
"缴费凭证"
.
equals
(
wwjdclinfo
.
getFjqm
()))
{
flag2
=
wwjdclinfo
.
getIsSync
();
wwjdclinfo2
=
wwjdclinfo
;
}
}
if
(
wwjdclinfo2
==
null
)
{
this
.
getResponse
().
getWriter
().
println
(
"{\"result\":\"false\",\"info\":\"缴费凭证未上传!\"}"
);
return
;
}
if
(
"yes"
.
equals
(
flag2
)
&&
"yes"
.
equals
(
xmxxb
.
getIstbsgxt
()))
{
this
.
getResponse
().
getWriter
().
println
(
"{\"result\":\"false\",\"info\":\"不可重复同步!\"}"
);
return
;
}
PaymentItemHis
paymentItemHis
=
paymentItemHisService
.
getByXmbId
(
xmxxb
.
getId
());
Map
<
String
,
String
>
map
=
new
HashMap
();
//凭证同步
map
.
put
(
"wwsqbh"
,
wwjdclinfo2
.
getWwsqbh
());
// map.put("xxylb",wwjdclinfo2.getXxylb());
map
.
put
(
"fjqm"
,
wwjdclinfo2
.
getFjqm
());
map
.
put
(
"Scwjm"
,
wwjdclinfo2
.
getScwjm
());
map
.
put
(
"scdz"
,
wwjdclinfo2
.
getScdz
());
//电子监管号
map
.
put
(
"dzjgh"
,
paymentItemHis
.
getECN
());
map
.
put
(
"jfpzbh"
,
paymentItemHis
.
getZslxdbh
());
map
.
put
(
"xmslbh"
,
paymentItemHis
.
getSlbh
());
// map.put("jfje",paymentItemHis.getZyjje());//缴费金额
// map.put("mjje",paymentItemHis.getZymje());//免缴金额
map
.
put
(
"xxylb"
,
xmxxb
.
getXxylb
());
map
.
put
(
"fgwxmbh"
,
xmxxb
.
getLxpw
());
map
.
put
(
"jsdw"
,
xmxxb
.
getJsdw
());
map
.
put
(
"xmmc"
,
xmxxb
.
getXmmc
());
map
.
put
(
"gcxmdz"
,
xmxxb
.
getJsdd
());
map
.
put
(
"szmj"
,
xmxxb
.
getZjsmj
());
map
.
put
(
"bz"
,
xmxxb
.
getBeizhu
());
map
.
put
(
"jfpzlxdh"
,
xmxxb
.
getPhone
());
map
.
put
(
"jfpzlxr"
,
xmxxb
.
getLianxiren
());
map
.
put
(
"jddh"
,
"000000"
);
map
.
put
(
"jfpzdyrq"
,
paymentItemHis
.
getUpdateTime
().
toString
());
map
.
put
(
"ghxmbh"
,
xmxxb
.
getXmbh
());
//规划项目编号
//审核过程记录
Map
<
String
,
Object
>
jkjlb
=
new
HashMap
<
String
,
Object
>();
jkjlb
.
put
(
"xxbbh"
,
xmxxb
.
getXxylb
());
List
<
Spjlb
>
ls
=
spjlbService
.
findSpjlball
(
jkjlb
);
String
csr
=
""
;
//初审人
String
csyj
=
""
;
//初审意见
String
fhr
=
""
;
//复核人
String
fhyj
=
""
;
//复核意见
String
yjfy
=
""
;
//应缴金额
if
(
null
!=
ls
&&
ls
.
size
()>
0
){
csr
=
ls
.
get
(
0
).
getCsr
();
csyj
=
ls
.
get
(
0
).
getCsbz
();
fhr
=
ls
.
get
(
0
).
getFhr
();
fhyj
=
ls
.
get
(
0
).
getFhbz
();
Map
<
String
,
Object
>
jktzmap1
=
new
HashMap
<
String
,
Object
>();
jktzmap1
.
put
(
"slbh"
,
ls
.
get
(
0
).
getSlbh
());
List
<
Jktzs
>
jklist
=
jktzsService
.
findByAll
(
jktzmap1
);
if
(
null
!=
jklist
&&
jklist
.
size
()>
0
){
Jktzs
jk
=
jklist
.
get
(
0
);
yjfy
=
jk
.
getJfje
();
map
.
put
(
"ghxkzbh"
,
jk
.
getGhxkz
());
//规划许可证编号
map
.
put
(
"jfmj"
,
jk
.
getJfmj
());
//缴费面积
map
.
put
(
"jfje"
,
jk
.
getJfje
());
//缴费金额
map
.
put
(
"mjmj"
,
jk
.
getMjmj
());
//免缴面积
map
.
put
(
"mjje"
,
jk
.
getMjje
());
//免缴金额
map
.
put
(
"qtfy"
,
jk
.
getRfyj
());
//其他费用
map
.
put
(
"jktzsbh"
,
jk
.
getDzbh
());
//缴款通知书编号
}
}
map
.
put
(
"csr"
,
csr
);
map
.
put
(
"csyj"
,
csyj
);
map
.
put
(
"fhr"
,
fhr
);
map
.
put
(
"fhyj"
,
fhyj
);
map
.
put
(
"yjfy"
,
yjfy
);
if
(
"001"
.
equals
(
xmxxb
.
getMjyj
())||
"005"
.
equals
(
xmxxb
.
getMjyj
()))
{
map
.
put
(
"isneed"
,
"yes"
);
}
else
{
map
.
put
(
"isneed"
,
"no"
);
}
map
.
put
(
"key"
,
String
.
valueOf
((
new
Date
().
getTime
()*
6
+
1
)/
7
));
map
.
put
(
"method"
,
"xxsyncpz"
);
String
dwdm
=
""
;
if
(!
this
.
getLoginUser
().
getIsSuperAdmin
())
{
dwdm
=
StringUtil
.
isEmpty
(
xmxxb
.
getDwdm
())?
zsdwService
.
getDwdm
(
this
.
getLoginUserDepartmentId
()):
xmxxb
.
getDwdm
();
}
String
result3
=
CommonAction
.
send2wwSGXK
(
xmxxb
,
null
,
dwdm
,
map
);
//arvin1122
// String result3 = "true";
// String result3 = com.jshx.module.admin.web.action.CommonAction.send2ww(map,null);
if
(
StringUtil
.
isEmpty
(
result3
)||
"false"
.
equals
(
result3
))
{
this
.
getResponse
().
getWriter
().
println
(
"{\"result\":\"false\",\"info\":\"同步失败!\"}"
);
return
;
}
else
if
(
"true"
.
equals
(
result3
))
{
//更新表字段isSync为yes
wwjdclinfo2
.
setIsSync
(
"yes"
);
wwjdclinfoService
.
update
(
wwjdclinfo2
);
/*if(paymentItemHis.getYzsFlag() == 2){
savePaymentVerification(xmxxb, paymentItemHis);
}*/
HashMap
<
String
,
Object
>
rfxmParam
=
new
HashMap
<>();
rfxmParam
.
put
(
"paymentHisId"
,
paymentItemHis
.
getId
());
List
<
Rfxm
>
rfxmList
=
rfxmService
.
findRfxm
(
rfxmParam
);
if
(
rfxmList
!=
null
&&
rfxmList
.
size
()
>
0
)
{
//同步成功记录下,不允许再次同步了
Rfxm
rfxm
=
rfxmList
.
get
(
0
);
rfxm
.
setIsTb
(
1
);
rfxmService
.
update
(
rfxm
);
}
this
.
getResponse
().
getWriter
().
println
(
"{\"result\":\"true\",\"info\":\"查询成功\"}"
);
return
;
}
}
/**
* 凭证上传
...
...
@@ -211,14 +376,16 @@ public class JfzmAction extends BaseAction {
String
rubiaopath
=
""
;
//id : uploadName;ids:uploadShowName
String
ids
=
"一般缴款书"
;
if
(
file
!=
null
&&
StringUtil
.
isNotEmpty
(
id
))
{
//TODO 上传文件
String
path
=
SysPropertiesUtil
.
jdlj
(
this
.
getRequest
())
+
File
.
separator
+
"wwupload"
+
File
.
separator
+
"bjcl"
+
File
.
separator
+
xmxxb
.
getXxylb
()+
File
.
separator
;
rubiaopath
=
"wwupload"
+
File
.
separator
+
"bjcl"
+
File
.
separator
+
xmxxb
.
getXxylb
()+
File
.
separator
+
id
;
rubiaopath
=
rubiaopath
.
replaceAll
(
"\\\\"
,
"/"
).
trim
();
path
=
path
.
replaceAll
(
"\\\\"
,
"/"
).
trim
();
//TODO 上传文件
String
path
=
SysPropertiesUtil
.
jdlj
(
this
.
getRequest
())
+
File
.
separator
+
"wwupload"
+
File
.
separator
+
"bjcl"
+
File
.
separator
+
xmxxb
.
getXxylb
()+
File
.
separator
;
rubiaopath
=
"wwupload"
+
File
.
separator
+
"bjcl"
+
File
.
separator
+
xmxxb
.
getXxylb
()+
File
.
separator
+
id
;
rubiaopath
=
rubiaopath
.
replaceAll
(
"\\\\"
,
"/"
).
trim
();
path
=
path
.
replaceAll
(
"\\\\"
,
"/"
).
trim
();
if
(
fileBase64
!=
null
)
{
fileName1
=
FileUtils
.
uploadFileStr
(
fileBase64
,
id
,
path
);
ids
=
"缴费凭证"
;
}
else
if
(
file
!=
null
&&
StringUtil
.
isNotEmpty
(
id
))
{
fileName1
=
FileUtils
.
uploadFile
(
file
,
id
,
path
);
}
Wwjdclinfo
wwjdclinfo
=
new
Wwjdclinfo
();
...
...
@@ -324,5 +491,19 @@ public class JfzmAction extends BaseAction {
this
.
file
=
file
;
}
public
String
getFileBase64
()
{
return
fileBase64
;
}
public
void
setFileBase64
(
String
fileBase64
)
{
this
.
fileBase64
=
fileBase64
;
}
public
String
getIds
()
{
return
ids
;
}
public
void
setIds
(
String
ids
)
{
this
.
ids
=
ids
;
}
}
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