Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
9713c868
Commit
9713c868
authored
4 years ago
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
word导出
parent
49af994f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
674 additions
and
472 deletions
+674
-472
pom.xml
cement-business/pom.xml
+17
-0
CabinetController.java
...wise/sc/cement/business/controller/CabinetController.java
+0
-2
NormProductionController.java
.../cement/business/controller/NormProductionController.java
+12
-10
PlanConsumablesPurchaseController.java
...usiness/controller/PlanConsumablesPurchaseController.java
+8
-0
PlanStandardPurchaseController.java
...t/business/controller/PlanStandardPurchaseController.java
+91
-83
SampleController.java
.../wise/sc/cement/business/controller/SampleController.java
+6
-0
PlanStandardPurchaseMapper.java
...sc/cement/business/mapper/PlanStandardPurchaseMapper.java
+3
-0
SampleMapper.java
.../java/cn/wise/sc/cement/business/mapper/SampleMapper.java
+3
-0
NonStandardValueMapper.xml
.../sc/cement/business/mapper/xml/NonStandardValueMapper.xml
+0
-5
PlanStandardPurchaseMapper.xml
...cement/business/mapper/xml/PlanStandardPurchaseMapper.xml
+24
-0
SampleMapper.xml
...va/cn/wise/sc/cement/business/mapper/xml/SampleMapper.xml
+18
-0
SampleWord.java
...ain/java/cn/wise/sc/cement/business/model/SampleWord.java
+23
-0
PlanStandardPurchaseVo.java
...e/sc/cement/business/model/vo/PlanStandardPurchaseVo.java
+2
-0
SampleVo.java
...in/java/cn/wise/sc/cement/business/model/vo/SampleVo.java
+2
-0
INonStandardValueService.java
.../sc/cement/business/service/INonStandardValueService.java
+17
-17
IPlanConsumablesPurchaseService.java
...ent/business/service/IPlanConsumablesPurchaseService.java
+5
-0
IPlanStandardPurchaseService.java
...cement/business/service/IPlanStandardPurchaseService.java
+1
-0
ISampleService.java
...va/cn/wise/sc/cement/business/service/ISampleService.java
+6
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+2
-2
NonStandardValueServiceImpl.java
...nt/business/service/impl/NonStandardValueServiceImpl.java
+2
-1
PlanConsumablesPurchaseServiceImpl.java
...ness/service/impl/PlanConsumablesPurchaseServiceImpl.java
+197
-176
PlanStandardPurchaseServiceImpl.java
...usiness/service/impl/PlanStandardPurchaseServiceImpl.java
+212
-173
SampleServiceImpl.java
...se/sc/cement/business/service/impl/SampleServiceImpl.java
+23
-3
原料存放、销毁记录.ftl
cement-business/src/main/resources/templates/原料存放、销毁记录.ftl
+0
-0
标准物质采购计划.ftl
cement-business/src/main/resources/templates/标准物质采购计划.ftl
+0
-0
消耗品采购计划 .ftl
cement-business/src/main/resources/templates/消耗品采购计划 .ftl
+0
-0
消耗品采购计划.docx
cement-business/src/main/resources/消耗品采购计划.docx
+0
-0
No files found.
cement-business/pom.xml
View file @
9713c868
...
...
@@ -146,6 +146,23 @@
<scope>
system
</scope>
<!--system,类似provided,需要显式提供依赖的jar以后,Maven就不会在Repository中查找它-->
<systemPath>
${basedir}/lib/aspose-cells-8.5.2.jar
</systemPath>
<!--项目根目录下的lib文件夹下-->
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
org.jfree
</groupId>
<artifactId>
jcommon
</artifactId>
<version>
1.0.24
</version>
</dependency>
<dependency>
<groupId>
org.jfree
</groupId>
<artifactId>
jfreechart
</artifactId>
<version>
1.5.0
</version>
</dependency>
</dependencies>
<build>
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/CabinetController.java
View file @
9713c868
...
...
@@ -42,7 +42,6 @@ public class CabinetController {
@PostMapping
(
"/new"
)
@ApiOperation
(
"新增柜子"
)
public
BaseResponse
<
Boolean
>
newCabinet
(
@RequestBody
Cabinet
cabinet
)
{
boolean
save
=
iCabinetService
.
save
(
cabinet
);
if
(
save
)
{
return
BaseResponse
.
okData
(
true
);
...
...
@@ -79,6 +78,5 @@ public class CabinetController {
return
BaseResponse
.
errorMsg
(
"删除失败!"
);
}
}
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NormProductionController.java
View file @
9713c868
...
...
@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.controller;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateField
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.NormProduction
;
...
...
@@ -29,6 +30,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -118,7 +120,7 @@ public class NormProductionController {
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
offsetNew
(
DateField
.
DAY_OF_MONTH
,
1
).
getTime
();
}
//将list拆分成分页
...
...
@@ -140,14 +142,15 @@ public class NormProductionController {
public
BaseResponse
<
Page
<
NormProduction
.
NormProductionDetail
>>
normProductionDetails
(
Integer
userId
,
String
start
,
String
end
,
PageQuery
pageQuery
)
{
Assert
.
notNull
(
userId
,
"用户id是必填的!"
);
Assert
.
notNull
(
userId
,
"用户id是必填的!"
);
Long
startTime
=
null
;
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
offsetNew
(
DateField
.
DAY_OF_MONTH
,
1
).
getTime
();
}
List
<
NormProduction
.
NormProductionDetail
>
data
=
iPrecipriceService
.
normProductionDetails
(
userId
,
startTime
,
endTime
);
List
<
NormProduction
.
NormProductionDetail
>
collect
=
data
.
stream
()
.
filter
(
arg
->
arg
.
getUserId
().
intValue
()
==
userId
)
...
...
@@ -167,7 +170,7 @@ public class NormProductionController {
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
offsetNew
(
DateField
.
DAY_OF_MONTH
,
1
).
getTime
();
}
List
<
ProductionVo
>
rts
=
iPrecipriceService
.
production
(
name
,
startTime
,
endTime
,
groupId
);
...
...
@@ -216,7 +219,7 @@ public class NormProductionController {
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
offsetNew
(
DateField
.
DAY_OF_MONTH
,
1
).
getTime
();
}
iNormProductionService
.
exportNormProductionStatistics
(
startTime
,
endTime
,
name
,
groupId
,
response
);
}
...
...
@@ -229,7 +232,7 @@ public class NormProductionController {
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
offsetNew
(
DateField
.
DAY_OF_MONTH
,
1
).
getTime
();
}
iPrecipriceService
.
exportNormProductionDetail
(
userId
,
startTime
,
endTime
,
response
);
}
...
...
@@ -241,7 +244,7 @@ public class NormProductionController {
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
offsetNew
(
DateField
.
DAY_OF_MONTH
,
1
).
getTime
();
}
iNormProductionService
.
exportProduction
(
name
,
startTime
,
endTime
,
groupId
,
response
);
...
...
@@ -253,7 +256,7 @@ public class NormProductionController {
public
BaseResponse
<
List
<
WorkloadStatisticsVo
>>
workloadStatistics
(
String
start
,
String
end
,
Integer
userId
)
{
LoginUser
loginUser
=
iSysUserService
.
getLoginUser
();
if
(
BeanUtil
.
isEmpty
(
loginUser
)){
if
(
BeanUtil
.
isEmpty
(
loginUser
))
{
return
BaseResponse
.
errorMsg
(
"请登录!"
);
}
...
...
@@ -265,11 +268,10 @@ public class NormProductionController {
Date
endTime
=
DateUtil
.
date
();
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
);
endTime
=
DateUtil
.
parseDate
(
end
);
endTime
=
DateUtil
.
parseDate
(
end
)
.
offsetNew
(
DateField
.
DAY_OF_MONTH
,
1
)
;
}
return
BaseResponse
.
okData
(
iPrecipriceService
.
workloadStatistics
(
startTime
,
endTime
,
userId
));
}
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanConsumablesPurchaseController.java
View file @
9713c868
...
...
@@ -4,7 +4,9 @@ import cn.wise.sc.cement.business.model.BaseResponse;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.PlanConsumablesPurchaseQuery
;
import
cn.wise.sc.cement.business.model.query.PlanStandardPurchaseQuery
;
import
cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo
;
import
cn.wise.sc.cement.business.service.IPlanConsumablesPurchaseService
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
...
...
@@ -58,6 +60,12 @@ public class PlanConsumablesPurchaseController {
}
}
@PostMapping
(
"/export/word"
)
@ApiOperation
(
"消耗品采购计划列表导出(word)"
)
public
void
exportWord
(
HttpServletResponse
response
){
consumablesPurchaseService
.
exportWord
(
response
);
}
@ApiOperation
(
value
=
"新增消耗品采购计划"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanConsumablesPurchaseQuery
query
)
{
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanStandardPurchaseController.java
View file @
9713c868
...
...
@@ -29,89 +29,97 @@ import javax.servlet.http.HttpServletResponse;
@RequestMapping
(
"/business/plan-standard-purchase"
)
public
class
PlanStandardPurchaseController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"PlanStandardPurchaseController"
);
@Autowired
private
IPlanStandardPurchaseService
standardPurchaseService
;
@ApiOperation
(
value
=
"标样采购计划分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"name"
,
value
=
"产品名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
String
name
)
{
try
{
return
standardPurchaseService
.
getPage
(
pageQuery
,
name
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"标样采购计划分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
"标样采购计划列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
standardPurchaseService
.
export
(
name
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"标样采购计划列表导出{}"
,
e
);
}
}
@ApiOperation
(
value
=
"新增标样采购计划"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanStandardPurchaseQuery
query
)
{
try
{
return
standardPurchaseService
.
create
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"新增标样采购计划{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"更新标样采购计划"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
PlanStandardPurchaseQuery
query
)
{
try
{
return
standardPurchaseService
.
update
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"更新标样采购计划{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"标样采购计划详情"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getDetail
(
@PathVariable
Integer
id
)
{
try
{
return
standardPurchaseService
.
getDetail
(
id
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"标样采购计划详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"采购完成"
)
@PostMapping
(
"/finish"
)
public
BaseResponse
finish
(
Integer
id
)
{
try
{
return
standardPurchaseService
.
finish
(
id
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"采购完成{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除"
)
@PostMapping
(
"/delete/{id}"
)
public
BaseResponse
delete
(
@PathVariable
Integer
id
)
{
try
{
return
standardPurchaseService
.
delete
(
id
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"删除{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"PlanStandardPurchaseController"
);
@Autowired
private
IPlanStandardPurchaseService
standardPurchaseService
;
@ApiOperation
(
value
=
"标样采购计划分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"name"
,
value
=
"产品名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
String
name
)
{
try
{
return
standardPurchaseService
.
getPage
(
pageQuery
,
name
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"标样采购计划分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
"标样采购计划列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
standardPurchaseService
.
export
(
name
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"标样采购计划列表导出{}"
,
e
);
}
}
@ApiOperation
(
"标样采购计划列表导出(word)"
)
@PostMapping
(
"/export/word"
)
public
void
exportWord
(
HttpServletResponse
response
)
{
standardPurchaseService
.
exportWord
(
response
);
}
@ApiOperation
(
value
=
"新增标样采购计划"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanStandardPurchaseQuery
query
)
{
try
{
return
standardPurchaseService
.
create
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"新增标样采购计划{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"更新标样采购计划"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
PlanStandardPurchaseQuery
query
)
{
try
{
return
standardPurchaseService
.
update
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"更新标样采购计划{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"标样采购计划详情"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getDetail
(
@PathVariable
Integer
id
)
{
try
{
return
standardPurchaseService
.
getDetail
(
id
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"标样采购计划详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"采购完成"
)
@PostMapping
(
"/finish"
)
public
BaseResponse
finish
(
Integer
id
)
{
try
{
return
standardPurchaseService
.
finish
(
id
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"采购完成{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除"
)
@PostMapping
(
"/delete/{id}"
)
public
BaseResponse
delete
(
@PathVariable
Integer
id
)
{
try
{
return
standardPurchaseService
.
delete
(
id
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"删除{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/SampleController.java
View file @
9713c868
...
...
@@ -81,6 +81,12 @@ public class SampleController {
}
}
@ApiOperation
(
"样品列表导出(word)"
)
@PostMapping
(
"/export/word"
)
public
void
exportWord
(
HttpServletResponse
response
){
sampleService
.
exportWord
(
response
);
}
@ApiOperation
(
value
=
"样品详情"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
)
{
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanStandardPurchaseMapper.java
View file @
9713c868
...
...
@@ -3,6 +3,7 @@ package cn.wise.sc.cement.business.mapper;
import
cn.wise.sc.cement.business.entity.PlanStandardPurchase
;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo
;
import
cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -27,4 +28,6 @@ public interface PlanStandardPurchaseMapper extends BaseMapper<PlanStandardPurch
PlanStandardPurchaseVo
getDetail
(
Integer
id
);
List
<
PlanStandardPurchaseVo
>
wordList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SampleMapper.java
View file @
9713c868
...
...
@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.mapper;
import
cn.wise.sc.cement.business.entity.Sample
;
import
cn.wise.sc.cement.business.model.SampleSaveDto
;
import
cn.wise.sc.cement.business.model.SampleWord
;
import
cn.wise.sc.cement.business.model.vo.SampleManageVo
;
import
cn.wise.sc.cement.business.model.vo.SampleVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -58,4 +59,6 @@ public interface SampleMapper extends BaseMapper<Sample> {
List
<
Sample
>
getSampleCheckList
(
Integer
entrustId
);
List
<
SampleSaveDto
>
getSampleSaveList
();
List
<
SampleWord
>
exportWordList
();
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardValueMapper.xml
View file @
9713c868
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.NonStandardValueMapper"
>
<sql
id=
"where"
>
<where>
<if
test=
"params.name != null and params.name != ''"
>
...
...
@@ -24,7 +23,6 @@
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardValueVo"
>
select na.*,su.name as name,su.username as account,su.group_id as groups,sg.name as groupname
from nonstandard_apply na
...
...
@@ -33,7 +31,6 @@
<include
refid=
"where"
/>
order by na.start_time desc
</select>
<select
id=
"getList"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardValueVo"
>
select na.*,su.name as name,su.username as account,na.start_time as startTime,su.group_id as groups,sg.name as
groupname
...
...
@@ -43,7 +40,6 @@
<include
refid=
"where"
/>
order by na.id asc
</select>
<!-- <select id="getByUserId" resultType="cn.wise.sc.cement.business.model.vo.NonStandardValueVo">-->
<!-- select na.*,su.name as name,su.username as account,na.start_time as startTime,su.group_id as groups,sg.name as-->
<!-- groupname-->
...
...
@@ -53,7 +49,6 @@
<!-- <include refid="where"/>-->
<!-- order by na.id asc-->
<!-- </select>-->
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
na.id as 序号,
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanStandardPurchaseMapper.xml
View file @
9713c868
...
...
@@ -13,6 +13,23 @@
</where>
</sql>
<sql
id=
"whereNew"
>
<where>
<if
test=
"params.status != null"
>
and t.status = #{params.status}
</if>
<if
test=
"params.name != null and params.name != ''"
>
and t.name like concat('%', #{params.name}, '%')
</if>
<if
test=
"params.start !=null"
>
and t.create_time
<![CDATA[>=]]>
#{params.start}
</if>
<if
test=
"params.end !=null"
>
and t.create_time
<![CDATA[<=]]>
#{params.end}
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo"
>
SELECT t.*, su.name as purchaserName
FROM plan_standard_purchase t
...
...
@@ -44,5 +61,12 @@
left join sys_user su2 on su2.id = t.user_id
WHERE t.id = #{id}
</select>
<select
id=
"wordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo"
>
SELECT t.*, su.name as purchaserName
FROM plan_standard_purchase t
left join sys_user su on su.id = t.purchaser_id
<include
refid=
"whereNew"
/>
ORDER BY t.id DESC
</select>
</mapper>
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleMapper.xml
View file @
9713c868
...
...
@@ -85,5 +85,23 @@
ON su.id = s.operator_id
</select>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.SampleWord"
>
SELECT
e.project_name AS project_name,
e.entrust_code,
s.`name`,
s.cement_code,
s.weight,
s.original_position,
date_format(s.create_time, '%Y/%m/%d') as create_time,
s.remark,
date_format(s.destruction_time, '%Y/%m/%d') as destruction_time,
su.`name` AS user_name
FROM
`sample` s
LEFT JOIN entrust e ON s.entrust_id = e.id
LEFT JOIN sys_user su ON su.id = s.operator_id
</select>
</mapper>
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/model/SampleWord.java
0 → 100644
View file @
9713c868
package
cn
.
wise
.
sc
.
cement
.
business
.
model
;
import
lombok.Data
;
/**
* @description: 样品导出word
* @author: qh
* @create: 2020-11-20 16:34
**/
@Data
public
class
SampleWord
{
private
String
projectName
=
""
;
private
String
name
=
""
;
private
String
cementCode
=
""
;
private
String
weight
=
""
;
private
String
originalPosition
=
""
;
private
String
createTime
=
""
;
private
String
remark
=
""
;
private
String
destructionTime
=
""
;
private
String
userName
=
""
;
private
String
entrustCode
=
""
;
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanStandardPurchaseVo.java
View file @
9713c868
...
...
@@ -60,4 +60,6 @@ public class PlanStandardPurchaseVo {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
private
String
createTimeStr
;
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/SampleVo.java
View file @
9713c868
...
...
@@ -106,4 +106,6 @@ public class SampleVo {
@ApiModelProperty
(
"产地"
)
private
String
origin
;
private
String
createTime
;
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardValueService.java
View file @
9713c868
...
...
@@ -27,7 +27,7 @@ public interface INonStandardValueService extends IService<NonStandardValue> {
* @param pageQuery 非标产值信息分页
* @return IPage<NoneStandardValue>
*/
BaseResponse
<
IPage
<
NonStandardValueVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
userId
,
String
name
,
Date
start
,
Date
end
);
BaseResponse
<
IPage
<
NonStandardValueVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
userId
,
String
name
,
Date
start
Parse
,
Date
endParse
);
/* //计算每个用户提交的非标产值
...
...
@@ -43,20 +43,20 @@ public interface INonStandardValueService extends IService<NonStandardValue> {
// */
// BaseResponse<List<NonStandardValueVo>> getByUserId(Integer userId);
/**
* 获取所有非标产值信息
*
* @return List
*/
BaseResponse
<
List
<
NonStandardValueVo
>>
getList
(
Date
start
,
Date
end
,
Integer
groups
,
String
name
);
/**
* 非标产值列表导出
*
* @param filename 文件名
* @param userId 用户id
* @param name 姓名
* @param response
*/
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
);
/**
* 获取所有非标产值信息
*
* @return List
*/
BaseResponse
<
List
<
NonStandardValueVo
>>
getList
(
Date
start
,
Date
end
,
Integer
groups
,
String
name
);
/**
* 非标产值列表导出
*
* @param filename 文件名
* @param userId 用户id
* @param name 姓名
* @param response
*/
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
);
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanConsumablesPurchaseService.java
View file @
9713c868
...
...
@@ -34,4 +34,9 @@ public interface IPlanConsumablesPurchaseService extends IService<PlanConsumable
BaseResponse
<
String
>
delete
(
Integer
id
);
/**
* 导出word
* @param response
*/
void
exportWord
(
HttpServletResponse
response
);
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanStandardPurchaseService.java
View file @
9713c868
...
...
@@ -34,4 +34,5 @@ public interface IPlanStandardPurchaseService extends IService<PlanStandardPurch
BaseResponse
<
String
>
delete
(
Integer
id
);
void
exportWord
(
HttpServletResponse
response
);
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/ISampleService.java
View file @
9713c868
...
...
@@ -52,4 +52,10 @@ public interface ISampleService extends IService<Sample> {
* @param response 响应体
*/
void
upload
(
HttpServletResponse
response
);
/**
* 导出样品销毁记录 word
* @param response
*/
void
exportWord
(
HttpServletResponse
response
);
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
9713c868
...
...
@@ -1357,7 +1357,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
//计算产值
if
(
sampleHandle
.
getHandleId
()
!=
null
)
{
try
{
iPrecipriceService
.
createPreciprice
(
sampleHandle
.
getUserId
(),
entrust
.
getId
(),
sampleHandle
.
getHandleId
(),
0
,
sample
.
getId
(),
tru
e
);
iPrecipriceService
.
createPreciprice
(
sampleHandle
.
getUserId
(),
entrust
.
getId
(),
sampleHandle
.
getHandleId
(),
0
,
sample
.
getId
(),
fals
e
);
}
catch
(
Exception
e
){
System
.
out
.
println
(
e
.
getMessage
());
return
BaseResponse
.
errorMsg
(
e
.
getMessage
());
...
...
@@ -1728,7 +1728,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(
sampleDistributionTeamGroupVoList
!=
null
&&
sampleDistributionTeamGroupVoList
.
size
()
>
0
)
{
for
(
SampleDistributionTeamVo
sdVo
:
sampleDistributionTeamGroupVoList
)
{
try
{
iPrecipriceService
.
createPreciprice
(
sdVo
.
getUserId
(),
entrust
.
getId
(),
sdVo
.
getTeamGroupId
(),
1
,
sample
.
getId
(),
tru
e
);
iPrecipriceService
.
createPreciprice
(
sdVo
.
getUserId
(),
entrust
.
getId
(),
sdVo
.
getTeamGroupId
(),
1
,
sample
.
getId
(),
fals
e
);
}
catch
(
Exception
e
){
return
BaseResponse
.
errorMsg
(
e
.
getMessage
());
}
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardValueServiceImpl.java
View file @
9713c868
...
...
@@ -30,7 +30,8 @@ import java.util.*;
*/
@Service
public
class
NonStandardValueServiceImpl
extends
ServiceImpl
<
NonStandardValueMapper
,
NonStandardValue
>
implements
INonStandardValueService
{
@Resource
@Resource
private
NonStandardValueMapper
nonStandardValueMapper
;
@Override
...
...
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanConsumablesPurchaseServiceImpl.java
View file @
9713c868
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanStandardPurchaseServiceImpl.java
View file @
9713c868
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/SampleServiceImpl.java
View file @
9713c868
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.Sample
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.mapper.SampleMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.SampleSaveDto
;
import
cn.wise.sc.cement.business.model.SampleWord
;
import
cn.wise.sc.cement.business.model.query.SampleManageQuery
;
import
cn.wise.sc.cement.business.model.vo.SampleVo
;
import
cn.wise.sc.cement.business.service.ISampleService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
cn.wise.sc.cement.business.util.WordUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -253,9 +257,9 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
;
if
(
j
<
7
)
{
obj
=
m
.
get
(
headers
[
j
])
==
null
?
"—"
:
m
.
get
(
headers
[
j
]).
toString
();
}
else
{
obj
=
m
.
get
(
headers
[
j
])
==
null
?
""
:
m
.
get
(
headers
[
j
]).
toString
();
obj
=
m
.
get
(
headers
[
j
])
==
null
?
"—"
:
m
.
get
(
headers
[
j
]).
toString
();
}
else
{
obj
=
m
.
get
(
headers
[
j
])
==
null
?
""
:
m
.
get
(
headers
[
j
]).
toString
();
}
//如果序号带小数点 去除.0,保留整数
if
(
j
==
0
)
{
...
...
@@ -270,4 +274,20 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
}
}
@Override
public
void
exportWord
(
HttpServletResponse
response
)
{
List
<
SampleWord
>
list
=
sampleMapper
.
exportWordList
();
if
(
CollectionUtil
.
isEmpty
(
list
))
{
log
.
debug
(
"没找到数据!"
);
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
1
);
params
.
put
(
"list"
,
list
);
WordUtil
.
writeWordReport
(
"原料存放、销毁记录"
,
"原料存放、销毁记录.ftl"
,
params
,
response
,
FileExt
.
DOC
);
}
}
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/原料存放、销毁记录.ftl
0 → 100644
View file @
9713c868
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/标准物质采购计划.ftl
0 → 100644
View file @
9713c868
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/消耗品采购计划 .ftl
0 → 100644
View file @
9713c868
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/消耗品采购计划.docx
0 → 100644
View file @
9713c868
File added
This diff is collapsed.
Click to expand it.
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