Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
464448a6
Commit
464448a6
authored
Mar 15, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校核详情导出 & 标签导出
parent
f40d98be
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
273 additions
and
65 deletions
+273
-65
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+17
-35
SampleMapper.java
.../java/cn/wise/sc/cement/business/mapper/SampleMapper.java
+1
-1
DataStatisticsMapper.xml
...se/sc/cement/business/mapper/xml/DataStatisticsMapper.xml
+2
-0
NonStandardApprovalMapper.xml
.../cement/business/mapper/xml/NonStandardApprovalMapper.xml
+2
-1
SampleDistributionMapper.xml
...c/cement/business/mapper/xml/SampleDistributionMapper.xml
+3
-0
SampleLabelVo.java
...va/cn/wise/sc/cement/business/model/vo/SampleLabelVo.java
+0
-10
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+4
-6
DataStatisticsServiceImpl.java
...ment/business/service/impl/DataStatisticsServiceImpl.java
+1
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+238
-12
ExcelUtil.java
.../main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
+3
-0
DataStatisticsMapper.xml
...n/wise/sc/cement/business/mapper/DataStatisticsMapper.xml
+2
-0
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustController.java
View file @
464448a6
...
...
@@ -855,51 +855,33 @@ public class EntrustController {
}
@ApiOperation
(
value
=
"查看样品标签"
)
@GetMapping
(
"/getSampleLabelList"
)
public
BaseResponse
getSampleLabelList
(
Integer
entrustId
)
{
try
{
return
entrustService
.
getSampleLabelList
(
entrustId
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"查看样品标签{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
//todo 导出样品标签功能待完善
@PostMapping
(
"/exportSampleLabel/{entrustId}"
)
@ApiOperation
(
"导出样品标签"
)
@PostMapping
(
"/exportSampleLabel/{entrustId}"
)
public
void
exportSampleLabel
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
map
=
entrustService
.
getSampleLabelList
(
entrustId
).
getData
();
if
(
map
==
null
)
{
return
;
}
List
<
Sample
>
sampleList
=
(
List
<
Sample
>)
map
.
get
(
"list"
);
if
(
sampleList
==
null
||
sampleList
.
size
()==
0
)
{
return
;
}
Entrust
entrust
=
(
Entrust
)
map
.
get
(
"entrust"
);
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>(
5
);
String
fileName
,
HttpServletResponse
response
)
{
try
{
entrustService
.
exportSampleLabel
(
entrustId
,
fileName
,
response
);
//(不包含平行样)
List
<
SampleLabelVo
>
sampleLabelVoList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
sampleList
.
size
();
i
++){
SampleLabelVo
sampleLabelVo
=
new
SampleLabelVo
();
i
=
i
+
4
;
}
catch
(
Exception
e
)
{
log
.
debug
(
"导出样品标签{}"
,
e
);
}
beanParams
.
put
(
"list"
,
sampleList
);
WordUtil
.
writeWordReport
(
entrust
.
getEntrustCode
()
+
"-"
+
entrust
.
getProjectName
()
+
"-样品标签"
,
"sampleFlow.ftl"
,
beanParams
,
response
,
FileExt
.
DOC
);
}
@ApiOperation
(
"导出-委托单校核详情"
)
@PostMapping
(
"/exportCheckDetail/{entrustId}"
)
public
void
exportCheckDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
entrustService
.
exportCheckDetail
(
entrustId
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"导出-委托单校核详情{}"
,
e
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SampleMapper.java
View file @
464448a6
...
...
@@ -57,7 +57,7 @@ public interface SampleMapper extends BaseMapper<Sample> {
@Select
(
"select * from sample where entrust_id = #{entrustId} and cement_code= #{cementCode}"
)
List
<
Sample
>
getByCementCode
(
@Param
(
"entrustId"
)
Integer
entrustId
,
@Param
(
"cementCode"
)
String
cementCode
);
@Select
(
"select * from sample where entrust_id = #{entrustId} order by
id asc
"
)
@Select
(
"select * from sample where entrust_id = #{entrustId} order by
cement_code asc
"
)
List
<
Sample
>
getSampleCheckList
(
Integer
entrustId
);
List
<
SampleSaveDto
>
getSampleSaveList
();
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/DataStatisticsMapper.xml
View file @
464448a6
...
...
@@ -520,4 +520,6 @@
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardApprovalMapper.xml
View file @
464448a6
...
...
@@ -45,7 +45,7 @@
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
IF(ISNULL(na.id),'',na.id)
as 序号,
(@i:=@i+1)
as 序号,
IF(ISNULL(su.name),'',su.name) as 姓名,
IF(ISNULL(su.username),'',su.username) as 账户,
IF(ISNULL(na.statistical),'',na.statistical) as 统计日期,
...
...
@@ -62,6 +62,7 @@
)as 状态
FROM nonstandard_apply na
left join sys_user su on na.user_id = su.id
,(select @i:=0)aa
<include
refid=
"where"
/>
order by na.start_time desc
</select>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleDistributionMapper.xml
View file @
464448a6
...
...
@@ -170,4 +170,7 @@
where sd.entrust_id = #{entrustId}
group by sd.sample_id,sd.user_id
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/SampleLabelVo.java
View file @
464448a6
...
...
@@ -13,28 +13,18 @@ import lombok.Data;
@ApiModel
(
"委托-样品标签打印Vo"
)
public
class
SampleLabelVo
{
@ApiModelProperty
(
"样品名"
)
private
String
sampleName1
;
@ApiModelProperty
(
"平行样编号"
)
private
String
parallelCode1
;
@ApiModelProperty
(
"样品名"
)
private
String
sampleName2
;
@ApiModelProperty
(
"平行样编号"
)
private
String
parallelCode2
;
@ApiModelProperty
(
"样品名"
)
private
String
sampleName3
;
@ApiModelProperty
(
"平行样编号"
)
private
String
parallelCode3
;
@ApiModelProperty
(
"样品名"
)
private
String
sampleName4
;
@ApiModelProperty
(
"平行样编号"
)
private
String
parallelCode4
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
464448a6
...
...
@@ -180,15 +180,13 @@ public interface IEntrustService extends IService<Entrust> {
*/
BaseResponse
<
Map
<
String
,
Object
>>
getSampleFlowList
(
Integer
entrustId
);
/**
* 查看样品标签
* @param entrustId
* @return
*/
BaseResponse
<
Map
<
String
,
Object
>>
getSampleLabelList
(
Integer
entrustId
);
void
exportSampleLabel
(
Integer
entrustId
,
String
fileName
,
HttpServletResponse
response
);
void
exportCheckDetail
(
Integer
entrustId
,
String
fileName
,
HttpServletResponse
response
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/DataStatisticsServiceImpl.java
View file @
464448a6
...
...
@@ -380,6 +380,7 @@ public class DataStatisticsServiceImpl implements IDataStatisticsService {
QueryWrapper
<
Team
>
teamQueryWrapper
=
new
QueryWrapper
<>();
teamQueryWrapper
.
eq
(
"is_display"
,
1
);
teamQueryWrapper
.
eq
(
"status"
,
1
);
teamQueryWrapper
.
orderByAsc
(
"group_id"
,
"sort_no"
);
List
<
Team
>
teamList
=
teamService
.
list
(
teamQueryWrapper
);
//转化成id为key的map
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
464448a6
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
View file @
464448a6
...
...
@@ -326,6 +326,9 @@ public class ExcelUtil {
public
static
XSSFRichTextString
applyFontsub
(
String
sub
,
XSSFFont
xxsfFont
)
{
XSSFRichTextString
richString
=
new
XSSFRichTextString
();
if
(
sub
.
contains
(
"<sup>"
)
||
sub
.
contains
(
"</sup>"
))
{
sub
=
sub
.
replaceAll
(
"<sup>-</sup>"
,
"⁻"
);
}
if
(
sub
.
contains
(
"<sub>"
)
||
sub
.
contains
(
"</sub>"
))
{
xxsfFont
.
setTypeOffset
(
FontFormatting
.
SS_SUB
);
richString
.
setString
(
sub
.
replaceAll
(
"</sub>"
,
"<sub>"
).
replaceAll
(
"<sub>"
,
""
));
...
...
cement-business/target/classes/cn/wise/sc/cement/business/mapper/DataStatisticsMapper.xml
View file @
464448a6
...
...
@@ -520,4 +520,6 @@
</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