Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwell-mes
Project
Project
Details
Activity
Releases
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
gavelinfo
kwell-mes
Commits
ab90be4a
Commit
ab90be4a
authored
Apr 02, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes
parents
824675b9
1d82f146
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
260 additions
and
21 deletions
+260
-21
BzgxFjController.java
...ain/java/com/gavel/kwell/controller/BzgxFjController.java
+95
-0
GpfkController.java
.../main/java/com/gavel/kwell/controller/GpfkController.java
+0
-2
GylxFjController.java
...ain/java/com/gavel/kwell/controller/GylxFjController.java
+96
-0
GpfkcxDaoImpl.java
...src/main/java/com/gavel/kwell/dao/impl/GpfkcxDaoImpl.java
+8
-3
GpfkfjService.java
.../src/main/java/com/gavel/kwell/service/GpfkfjService.java
+3
-0
GpfkServiceImpl.java
...in/java/com/gavel/kwell/service/impl/GpfkServiceImpl.java
+2
-0
GpfkfjServiceImpl.java
.../java/com/gavel/kwell/service/impl/GpfkfjServiceImpl.java
+40
-4
echarts.js
gavel/src/main/resources/static/js/dashboard/echarts.js
+16
-12
No files found.
gavel/src/main/java/com/gavel/kwell/controller/BzgxFjController.java
0 → 100644
View file @
ab90be4a
package
com
.
gavel
.
kwell
.
controller
;
import
java.io.FileInputStream
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.bind.annotation.PathVariable
;
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.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gavel.common.SystemOperation
;
import
com.gavel.common.annotation.ResourcePermissions
;
import
com.gavel.common.attachment.persistent.Attachment
;
import
com.gavel.common.base.controller.BaseController
;
import
com.gavel.common.utils.ThreadContext
;
import
com.gavel.gygl.service.BzgxService
;
import
com.gavel.kwell.service.GpfkfjService
;
@Controller
@RequestMapping
(
"gygl/bzgx"
)
public
class
BzgxFjController
extends
BaseController
{
private
static
final
String
ATTACHMENT_FOLDER
=
"bzgx"
;
@Autowired
private
BzgxService
bzgxService
;
@Autowired
private
GpfkfjService
gpfkfjService
;
@RequestMapping
(
value
=
"attachment/list"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
attachmentListSub
(
@RequestBody
JSONObject
param
)
{
return
buildReturnData
(
getAttachmentListSub
(
ATTACHMENT_FOLDER
,
param
),
Attachment
.
class
);
}
@ResourcePermissions
({
SystemOperation
.
BottonResource
.
ADD
,
SystemOperation
.
BottonResource
.
EDIT
})
@PostMapping
(
value
=
"attachment/upload"
)
@ResponseBody
public
Object
attachmentUpload
(
HttpServletRequest
request
,
@RequestParam
(
"groupid"
)
String
groupid
,
@RequestParam
(
"folder"
)
String
folder
)
{
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
request
;
MultiValueMap
<
String
,
MultipartFile
>
multiValueMap
=
multipartRequest
.
getMultiFileMap
();
for
(
MultipartFile
multipartFile
:
multiValueMap
.
toSingleValueMap
().
values
())
{
gpfkfjService
.
checkGxfjIfFitRule
(
multipartFile
,
getFolder
(
folder
,
ATTACHMENT_FOLDER
),
groupid
);
bzgxService
.
attachmentUpload
(
multipartFile
,
getFolder
(
folder
,
ATTACHMENT_FOLDER
),
groupid
);
}
return
ThreadContext
.
getReturnData
();
}
@ResourcePermissions
({
SystemOperation
.
BottonResource
.
ADD
,
SystemOperation
.
BottonResource
.
EDIT
})
@PostMapping
(
value
=
"attachment/upload/update"
)
@ResponseBody
public
Object
attachmentUploadUpdate
(
HttpServletRequest
request
,
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"message"
)
String
message
)
{
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
request
;
MultiValueMap
<
String
,
MultipartFile
>
multiValueMap
=
multipartRequest
.
getMultiFileMap
();
for
(
MultipartFile
multipartFile
:
multiValueMap
.
toSingleValueMap
().
values
())
{
bzgxService
.
attachmentUploadUpdate
(
multipartFile
,
id
,
message
);
}
return
ThreadContext
.
getReturnData
();
}
@RequestMapping
(
value
=
"attachment/download/{id}"
)
public
void
attachmentDownLoad
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@PathVariable
String
id
)
{
FileInputStream
fileInputStream
=
bzgxService
.
attachmentDownload
(
id
);
doAttachmentDownLoad
(
id
,
request
,
response
,
fileInputStream
);
}
@RequestMapping
(
value
=
"attachment/preview/{id}"
)
public
void
attachmentPreview
(
HttpServletResponse
response
,
@PathVariable
String
id
)
{
FileInputStream
fileInputStream
=
bzgxService
.
attachmentDownload
(
id
);
doAttachmentPreview
(
id
,
response
,
fileInputStream
);
}
@ResourcePermissions
({
SystemOperation
.
BottonResource
.
ADD
,
SystemOperation
.
BottonResource
.
DELETE
})
@PostMapping
(
value
=
"attachment/delete"
)
@ResponseBody
public
Object
attachmentDelete
(
@RequestBody
JSONObject
param
)
{
JSONArray
idArray
=
param
.
getJSONArray
(
"id"
);
for
(
int
i
=
0
;
i
<
idArray
.
size
();
i
++)
{
String
id
=
idArray
.
getString
(
i
);
bzgxService
.
attachmentDelete
(
id
);
}
return
ThreadContext
.
getReturnData
();
}
}
gavel/src/main/java/com/gavel/kwell/controller/GpfkController.java
View file @
ab90be4a
package
com
.
gavel
.
kwell
.
controller
;
import
java.io.FileInputStream
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -278,7 +277,6 @@ public class GpfkController extends BaseController {
FileInputStream
fileInputStream
=
attachmentService
.
download
(
file
.
getId
());
doAttachmentPreview
(
file
.
getId
(),
response
,
fileInputStream
);
}
}
@RequestMapping
(
value
=
"/jgfk"
,
method
=
RequestMethod
.
POST
)
...
...
gavel/src/main/java/com/gavel/kwell/controller/GylxFjController.java
0 → 100644
View file @
ab90be4a
package
com
.
gavel
.
kwell
.
controller
;
import
java.io.FileInputStream
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.bind.annotation.PathVariable
;
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.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gavel.common.SystemOperation
;
import
com.gavel.common.annotation.ResourcePermissions
;
import
com.gavel.common.attachment.persistent.Attachment
;
import
com.gavel.common.base.controller.BaseController
;
import
com.gavel.common.utils.ThreadContext
;
import
com.gavel.gygl.service.GylxService
;
import
com.gavel.kwell.service.GpfkfjService
;
@Controller
@RequestMapping
(
"gygl/gylx"
)
public
class
GylxFjController
extends
BaseController
{
private
static
final
String
ATTACHMENT_FOLDER
=
"gylx"
;
@Autowired
private
GylxService
gylxService
;
@Autowired
private
GpfkfjService
gpfkfjService
;
@RequestMapping
(
value
=
"attachment/list"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
attachmentListSub
(
@RequestBody
JSONObject
param
)
{
return
buildReturnData
(
getAttachmentListSub
(
ATTACHMENT_FOLDER
,
param
),
Attachment
.
class
);
}
@ResourcePermissions
({
SystemOperation
.
BottonResource
.
ADD
,
SystemOperation
.
BottonResource
.
EDIT
})
@PostMapping
(
value
=
"attachment/upload"
)
@ResponseBody
public
Object
attachmentUpload
(
HttpServletRequest
request
,
@RequestParam
(
"groupid"
)
String
groupid
,
@RequestParam
(
"folder"
)
String
folder
)
{
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
request
;
MultiValueMap
<
String
,
MultipartFile
>
multiValueMap
=
multipartRequest
.
getMultiFileMap
();
for
(
MultipartFile
multipartFile
:
multiValueMap
.
toSingleValueMap
().
values
())
{
gpfkfjService
.
checkGxfjIfFitRule
(
multipartFile
,
getFolder
(
folder
,
ATTACHMENT_FOLDER
),
groupid
);
gylxService
.
attachmentUpload
(
multipartFile
,
getFolder
(
folder
,
ATTACHMENT_FOLDER
),
groupid
);
}
return
ThreadContext
.
getReturnData
();
}
@ResourcePermissions
({
SystemOperation
.
BottonResource
.
ADD
,
SystemOperation
.
BottonResource
.
EDIT
})
@PostMapping
(
value
=
"attachment/upload/update"
)
@ResponseBody
public
Object
attachmentUploadUpdate
(
HttpServletRequest
request
,
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"message"
)
String
message
)
{
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
request
;
MultiValueMap
<
String
,
MultipartFile
>
multiValueMap
=
multipartRequest
.
getMultiFileMap
();
for
(
MultipartFile
multipartFile
:
multiValueMap
.
toSingleValueMap
().
values
())
{
gylxService
.
attachmentUploadUpdate
(
multipartFile
,
id
,
message
);
}
return
ThreadContext
.
getReturnData
();
}
@RequestMapping
(
value
=
"attachment/download/{id}"
)
public
void
attachmentDownLoad
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@PathVariable
String
id
)
{
FileInputStream
fileInputStream
=
gylxService
.
attachmentDownload
(
id
);
doAttachmentDownLoad
(
id
,
request
,
response
,
fileInputStream
);
}
@RequestMapping
(
value
=
"attachment/preview/{id}"
)
public
void
attachmentPreview
(
HttpServletResponse
response
,
@PathVariable
String
id
)
{
FileInputStream
fileInputStream
=
gylxService
.
attachmentDownload
(
id
);
doAttachmentPreview
(
id
,
response
,
fileInputStream
);
}
@ResourcePermissions
({
SystemOperation
.
BottonResource
.
ADD
,
SystemOperation
.
BottonResource
.
DELETE
})
@PostMapping
(
value
=
"attachment/delete"
)
@ResponseBody
public
Object
attachmentDelete
(
@RequestBody
JSONObject
param
)
{
JSONArray
idArray
=
param
.
getJSONArray
(
"id"
);
for
(
int
i
=
0
;
i
<
idArray
.
size
();
i
++)
{
String
id
=
idArray
.
getString
(
i
);
gylxService
.
attachmentDelete
(
id
);
}
return
ThreadContext
.
getReturnData
();
}
}
gavel/src/main/java/com/gavel/kwell/dao/impl/GpfkcxDaoImpl.java
View file @
ab90be4a
...
...
@@ -156,15 +156,20 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap
.
append
(
"from GPFKJG "
);
sqlMap
.
append
(
" left join WOGYLX on WOGYLX_ID = GPFKJG_FKGX "
);
sqlMap
.
append
(
" left join BZGX on BZGX_ID = WOGYLX_BZGXID "
);
sqlMap
.
append
(
"where (GPFKJG_FKSJ >= :pStart and GPFKJG_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) "
);
sqlMap
.
setParamValue
(
"pStart"
,
DateUtils
.
beginOfDay
(
DateUtils
.
getCurrentWeekDateBegin
(
date
)));
sqlMap
.
setParamValue
(
"pEnd"
,
DateUtils
.
endOfDay
(
DateUtils
.
getCurrentWeekDateEnd
(
date
)));
sqlMap
.
append
(
"where (GPFKJG_FKSJ >= :pKsrq and GPFKJG_FKSJ < :pJsrq) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) "
);
sqlMap
.
setParamValue
(
"pDGxbz"
,
GxlxGxbzEnum
.
ONLY
.
getId
());
sqlMap
.
setParamValue
(
"pMGxbz"
,
GxlxGxbzEnum
.
LAST
.
getId
());
if
(
StringUtils
.
isNotEmpty
(
woid
)){
sqlMap
.
append
(
" and WOGYLX_WOID = :pWoid "
);
sqlMap
.
setParamValue
(
"pWoid"
,
woid
);
}
}
else
{
sqlMap
.
append
(
" and exists(select 1 from PCJHMX where PCJHMX_WOID = WOGYLX_WOID "
);
sqlMap
.
append
(
" and( ( :pKsrq <= PCJHMX_JHRQ and U_PCJHMX_JSRQ <= :pJsrq ) "
);
sqlMap
.
append
(
" or ( PCJHMX_JHRQ < :pKsrq and U_PCJHMX_JSRQ > :pKsrq ) "
);
sqlMap
.
append
(
" or ( PCJHMX_JHRQ < :pJsrq and U_PCJHMX_JSRQ > :pJsrq))) "
);
}
sqlMap
.
setParamValue
(
"pKsrq"
,
DateUtils
.
beginOfDay
(
DateUtils
.
getCurrentWeekDateBegin
(
date
)));
sqlMap
.
setParamValue
(
"pJsrq"
,
DateUtils
.
endOfDay
(
DateUtils
.
getCurrentWeekDateEnd
(
date
)));
return
sqlMap
.
queryEntity
(
Gpfkjg
.
class
);
}
...
...
gavel/src/main/java/com/gavel/kwell/service/GpfkfjService.java
View file @
ab90be4a
package
com
.
gavel
.
kwell
.
service
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.gavel.common.attachment.persistent.Attachment
;
import
com.gavel.common.base.service.BaseEditService
;
...
...
@@ -9,4 +11,5 @@ public interface GpfkfjService extends BaseEditService {
public
Attachment
queryBzgxFj
(
String
bzgxid
,
String
type
);
public
void
checkGxfjIfFitRule
(
MultipartFile
multipartFile
,
String
folderorpath
,
String
groupid
);
}
gavel/src/main/java/com/gavel/kwell/service/impl/GpfkServiceImpl.java
View file @
ab90be4a
...
...
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.gavel.common.Constants
;
import
com.gavel.common.attachment.persistent.Attachment
;
...
...
@@ -1967,5 +1968,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
}
/************ -------------------科威尔反馈升级--END--------- ******/
}
gavel/src/main/java/com/gavel/kwell/service/impl/GpfkfjServiceImpl.java
View file @
ab90be4a
...
...
@@ -6,8 +6,11 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.gavel.common.attachment.persistent.Attachment
;
import
com.gavel.common.attachment.persistent.Folder
;
import
com.gavel.common.attachment.service.AttachmentFolderService
;
import
com.gavel.common.attachment.service.AttachmentService
;
import
com.gavel.common.base.service.impl.BaseEditServiceImpl
;
import
com.gavel.gygl.dao.BzgxDao
;
...
...
@@ -18,7 +21,8 @@ import com.gavel.kwell.service.GpfkfjService;
@Service
(
"gpfkfjService"
)
@Transactional
public
class
GpfkfjServiceImpl
extends
BaseEditServiceImpl
implements
GpfkfjService
{
@Autowired
private
AttachmentFolderService
attachmentFolderService
;
@Autowired
private
AttachmentService
attachmentService
;
...
...
@@ -26,7 +30,7 @@ public class GpfkfjServiceImpl extends BaseEditServiceImpl implements GpfkfjServ
@Autowired
private
BzgxDao
bzgxDao
;
private
static
final
String
ZDS1_FLODER
=
"
bzgx\\gyzyzdso
"
;
private
static
final
String
ZDS1_FLODER
=
"
gylx
"
;
private
static
final
String
ZDS2_FLODER
=
"bzgx\\gyzyzdss"
;
...
...
@@ -35,7 +39,6 @@ public class GpfkfjServiceImpl extends BaseEditServiceImpl implements GpfkfjServ
private
static
final
String
ZDS2_BZ
=
"T"
;
private
static
final
String
SP_BZ
=
"M"
;
@Override
public
void
initService
()
{
}
...
...
@@ -68,9 +71,42 @@ public class GpfkfjServiceImpl extends BaseEditServiceImpl implements GpfkfjServ
}
@Override
public
void
checkGxfjIfFitRule
(
MultipartFile
multipartFile
,
String
folderorpath
,
String
groupid
)
{
Folder
folder
=
attachmentFolderService
.
getFolder
(
folderorpath
,
true
);
if
(
folder
!=
null
&&
StringUtils
.
isNotEmpty
(
folder
.
getPath
()))
{
String
suffix
=
getFileSuffix
(
multipartFile
);
if
(
folder
.
getPath
().
equals
(
ZDS1_FLODER
))
{
if
(!
suffix
.
toUpperCase
().
endsWith
(
".PDF"
))
{
throwReturnMessage
(
"上传文件得为PDF格式!,请重新检查!"
);
}
}
else
if
(
folder
.
getPath
().
equals
(
ZDS2_FLODER
))
{
if
(!
suffix
.
toUpperCase
().
endsWith
(
".PDF"
))
{
throwReturnMessage
(
"上传文件得为PDF格式!,请重新检查!"
);
}
}
else
if
(
folder
.
getPath
().
equals
(
SP_FLODER
))
{
if
(!
suffix
.
toUpperCase
().
endsWith
(
".MP4"
))
{
throwReturnMessage
(
"上传文件得为MP4视频格式!,请重新检查!"
);
}
}
else
{
}
}
}
public
static
String
getFileSuffix
(
MultipartFile
multipartFile
)
{
//获取文件全名
String
filename
=
multipartFile
.
getOriginalFilename
();
//对文文件的全名进行截取然后在后缀名进行删选。
int
begin
=
filename
.
indexOf
(
"."
);
int
last
=
filename
.
length
();
//获得文件后缀名
return
filename
.
substring
(
begin
,
last
);
}
}
gavel/src/main/resources/static/js/dashboard/echarts.js
View file @
ab90be4a
...
...
@@ -2525,9 +2525,13 @@ function setPieDailyChart(chart, cerpent, pdata) {
apidata
.
wgsl
=
0
if
(
pdata
)
{
apidata
=
pdata
if
(
apidata
.
wgsl
>
apidata
.
jhsl
){
apidata
.
wgsl
=
pidata
.
jhsl
console
.
log
(
"apidata"
)
console
.
log
(
apidata
)
}
if
((
apidata
.
jhsl
-
apidata
.
wgsl
)
<
0
){
var
wwcsl
=
0
}
else
{
var
wwcsl
=
apidata
.
jhsl
-
apidata
.
wgsl
}
var
ops
=
{
color
:
[
"#A2E9FF"
,
"#409eff"
],
...
...
@@ -2569,7 +2573,7 @@ function setPieDailyChart(chart, cerpent, pdata) {
}
},
data
:
[{
value
:
(
apidata
.
jhsl
-
apidata
.
wgsl
)
||
0
,
value
:
wwcsl
||
0
,
name
:
'未完工'
},
{
...
...
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