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
90434e45
Commit
90434e45
authored
Nov 21, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
计划管理增加实施情况字段
parents
befb6757
eb4420bc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
689 additions
and
370 deletions
+689
-370
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
PlanEquipmentPurchaseController.java
.../business/controller/PlanEquipmentPurchaseController.java
+8
-0
PlanStandardPurchaseController.java
...t/business/controller/PlanStandardPurchaseController.java
+28
-20
SampleController.java
.../wise/sc/cement/business/controller/SampleController.java
+6
-0
PlanConsumablesPurchaseMapper.java
...cement/business/mapper/PlanConsumablesPurchaseMapper.java
+1
-0
PlanEquipmentPurchaseMapper.java
...c/cement/business/mapper/PlanEquipmentPurchaseMapper.java
+4
-0
PlanStandardPurchaseMapper.java
...sc/cement/business/mapper/PlanStandardPurchaseMapper.java
+3
-0
SampleMapper.java
.../java/cn/wise/sc/cement/business/mapper/SampleMapper.java
+27
-23
NonStandardValueMapper.xml
.../sc/cement/business/mapper/xml/NonStandardValueMapper.xml
+0
-5
PlanConsumablesPurchaseMapper.xml
...ent/business/mapper/xml/PlanConsumablesPurchaseMapper.xml
+25
-0
PlanEquipmentPurchaseMapper.xml
...ement/business/mapper/xml/PlanEquipmentPurchaseMapper.xml
+25
-0
PlanStandardPurchaseMapper.xml
...cement/business/mapper/xml/PlanStandardPurchaseMapper.xml
+24
-0
SampleMapper.xml
...va/cn/wise/sc/cement/business/mapper/xml/SampleMapper.xml
+20
-0
SampleWord.java
...ain/java/cn/wise/sc/cement/business/model/SampleWord.java
+23
-0
PlanConsumablesPurchaseVo.java
...c/cement/business/model/vo/PlanConsumablesPurchaseVo.java
+2
-0
PlanEquipmentPurchaseVo.java
.../sc/cement/business/model/vo/PlanEquipmentPurchaseVo.java
+2
-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
IPlanEquipmentPurchaseService.java
...ement/business/service/IPlanEquipmentPurchaseService.java
+1
-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
+171
-149
PlanEquipmentPurchaseServiceImpl.java
...siness/service/impl/PlanEquipmentPurchaseServiceImpl.java
+177
-138
PlanStandardPurchaseServiceImpl.java
...usiness/service/impl/PlanStandardPurchaseServiceImpl.java
+39
-0
SampleServiceImpl.java
...se/sc/cement/business/service/impl/SampleServiceImpl.java
+29
-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
采购维修计划 .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 @
90434e45
...
...
@@ -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>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/CabinetController.java
View file @
90434e45
...
...
@@ -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
(
"删除失败!"
);
}
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NormProductionController.java
View file @
90434e45
...
...
@@ -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
));
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanConsumablesPurchaseController.java
View file @
90434e45
...
...
@@ -5,7 +5,9 @@ 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.PlanFinishQuery
;
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
;
...
...
@@ -59,6 +61,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
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanEquipmentPurchaseController.java
View file @
90434e45
...
...
@@ -60,6 +60,14 @@ public class PlanEquipmentPurchaseController {
}
}
@ApiOperation
(
"设备采购计划列表导出(word)"
)
@PostMapping
(
"/export/word"
)
public
void
exportWord
(
HttpServletResponse
response
){
equipmentPurchaseService
.
exportWord
(
response
);
}
@ApiOperation
(
value
=
"新增设备采购计划"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanEquipmentPurchaseQuery
query
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanStandardPurchaseController.java
View file @
90434e45
...
...
@@ -60,6 +60,14 @@ public class PlanStandardPurchaseController {
}
}
@ApiOperation
(
"标样采购计划列表导出(word)"
)
@PostMapping
(
"/export/word"
)
public
void
exportWord
(
HttpServletResponse
response
)
{
standardPurchaseService
.
exportWord
(
response
);
}
@ApiOperation
(
value
=
"新增标样采购计划"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanStandardPurchaseQuery
query
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/SampleController.java
View file @
90434e45
...
...
@@ -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
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanConsumablesPurchaseMapper.java
View file @
90434e45
...
...
@@ -27,4 +27,5 @@ public interface PlanConsumablesPurchaseMapper extends BaseMapper<PlanConsumable
PlanConsumablesPurchaseVo
getDetail
(
Integer
id
);
List
<
PlanConsumablesPurchaseVo
>
exportWordList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanEquipmentPurchaseMapper.java
View file @
90434e45
...
...
@@ -27,4 +27,8 @@ public interface PlanEquipmentPurchaseMapper extends BaseMapper<PlanEquipmentPur
PlanEquipmentPurchaseVo
getDetail
(
Integer
id
);
/**
* @return
*/
List
<
PlanEquipmentPurchaseVo
>
exportWordList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanStandardPurchaseMapper.java
View file @
90434e45
...
...
@@ -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
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SampleMapper.java
View file @
90434e45
...
...
@@ -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
;
...
...
@@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -58,4 +60,6 @@ public interface SampleMapper extends BaseMapper<Sample> {
List
<
Sample
>
getSampleCheckList
(
Integer
entrustId
);
List
<
SampleSaveDto
>
getSampleSaveList
();
List
<
SampleWord
>
exportWordList
(
@Param
(
"start"
)
Date
start
,
@Param
(
"end"
)
Date
end
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardValueMapper.xml
View file @
90434e45
<?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.start_time desc
</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 序号,
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanConsumablesPurchaseMapper.xml
View file @
90434e45
...
...
@@ -12,6 +12,23 @@
</if>
</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.PlanConsumablesPurchaseVo"
>
SELECT t.*, su.name as purchaserName
...
...
@@ -48,4 +65,12 @@
WHERE t.id = #{id}
</select>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo"
>
SELECT t.*, su.name as purchaserName
FROM plan_consumables_purchase t
left join sys_user su on su.id = t.purchaser_id
<include
refid=
"whereNew"
/>
ORDER BY t.id DESC
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanEquipmentPurchaseMapper.xml
View file @
90434e45
...
...
@@ -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.PlanEquipmentPurchaseVo"
>
SELECT t.*, su.name as purchaserName
FROM plan_equipment_purchase t
...
...
@@ -48,5 +65,13 @@
WHERE t.id = #{id}
</select>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo"
>
SELECT t.*, su.name as purchaserName
FROM plan_equipment_purchase t
left join sys_user su on su.id = t.purchaser_id
<include
refid=
"whereNew"
/>
ORDER BY t.id DESC
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanStandardPurchaseMapper.xml
View file @
90434e45
...
...
@@ -16,6 +16,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
...
...
@@ -47,5 +64,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>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleMapper.xml
View file @
90434e45
...
...
@@ -85,5 +85,25 @@
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
where s.create_time
<![CDATA[>=]]>
#{start}
and s.create_time
<![CDATA[<=]]>
#{end}
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/model/SampleWord.java
0 → 100644
View file @
90434e45
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
=
""
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanConsumablesPurchaseVo.java
View file @
90434e45
...
...
@@ -66,4 +66,6 @@ public class PlanConsumablesPurchaseVo {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
private
String
createTimeStr
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanEquipmentPurchaseVo.java
View file @
90434e45
...
...
@@ -66,4 +66,6 @@ public class PlanEquipmentPurchaseVo {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
private
String
createTimeStr
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanStandardPurchaseVo.java
View file @
90434e45
...
...
@@ -63,4 +63,6 @@ public class PlanStandardPurchaseVo {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
private
String
createTimeStr
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/SampleVo.java
View file @
90434e45
...
...
@@ -106,4 +106,6 @@ public class SampleVo {
@ApiModelProperty
(
"产地"
)
private
String
origin
;
private
String
createTime
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardValueService.java
View file @
90434e45
...
...
@@ -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
);
/* //计算每个用户提交的非标产值
...
...
@@ -48,7 +48,7 @@ public interface INonStandardValueService extends IService<NonStandardValue> {
*
* @return List
*/
BaseResponse
<
List
<
NonStandardValueVo
>>
getList
(
Date
start
,
Date
end
,
Integer
groups
,
String
name
);
BaseResponse
<
List
<
NonStandardValueVo
>>
getList
(
Date
start
,
Date
end
,
Integer
groups
,
String
name
);
/**
* 非标产值列表导出
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanConsumablesPurchaseService.java
View file @
90434e45
...
...
@@ -35,4 +35,9 @@ public interface IPlanConsumablesPurchaseService extends IService<PlanConsumable
BaseResponse
<
String
>
delete
(
Integer
id
);
/**
* 导出word
* @param response
*/
void
exportWord
(
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanEquipmentPurchaseService.java
View file @
90434e45
...
...
@@ -35,4 +35,5 @@ public interface IPlanEquipmentPurchaseService extends IService<PlanEquipmentPur
BaseResponse
<
String
>
delete
(
Integer
id
);
void
exportWord
(
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanStandardPurchaseService.java
View file @
90434e45
...
...
@@ -35,4 +35,5 @@ public interface IPlanStandardPurchaseService extends IService<PlanStandardPurch
BaseResponse
<
String
>
delete
(
Integer
id
);
void
exportWord
(
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ISampleService.java
View file @
90434e45
...
...
@@ -52,4 +52,10 @@ public interface ISampleService extends IService<Sample> {
* @param response 响应体
*/
void
upload
(
HttpServletResponse
response
);
/**
* 导出样品销毁记录 word
* @param response
*/
void
exportWord
(
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
90434e45
...
...
@@ -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
());
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardValueServiceImpl.java
View file @
90434e45
...
...
@@ -30,6 +30,7 @@ import java.util.*;
*/
@Service
public
class
NonStandardValueServiceImpl
extends
ServiceImpl
<
NonStandardValueMapper
,
NonStandardValue
>
implements
INonStandardValueService
{
@Resource
private
NonStandardValueMapper
nonStandardValueMapper
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanConsumablesPurchaseServiceImpl.java
View file @
90434e45
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.wise.sc.cement.business.entity.PlanConsumablesPurchase
;
import
cn.wise.sc.cement.business.entity.PlanEquipmentPurchase
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.mapper.PlanConsumablesPurchaseMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.LoginUser
;
...
...
@@ -14,6 +17,7 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
import
cn.wise.sc.cement.business.service.IPlanConsumablesPurchaseService
;
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.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -221,4 +225,22 @@ public class PlanConsumablesPurchaseServiceImpl extends ServiceImpl<PlanConsumab
return
BaseResponse
.
okData
(
"删除成功"
);
}
@Override
public
void
exportWord
(
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Page
page
=
new
Page
();
page
.
setSize
(-
1
);
List
<
PlanConsumablesPurchaseVo
>
records
=
consumablesPurchaseMapper
.
getPage
(
page
,
params
).
getRecords
();
if
(
CollectionUtil
.
isEmpty
(
records
))
{
log
.
debug
(
"没有找到数据!"
);
}
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>();
records
.
add
(
records
.
get
(
0
));
beanParams
.
put
(
"list"
,
records
);
beanParams
.
put
(
"fileNo"
,
""
);
beanParams
.
put
(
"year"
,
DateUtil
.
year
(
DateUtil
.
date
())
+
""
);
WordUtil
.
writeWordReport
(
"消耗品采购计划.docx"
,
"消耗品采购计划.ftl"
,
beanParams
,
response
,
FileExt
.
DOC
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanEquipmentPurchaseServiceImpl.java
View file @
90434e45
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.PlanEquipmentPurchase
;
import
cn.wise.sc.cement.business.entity.SysRole
;
import
cn.wise.sc.cement.business.entity.Team
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.mapper.PlanEquipmentPurchaseMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.LoginUser
;
...
...
@@ -17,6 +21,7 @@ import cn.wise.sc.cement.business.model.vo.TeamVo;
import
cn.wise.sc.cement.business.service.IPlanEquipmentPurchaseService
;
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.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -31,7 +36,9 @@ import org.springframework.util.CollectionUtils;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -228,4 +235,36 @@ public class PlanEquipmentPurchaseServiceImpl extends ServiceImpl<PlanEquipmentP
return
BaseResponse
.
okData
(
"删除成功"
);
}
@Override
public
void
exportWord
(
HttpServletResponse
response
)
{
Date
start
=
DateUtil
.
beginOfYear
(
DateUtil
.
date
());
Date
end
=
DateUtil
.
endOfYear
(
DateUtil
.
date
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
2
);
map
.
put
(
"start"
,
start
);
map
.
put
(
"end"
,
end
);
List
<
PlanEquipmentPurchaseVo
>
list
=
equipmentPurchaseMapper
.
exportWordList
(
map
);
if
(
CollectionUtil
.
isEmpty
(
list
))
{
log
.
debug
(
"采购计划为空!"
);
return
;
}
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd"
);
list
.
forEach
(
arg
->
{
if
(
StrUtil
.
isEmpty
(
arg
.
getRemark
()))
{
arg
.
setRemark
(
""
);
}
arg
.
setCreateTimeStr
(
arg
.
getCreateTime
().
format
(
dateTimeFormatter
));
});
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
5
);
params
.
put
(
"list"
,
list
);
params
.
put
(
"fileNo"
,
""
);
params
.
put
(
"year"
,
DateUtil
.
year
(
DateUtil
.
date
()));
WordUtil
.
writeWordReport
(
"消耗品采购计划"
,
"消耗品采购计划.ftl"
,
params
,
response
,
FileExt
.
DOC
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanStandardPurchaseServiceImpl.java
View file @
90434e45
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.PlanConsumablesPurchase
;
import
cn.wise.sc.cement.business.entity.PlanStandardPurchase
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.mapper.PlanStandardPurchaseMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.LoginUser
;
...
...
@@ -14,6 +18,7 @@ import cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo;
import
cn.wise.sc.cement.business.service.IPlanStandardPurchaseService
;
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.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -27,7 +32,9 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -219,4 +226,36 @@ public class PlanStandardPurchaseServiceImpl extends ServiceImpl<PlanStandardPur
return
BaseResponse
.
okData
(
"删除成功"
);
}
@Override
public
void
exportWord
(
HttpServletResponse
response
)
{
Date
start
=
DateUtil
.
beginOfYear
(
DateUtil
.
date
());
Date
end
=
DateUtil
.
endOfYear
(
DateUtil
.
date
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"start"
,
start
);
map
.
put
(
"end"
,
end
);
List
<
PlanStandardPurchaseVo
>
planStandardPurchaseVos
=
standardPurchaseMapper
.
wordList
(
map
);
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy/mm"
);
planStandardPurchaseVos
.
forEach
(
arg
->
{
arg
.
setCreateTimeStr
(
arg
.
getCreateTime
().
format
(
dateTimeFormatter
));
if
(
StrUtil
.
isEmpty
(
arg
.
getRemark
())){
arg
.
setRemark
(
""
);
}
});
if
(
CollectionUtil
.
isEmpty
(
planStandardPurchaseVos
))
{
log
.
debug
(
"没找到数据!"
);
return
;
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
1
);
params
.
put
(
"list"
,
planStandardPurchaseVos
);
params
.
put
(
"fileNo"
,
"2020-000001"
);
params
.
put
(
"year"
,
DateUtil
.
year
(
DateUtil
.
date
())
+
""
);
WordUtil
.
writeWordReport
(
"标准物质采购计划"
,
"标准物质采购计划.ftl"
,
params
,
response
,
FileExt
.
DOC
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/SampleServiceImpl.java
View file @
90434e45
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateUtil
;
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
;
...
...
@@ -24,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -254,7 +260,7 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
String
obj
;
if
(
j
<
7
)
{
obj
=
m
.
get
(
headers
[
j
])
==
null
?
"—"
:
m
.
get
(
headers
[
j
]).
toString
();
}
else
{
}
else
{
obj
=
m
.
get
(
headers
[
j
])
==
null
?
""
:
m
.
get
(
headers
[
j
]).
toString
();
}
//如果序号带小数点 去除.0,保留整数
...
...
@@ -270,4 +276,24 @@ public class SampleServiceImpl extends ServiceImpl<SampleMapper, Sample> impleme
}
}
@Override
public
void
exportWord
(
HttpServletResponse
response
)
{
Date
start
=
DateUtil
.
beginOfYear
(
DateUtil
.
date
());
Date
end
=
DateUtil
.
endOfYear
(
DateUtil
.
date
());
List
<
SampleWord
>
list
=
sampleMapper
.
exportWordList
(
start
,
end
);
if
(
CollectionUtil
.
isEmpty
(
list
))
{
log
.
debug
(
"没找到数据!"
);
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
1
);
params
.
put
(
"list"
,
list
);
params
.
put
(
"fileNo"
,
""
);
WordUtil
.
writeWordReport
(
"原料存放、销毁记录"
,
"原料存放、销毁记录.ftl"
,
params
,
response
,
FileExt
.
DOC
);
}
}
cement-business/src/main/resources/templates/原料存放、销毁记录.ftl
0 → 100644
View file @
90434e45
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/标准物质采购计划.ftl
0 → 100644
View file @
90434e45
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/消耗品采购计划.ftl
0 → 100644
View file @
90434e45
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/采购维修计划 .ftl
0 → 100644
View file @
90434e45
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/templates/采购维修计划.ftl
0 → 100644
View file @
90434e45
This diff is collapsed.
Click to expand it.
cement-business/src/main/resources/消耗品采购计划.docx
0 → 100644
View file @
90434e45
File added
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