Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
c1d9620f
Commit
c1d9620f
authored
Dec 11, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-户配置调整
parent
c7754985
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1274 additions
and
1022 deletions
+1274
-1022
TSocialDeadlineInfo.java
...cloud/plus/v1/yifu/social/entity/TSocialDeadlineInfo.java
+57
-52
SocialHandleSearchVo.java
...fu/cloud/plus/v1/yifu/social/vo/SocialHandleSearchVo.java
+8
-0
pom.xml
yifu-social/yifu-social-biz/pom.xml
+40
-25
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+131
-113
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+11
-9
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+74
-83
ExcelMergeImage.java
.../yifu/cloud/plus/v1/yifu/social/util/ExcelMergeImage.java
+132
-0
ExcelToImage.java
...com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
+74
-0
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+655
-646
TSocialDeadlineInfoMapper.xml
...z/src/main/resources/mapper/TSocialDeadlineInfoMapper.xml
+92
-94
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialDeadlineInfo.java
View file @
c1d9620f
...
...
@@ -85,69 +85,37 @@ public class TSocialDeadlineInfo extends BaseEntity {
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
town
;
/**
* 社保
增员起始日期
* 社保
(增员)起始日
*/
@ExcelAttribute
(
name
=
"社保
增员起始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"社保增员起始日期
不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"社保
增员起始日期
不能为空"
)
@ExcelProperty
(
"社保
增员起始日期
"
)
@Schema
(
description
=
"社保
增员起始日期
"
)
@ExcelAttribute
(
name
=
"社保
起始日"
,
isNotEmpty
=
true
,
errorInfo
=
"社保起始日
不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"社保
起始日
不能为空"
)
@ExcelProperty
(
"社保
起始日
"
)
@Schema
(
description
=
"社保
起始日
"
)
private
Date
socialStartDate
;
/**
* 社保
增员截止日期
* 社保
(增员)截止日
*/
@ExcelAttribute
(
name
=
"社保
增员截止日期"
,
isNotEmpty
=
true
,
errorInfo
=
"社保增员截止日期
不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"社保
增员截止日期
不能为空"
)
@ExcelProperty
(
"社保
增员截止日期
"
)
@Schema
(
description
=
"社保
增员截止日期
"
)
@ExcelAttribute
(
name
=
"社保
截止日"
,
isNotEmpty
=
true
,
errorInfo
=
"社保截止日
不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"社保
截止日
不能为空"
)
@ExcelProperty
(
"社保
截止日
"
)
@Schema
(
description
=
"社保
截止日
"
)
private
Date
socialEndDate
;
/**
* 社保减员起始日期
*/
@ExcelAttribute
(
name
=
"社保减员起始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"社保减员起始日期不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"社保减员起始日期不能为空"
)
@ExcelProperty
(
"社保减员起始日期"
)
@Schema
(
description
=
"社保减员起始日期"
)
private
Date
socialStartDateReduce
;
/**
* 社保减员截止日期
*/
@ExcelAttribute
(
name
=
"社保减员截止日期"
,
isNotEmpty
=
true
,
errorInfo
=
"社保减员截止日期不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"社保减员截止日期不能为空"
)
@ExcelProperty
(
"社保减员截止日期"
)
@Schema
(
description
=
"社保减员截止日期"
)
private
Date
socialEndDateReduce
;
/**
* 医保增员起始日期
* 医疗(增员)起始日
*/
@ExcelAttribute
(
name
=
"医
保增员起始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"医保增员起始日期
不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"医
保增员起始日期
不能为空"
)
@ExcelProperty
(
"医
保增员起始日期
"
)
@Schema
(
description
=
"医
保增员起始日期
"
)
@ExcelAttribute
(
name
=
"医
疗起始日"
,
isNotEmpty
=
true
,
errorInfo
=
"医疗起始日
不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"医
疗起始日
不能为空"
)
@ExcelProperty
(
"医
疗起始日
"
)
@Schema
(
description
=
"医
疗起始日
"
)
private
Date
medicalStartDate
;
/**
* 医
保增员截止日期
* 医
疗(增员)截止日
*/
@ExcelAttribute
(
name
=
"医
保增员截止日期"
,
isNotEmpty
=
true
,
errorInfo
=
"医保增员截止日期
不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"医
保增员截止日期
不能为空"
)
@ExcelProperty
(
"医
保增员截止日期
"
)
@Schema
(
description
=
"医
保增员截止日期
"
)
@ExcelAttribute
(
name
=
"医
疗截止日"
,
isNotEmpty
=
true
,
errorInfo
=
"医疗截止日
不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"医
疗截止日
不能为空"
)
@ExcelProperty
(
"医
疗截止日
"
)
@Schema
(
description
=
"医
疗截止日
"
)
private
Date
medicalEndDate
;
/**
* 医保减员起始日期
*/
@ExcelAttribute
(
name
=
"医保减员起始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"医保减员起始日期不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"医保减员起始日期不能为空"
)
@ExcelProperty
(
"医保减员起始日期"
)
@Schema
(
description
=
"医保减员起始日期"
)
private
Date
medicalStartDateReduce
;
/**
* 医保减员截止日期
*/
@ExcelAttribute
(
name
=
"医保减员截止日期"
,
isNotEmpty
=
true
,
errorInfo
=
"医保减员截止日期不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"医保减员截止日期不能为空"
)
@ExcelProperty
(
"医保减员截止日期"
)
@Schema
(
description
=
"医保减员截止日期"
)
private
Date
medicalEndDateReduce
;
/**
* 更新人
*/
...
...
@@ -173,4 +141,41 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Schema
(
description
=
"配置类型:0 非基础配置 1基础配置(后面配置都是按他生成的)"
)
private
String
type
;
/**
* 社保减员起始日期
*/
@ExcelAttribute
(
name
=
"社保减员起始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"社保减员起始日期不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"社保减员起始日期不可为空"
)
@ExcelProperty
(
"社保减员起始日期"
)
@Schema
(
description
=
"社保减员起始日期"
)
private
Date
socialStartDateReduce
;
/**
* 医疗减员起始日期
*/
@ExcelAttribute
(
name
=
"医疗减员起始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"医疗减员起始日期不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"医疗减员起始日期不能为空"
)
@ExcelProperty
(
"医疗减员起始日期"
)
@Schema
(
description
=
"医疗减员起始日期"
)
private
Date
medicalStartDateReduce
;
/**
* 社保减员截止日期
*/
@ExcelAttribute
(
name
=
"社保减员截止日期"
,
isNotEmpty
=
true
,
errorInfo
=
"社保减员截止日期不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"社保减员截止日期不能为空"
)
@ExcelProperty
(
"社保减员截止日期"
)
@Schema
(
description
=
"社保减员截止日期"
)
private
Date
socialEndDateReduce
;
/**
* 医疗减员截止日期
*/
@ExcelAttribute
(
name
=
"医疗减员截止日期"
,
isNotEmpty
=
true
,
errorInfo
=
"医疗减员截止日期不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"医疗减员截止日期不能为空"
)
@ExcelProperty
(
"医疗减员截止日期"
)
@Schema
(
description
=
"医疗减员截止日期"
)
private
Date
medicalEndDateReduce
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialHandleSearchVo.java
View file @
c1d9620f
...
...
@@ -145,4 +145,12 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@ExcelProperty
(
"医生大反馈"
)
@ExcelIgnore
private
String
ysdRemark
;
/**
* 社保ID
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"社保ID"
)
@ExcelIgnore
private
String
socialId
;
}
yifu-social/yifu-social-biz/pom.xml
View file @
c1d9620f
<?xml version="1.0"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu
</artifactId>
<version>
1.0.0
</version>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu
</artifactId>
<version>
1.0.0
</version>
<relativePath>
../../pom.xml
</relativePath>
</parent>
</parent>
<artifactId>
yifu-social-biz
</artifactId>
<packaging>
jar
</packaging>
<artifactId>
yifu-social-biz
</artifactId>
<packaging>
jar
</packaging>
<description>
yifu-social 业务模块
</description>
<description>
yifu-social 业务模块
</description>
<dependencies>
<dependencies>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-social-api
</artifactId>
...
...
@@ -67,18 +67,18 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-undertow
</artifactId>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-archives-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-salary-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-archives-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-salary-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
shardingsphere-jdbc-core-spring-boot-starter
</artifactId>
...
...
@@ -100,13 +100,28 @@
</dependency>
<!-- Apache POI -->
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
<version>
5.2.3
</version>
<!-- 使用最新版本 -->
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
5.2.3
</version>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<version>
2.12.0
</version>
</dependency>
<dependency>
<groupId>
spire.xls
</groupId>
<artifactId>
spire.xls
</artifactId>
<version>
5.3.0
</version>
<type>
jar
</type>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
c1d9620f
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
c1d9620f
...
...
@@ -32,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -42,12 +43,12 @@ import java.util.Map;
* @date 2022-07-15 11:38:05
*/
public
interface
TDispatchInfoService
extends
IService
<
TDispatchInfo
>
{
/**
* 派单信息记录表简单分页查询
* @param tDispatchInfo 派单信息记录表
* @return
*/
IPage
<
TDispatchInfoPageVo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
);
/**
* 派单信息记录表简单分页查询
* @param tDispatchInfo 派单信息记录表
* @return
*/
IPage
<
TDispatchInfoPageVo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
);
IPage
<
TDispatchInfoPageVo
>
getTDispatchInfoPageAudit
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
);
...
...
@@ -55,11 +56,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R
<
List
<
ErrorMessage
>>
importSocialHandler
(
InputStream
inputStream
,
String
mId
,
boolean
isAutoHandle
);
void
listExport
(
HttpServletResponse
response
,
TDispatchInfoSearchVo
searchVo
);
void
listExport
(
HttpServletResponse
response
,
TDispatchInfoSearchVo
searchVo
);
void
listAuditExport
(
HttpServletResponse
response
,
TDispatchInfoSearchVo
searchVo
);
List
<
TDispatchInfo
>
noPageDiy
(
TDispatchInfoSearchVo
searchVo
);
List
<
TDispatchInfo
>
noPageDiy
(
TDispatchInfoSearchVo
searchVo
);
@Transactional
@ShardingTransactionType
(
TransactionType
.
BASE
)
...
...
@@ -77,7 +78,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
DispatchDetailVo
getSocialAndFundInfoById
(
String
id
);
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
);
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
);
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
);
...
...
@@ -161,4 +162,5 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
**/
List
<
SocialHandleExportVo
>
getRecordRosterList
(
SocialHandleSearchVo
searchVo
,
String
idStr
);
R
<
URL
>
doExportRoster
(
String
socialId
,
String
type
,
String
unitCreditCode
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
c1d9620f
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelMergeImage.java
0 → 100644
View file @
c1d9620f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
import
org.apache.commons.compress.utils.IOUtils
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.stereotype.Component
;
import
javax.imageio.ImageIO
;
import
java.awt.Color
;
import
java.awt.*
;
import
java.awt.image.BufferedImage
;
import
java.io.*
;
/**
* @Author fxj
* @Date 2024/12/9
* @Description
* @Version 1.0
*/
@Component
public
class
ExcelMergeImage
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
excelFilePath
=
"E:\\test\\11\\1.xls"
;
String
imageFilePath
=
"E:\\test\\11\\1.png"
;
//convertExcelToImage(excelFilePath, imageFilePath);
//stampAdder();
}
public
static
void
convertExcelToImage
(
String
excelFilePath
,
String
imageFilePath
)
throws
IOException
{
FileInputStream
fis
=
new
FileInputStream
(
new
File
(
excelFilePath
));
Workbook
workbook
;
if
(
excelFilePath
.
endsWith
(
".xls"
))
{
workbook
=
new
HSSFWorkbook
(
fis
);
// For Excel 97-2003 (.xls) format
}
else
if
(
excelFilePath
.
endsWith
(
".xlsx"
))
{
workbook
=
new
XSSFWorkbook
(
fis
);
// For Excel 2007 and later (.xlsx) format
}
else
{
throw
new
IllegalArgumentException
(
"Unsupported file type"
);
}
Sheet
sheet
=
workbook
.
getSheetAt
(
0
);
int
rowCount
=
16
;
//sheet.getPhysicalNumberOfRows();
int
colCount
=
25
;
//sheet.getRow(0).getPhysicalNumberOfCells();
BufferedImage
image
=
new
BufferedImage
(
896
,
424
,
BufferedImage
.
TYPE_INT_RGB
);
Graphics2D
graphics
=
image
.
createGraphics
();
for
(
int
i
=
0
;
i
<
rowCount
;
i
++)
{
Row
row
=
sheet
.
getRow
(
i
);
for
(
int
j
=
0
;
j
<
colCount
;
j
++)
{
Cell
cell
=
row
.
getCell
(
j
);
if
(
cell
!=
null
)
{
graphics
.
fillRect
(
j
*
150
,
i
*
47
,
896
,
424
);
graphics
.
setColor
(
Color
.
black
);
// 设置边框颜色
graphics
.
drawRect
(
j
*
150
,
i
*
47
,
896
,
424
);
String
cellValue
=
getCellValueAsString
(
cell
);
graphics
.
drawString
(
cellValue
,
j
*
150
+
10
,
i
*
45
+
30
);
}
}
}
graphics
.
dispose
();
ImageIO
.
write
(
image
,
"png"
,
new
File
(
imageFilePath
));
workbook
.
close
();
fis
.
close
();
}
private
static
String
getCellValueAsString
(
Cell
cell
)
{
String
cellValue
=
""
;
if
(
cell
!=
null
)
{
switch
(
cell
.
getCellType
())
{
case
STRING:
cellValue
=
cell
.
getStringCellValue
();
break
;
case
NUMERIC:
cellValue
=
String
.
valueOf
(
cell
.
getNumericCellValue
());
break
;
case
BOOLEAN:
cellValue
=
String
.
valueOf
(
cell
.
getBooleanCellValue
());
break
;
case
FORMULA:
cellValue
=
cell
.
getCellFormula
();
break
;
default
:
cellValue
=
""
;
}
}
return
cellValue
;
}
/**
* @Author fxj
* @Description 03格式excel添加电子印章或图片
* @Date 15:32 2024/12/9
* @Param
* @return
**/
public
FileOutputStream
addPictureToExcel
(
FileInputStream
fis
,
InputStream
imageIs
,
FileOutputStream
fileOut
,
int
SheetNum
){
Workbook
workbook
=
null
;
try
{
workbook
=
new
HSSFWorkbook
(
fis
);
Sheet
sheet
=
workbook
.
getSheetAt
(
SheetNum
);
// 在合适的位置添加印章
Drawing
<?>
drawing
=
sheet
.
createDrawingPatriarch
();
CreationHelper
helper
=
workbook
.
getCreationHelper
();
ClientAnchor
anchor
=
helper
.
createClientAnchor
();
anchor
.
setCol1
(
2
);
anchor
.
setRow1
(
0
);
anchor
.
setCol2
(
4
);
anchor
.
setRow2
(
7
);
// 添加印章图片
int
pictureIdx
=
workbook
.
addPicture
(
IOUtils
.
toByteArray
(
imageIs
),
Workbook
.
PICTURE_TYPE_PNG
);
drawing
.
createPicture
(
anchor
,
pictureIdx
);
workbook
.
write
(
fileOut
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
finally
{
try
{
if
(
null
!=
fis
){
fis
.
close
();
}
if
(
null
!=
workbook
){
workbook
.
close
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
return
fileOut
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
0 → 100644
View file @
c1d9620f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
import
com.spire.xls.Workbook
;
import
com.spire.xls.Worksheet
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.stereotype.Component
;
import
java.io.File
;
import
java.io.InputStream
;
import
java.net.URL
;
/**
* @Author fxj
* @Date 2024/12/9
* @Description excel 转换为 图片 并上传阿里云 (上传后自动删除生成的图片文件)
* @Version 1.0
*/
@Component
public
class
ExcelToImage
{
public
R
<
URL
>
excelToImg
(
InputStream
inputStream
,
OSSUtil
ossUtil
){
String
projectRoot
=
System
.
getProperty
(
"user.dir"
);
//加载Excel工作表
Workbook
wb
=
new
Workbook
();
wb
.
loadFromHtml
(
inputStream
);
//获取工作表
Worksheet
sheet
=
wb
.
getWorksheets
().
get
(
0
);
//调用方法将Excel工作表保存为图片
sheet
.
saveToImage
(
projectRoot
+
"\\ToImg.png"
);
File
file
=
null
;
try
{
file
=
new
File
(
projectRoot
+
"\\ToImg.png"
);
if
(
file
.
exists
()){
String
key
=
System
.
currentTimeMillis
()
+
file
.
getName
();
if
(
ossUtil
.
uploadFileByFile
(
file
,
key
,
null
)){
return
R
.
ok
(
ossUtil
.
getObjectUrl
(
null
,
key
));
}
else
{
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":ExcelToImage上传OSS异常"
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":ExcelToImage转换异常-"
+
e
.
getMessage
());
}
finally
{
if
(
file
.
exists
()){
file
.
delete
();
}
}
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
);
//调用方法,将指定Excel单元格数据范围保存为图片
//sheet.saveToImage("ToImg2.png",8,1,30,7);
/*//调用方法将Excel保存为HTML
sheet.saveToHtml("ToHtml.html");
//调用方法将Excel保存为XPS
sheet.saveToFile("ToXPS.xps", String.valueOf(FileFormat.XPS));
//调用方法将Excel保存为CSV
sheet.saveToFile("ToCSV.csv", String.valueOf(FileFormat.CSV));
//调用方法将Excel保存为XML
sheet.saveToFile("ToXML.xml", String.valueOf(FileFormat.XML));
//调用方法将Excel保存为PostScript
sheet.saveToFile("ToPostScript.postscript", String.valueOf(FileFormat.PostScript));
//调用方法将Excel保存为PCL
sheet.saveToFile("ToPCL.pcl", String.valueOf(FileFormat.PCL));*/
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
c1d9620f
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialDeadlineInfoMapper.xml
View file @
c1d9620f
...
...
@@ -23,32 +23,31 @@
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialDeadlineInfoMapper"
>
<resultMap
id=
"tSocialDeadlineInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TSocialDeadlineInfo"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"month"
column=
"MONTH"
/>
<result
property=
"province"
column=
"PROVINCE"
/>
<result
property=
"city"
column=
"CITY"
/>
<result
property=
"town"
column=
"TOWN"
/>
<result
property=
"socialEndDate"
column=
"SOCIAL_END_DATE"
/>
<result
property=
"medicalEndDate"
column=
"MEDICAL_END_DATE"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateName"
column=
"UPDATE_NAME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"status"
column=
"STATUS"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"socialStartDate"
column=
"SOCIAL_START_DATE"
/>
<result
property=
"medicalStartDate"
column=
"MEDICAL_START_DATE"
/>
<result
property=
"socialStartDateReduce"
column=
"SOCIAL_START_DATE_REDUCE"
/>
<result
property=
"medicalStartDateReduce"
column=
"MEDICAL_START_DATE_REDUCE"
/>
<result
property=
"socialEndDateReduce"
column=
"SOCIAL_END_DATE_REDUCE"
/>
<result
property=
"medicalEndDateReduce"
column=
"MEDICAL_END_DATE_REDUCE"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
<resultMap
id=
"tSocialDeadlineInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TSocialDeadlineInfo"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"month"
column=
"MONTH"
/>
<result
property=
"province"
column=
"PROVINCE"
/>
<result
property=
"city"
column=
"CITY"
/>
<result
property=
"town"
column=
"TOWN"
/>
<result
property=
"socialEndDate"
column=
"SOCIAL_END_DATE"
/>
<result
property=
"medicalEndDate"
column=
"MEDICAL_END_DATE"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateName"
column=
"UPDATE_NAME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"status"
column=
"STATUS"
/>
<result
property=
"type"
column=
"TYPE"
/>
<result
property=
"socialStartDate"
column=
"SOCIAL_START_DATE"
/>
<result
property=
"medicalStartDate"
column=
"MEDICAL_START_DATE"
/>
<result
property=
"socialStartDateReduce"
column=
"SOCIAL_START_DATE_REDUCE"
/>
<result
property=
"medicalStartDateReduce"
column=
"MEDICAL_START_DATE_REDUCE"
/>
<result
property=
"socialEndDateReduce"
column=
"SOCIAL_END_DATE_REDUCE"
/>
<result
property=
"medicalEndDateReduce"
column=
"MEDICAL_END_DATE_REDUCE"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.MONTH,
a.PROVINCE,
a.CITY,
...
...
@@ -62,77 +61,76 @@
a.UPDATE_NAME,
a.UPDATE_TIME,
a.STATUS,a.TYPE,
a.SOCIAL_START_DATE,
a.MEDICAL_START_DATE,
a.SOCIAL_START_DATE,a.MEDICAL_START_DATE,
a.SOCIAL_START_DATE_REDUCE,
a.MEDICAL_START_DATE_REDUCE,
a.SOCIAL_END_DATE_REDUCE,
a.MEDICAL_END_DATE_REDUCE
</sql>
<sql
id=
"tSocialDeadlineInfo_where"
>
<if
test=
"tSocialDeadlineInfo != null"
>
<if
test=
"tSocialDeadlineInfo.id != null and tSocialDeadlineInfo.id.trim() != ''"
>
AND a.ID = #{tSocialDeadlineInfo.id}
</if>
<if
test=
"tSocialDeadlineInfo.month != null and tSocialDeadlineInfo.month.trim() != ''"
>
AND a.MONTH = #{tSocialDeadlineInfo.month}
</if>
<if
test=
"tSocialDeadlineInfo.province != null and tSocialDeadlineInfo.province.trim() != ''"
>
AND a.PROVINCE = #{tSocialDeadlineInfo.province}
</if>
<if
test=
"tSocialDeadlineInfo.city != null and tSocialDeadlineInfo.city.trim() != ''"
>
AND a.CITY = #{tSocialDeadlineInfo.city}
</if>
<if
test=
"tSocialDeadlineInfo.town != null and tSocialDeadlineInfo.town.trim() != ''"
>
AND a.TOWN = #{tSocialDeadlineInfo.town}
</if>
<if
test=
"tSocialDeadlineInfo.socialEndDate != null"
>
AND a.SOCIAL_END_DATE = #{tSocialDeadlineInfo.socialEndDate}
</if>
<if
test=
"tSocialDeadlineInfo.medicalEndDate != null"
>
AND a.MEDICAL_END_DATE = #{tSocialDeadlineInfo.medicalEndDate}
</if>
<if
test=
"tSocialDeadlineInfo.createBy != null and tSocialDeadlineInfo.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tSocialDeadlineInfo.createBy}
</if>
<if
test=
"tSocialDeadlineInfo.createName != null and tSocialDeadlineInfo.createName.trim() != ''"
>
AND a.CREATE_NAME = #{tSocialDeadlineInfo.createName}
</if>
<if
test=
"tSocialDeadlineInfo.createTime != null"
>
AND a.CREATE_TIME = #{tSocialDeadlineInfo.createTime}
</if>
<if
test=
"tSocialDeadlineInfo.updateBy != null and tSocialDeadlineInfo.updateBy.trim() != ''"
>
AND a.UPDATE_BY = #{tSocialDeadlineInfo.updateBy}
</if>
<if
test=
"tSocialDeadlineInfo.updateName != null and tSocialDeadlineInfo.updateName.trim() != ''"
>
AND a.UPDATE_NAME = #{tSocialDeadlineInfo.updateName}
</if>
<if
test=
"tSocialDeadlineInfo.updateTime != null"
>
AND a.UPDATE_TIME = #{tSocialDeadlineInfo.updateTime}
</if>
<if
test=
"tSocialDeadlineInfo.status != null and tSocialDeadlineInfo.status.trim() != ''"
>
AND a.STATUS = #{tSocialDeadlineInfo.status}
</if>
<if
test=
"tSocialDeadlineInfo.monthEnd != 0"
>
AND a.MONTH
<![CDATA[<=]]>
#{tSocialDeadlineInfo.monthEnd}
</if>
<if
test=
"tSocialDeadlineInfo.monthStart != 0"
>
AND a.MONTH
<![CDATA[>=]]>
#{tSocialDeadlineInfo.monthStart}
</if>
<if
test=
"tSocialDeadlineInfo.type != null and tSocialDeadlineInfo.type.trim() != ''"
>
AND a.TYPE = #{tSocialDeadlineInfo.type}
</if>
</if>
</sql>
<!--tSocialDeadlineInfo简单分页查询-->
<select
id=
"getTSocialDeadlineInfoPage"
resultMap=
"tSocialDeadlineInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_social_deadline_info a
<where>
1=1
<include
refid=
"tSocialDeadlineInfo_where"
/>
</where>
</sql>
<sql
id=
"tSocialDeadlineInfo_where"
>
<if
test=
"tSocialDeadlineInfo != null"
>
<if
test=
"tSocialDeadlineInfo.id != null and tSocialDeadlineInfo.id.trim() != ''"
>
AND a.ID = #{tSocialDeadlineInfo.id}
</if>
<if
test=
"tSocialDeadlineInfo.month != null and tSocialDeadlineInfo.month.trim() != ''"
>
AND a.MONTH = #{tSocialDeadlineInfo.month}
</if>
<if
test=
"tSocialDeadlineInfo.province != null and tSocialDeadlineInfo.province.trim() != ''"
>
AND a.PROVINCE = #{tSocialDeadlineInfo.province}
</if>
<if
test=
"tSocialDeadlineInfo.city != null and tSocialDeadlineInfo.city.trim() != ''"
>
AND a.CITY = #{tSocialDeadlineInfo.city}
</if>
<if
test=
"tSocialDeadlineInfo.town != null and tSocialDeadlineInfo.town.trim() != ''"
>
AND a.TOWN = #{tSocialDeadlineInfo.town}
</if>
<if
test=
"tSocialDeadlineInfo.socialEndDate != null"
>
AND a.SOCIAL_END_DATE = #{tSocialDeadlineInfo.socialEndDate}
</if>
<if
test=
"tSocialDeadlineInfo.medicalEndDate != null"
>
AND a.MEDICAL_END_DATE = #{tSocialDeadlineInfo.medicalEndDate}
</if>
<if
test=
"tSocialDeadlineInfo.createBy != null and tSocialDeadlineInfo.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tSocialDeadlineInfo.createBy}
</if>
<if
test=
"tSocialDeadlineInfo.createName != null and tSocialDeadlineInfo.createName.trim() != ''"
>
AND a.CREATE_NAME = #{tSocialDeadlineInfo.createName}
</if>
<if
test=
"tSocialDeadlineInfo.createTime != null"
>
AND a.CREATE_TIME = #{tSocialDeadlineInfo.createTime}
</if>
<if
test=
"tSocialDeadlineInfo.updateBy != null and tSocialDeadlineInfo.updateBy.trim() != ''"
>
AND a.UPDATE_BY = #{tSocialDeadlineInfo.updateBy}
</if>
<if
test=
"tSocialDeadlineInfo.updateName != null and tSocialDeadlineInfo.updateName.trim() != ''"
>
AND a.UPDATE_NAME = #{tSocialDeadlineInfo.updateName}
</if>
<if
test=
"tSocialDeadlineInfo.updateTime != null"
>
AND a.UPDATE_TIME = #{tSocialDeadlineInfo.updateTime}
</if>
<if
test=
"tSocialDeadlineInfo.status != null and tSocialDeadlineInfo.status.trim() != ''"
>
AND a.STATUS = #{tSocialDeadlineInfo.status}
</if>
<if
test=
"tSocialDeadlineInfo.monthEnd != 0"
>
AND a.MONTH
<![CDATA[<=]]>
#{tSocialDeadlineInfo.monthEnd}
</if>
<if
test=
"tSocialDeadlineInfo.monthStart != 0"
>
AND a.MONTH
<![CDATA[>=]]>
#{tSocialDeadlineInfo.monthStart}
</if>
<if
test=
"tSocialDeadlineInfo.type != null and tSocialDeadlineInfo.type.trim() != ''"
>
AND a.TYPE = #{tSocialDeadlineInfo.type}
</if>
</if>
</sql>
<!--tSocialDeadlineInfo简单分页查询-->
<select
id=
"getTSocialDeadlineInfoPage"
resultMap=
"tSocialDeadlineInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_social_deadline_info a
<where>
1=1
<include
refid=
"tSocialDeadlineInfo_where"
/>
</where>
order by a.month DESC
</select>
</select>
</mapper>
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