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
90f21ac0
Commit
90f21ac0
authored
Sep 03, 2020
by
zhutianwei@hyzcservice.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资源管理-供应商管理,设备管理后台接口工功能完成
parent
d57ae145
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
2797 additions
and
15 deletions
+2797
-15
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+2
-2
EquipmentController.java
...se/sc/cement/business/controller/EquipmentController.java
+261
-0
SupplierController.java
...ise/sc/cement/business/controller/SupplierController.java
+119
-0
SysPostController.java
...wise/sc/cement/business/controller/SysPostController.java
+1
-1
EntityEnclosure.java
...va/cn/wise/sc/cement/business/entity/EntityEnclosure.java
+71
-0
Entrust.java
.../main/java/cn/wise/sc/cement/business/entity/Entrust.java
+1
-1
Equipment.java
...ain/java/cn/wise/sc/cement/business/entity/Equipment.java
+77
-0
EquipmentScrap.java
...ava/cn/wise/sc/cement/business/entity/EquipmentScrap.java
+57
-0
EquipmentTest.java
...java/cn/wise/sc/cement/business/entity/EquipmentTest.java
+60
-0
EquipmentTroubleshooting.java
...e/sc/cement/business/entity/EquipmentTroubleshooting.java
+80
-0
EquipmentUse.java
.../java/cn/wise/sc/cement/business/entity/EquipmentUse.java
+69
-0
Supplier.java
...main/java/cn/wise/sc/cement/business/entity/Supplier.java
+65
-0
EntityEnclosureMapper.java
...wise/sc/cement/business/mapper/EntityEnclosureMapper.java
+16
-0
EquipmentMapper.java
...va/cn/wise/sc/cement/business/mapper/EquipmentMapper.java
+26
-0
EquipmentScrapMapper.java
.../wise/sc/cement/business/mapper/EquipmentScrapMapper.java
+27
-0
EquipmentTestMapper.java
...n/wise/sc/cement/business/mapper/EquipmentTestMapper.java
+27
-0
EquipmentTroubleshootingMapper.java
...ement/business/mapper/EquipmentTroubleshootingMapper.java
+27
-0
EquipmentUseMapper.java
...cn/wise/sc/cement/business/mapper/EquipmentUseMapper.java
+25
-0
SupplierMapper.java
...ava/cn/wise/sc/cement/business/mapper/SupplierMapper.java
+16
-0
EntityEnclosureMapper.xml
...e/sc/cement/business/mapper/xml/EntityEnclosureMapper.xml
+5
-0
EquipmentMapper.xml
...cn/wise/sc/cement/business/mapper/xml/EquipmentMapper.xml
+42
-0
EquipmentScrapMapper.xml
...se/sc/cement/business/mapper/xml/EquipmentScrapMapper.xml
+44
-0
EquipmentTestMapper.xml
...ise/sc/cement/business/mapper/xml/EquipmentTestMapper.xml
+38
-0
EquipmentTroubleshootingMapper.xml
...nt/business/mapper/xml/EquipmentTroubleshootingMapper.xml
+27
-0
EquipmentUseMapper.xml
...wise/sc/cement/business/mapper/xml/EquipmentUseMapper.xml
+29
-0
SupplierMapper.xml
.../cn/wise/sc/cement/business/mapper/xml/SupplierMapper.xml
+5
-0
EnclosureQuery.java
...n/wise/sc/cement/business/model/query/EnclosureQuery.java
+21
-0
EquipmentQuery.java
...n/wise/sc/cement/business/model/query/EquipmentQuery.java
+60
-0
EquipmentScrapApprovalQuery.java
...ent/business/model/query/EquipmentScrapApprovalQuery.java
+27
-0
EquipmentScrapQuery.java
...e/sc/cement/business/model/query/EquipmentScrapQuery.java
+35
-0
EquipmentTestQuery.java
...se/sc/cement/business/model/query/EquipmentTestQuery.java
+46
-0
EquipmentTroubleshootingQuery.java
...t/business/model/query/EquipmentTroubleshootingQuery.java
+62
-0
PostQuery.java
...ava/cn/wise/sc/cement/business/model/query/PostQuery.java
+1
-1
SupplierQuery.java
...cn/wise/sc/cement/business/model/query/SupplierQuery.java
+49
-0
EquipmentScrapVo.java
...cn/wise/sc/cement/business/model/vo/EquipmentScrapVo.java
+65
-0
EquipmentTestVo.java
.../cn/wise/sc/cement/business/model/vo/EquipmentTestVo.java
+59
-0
EquipmentTroubleshootingVo.java
.../cement/business/model/vo/EquipmentTroubleshootingVo.java
+83
-0
EquipmentUseVo.java
...a/cn/wise/sc/cement/business/model/vo/EquipmentUseVo.java
+69
-0
EquipmentVo.java
...java/cn/wise/sc/cement/business/model/vo/EquipmentVo.java
+68
-0
SampleDistributionVo.java
...ise/sc/cement/business/model/vo/SampleDistributionVo.java
+3
-0
SampleHandleVo.java
...a/cn/wise/sc/cement/business/model/vo/SampleHandleVo.java
+3
-0
TeamVo.java
...main/java/cn/wise/sc/cement/business/model/vo/TeamVo.java
+1
-5
IEntityEnclosureService.java
...e/sc/cement/business/service/IEntityEnclosureService.java
+16
-0
IEquipmentScrapService.java
...se/sc/cement/business/service/IEquipmentScrapService.java
+16
-0
IEquipmentService.java
...cn/wise/sc/cement/business/service/IEquipmentService.java
+54
-0
IEquipmentTestService.java
...ise/sc/cement/business/service/IEquipmentTestService.java
+16
-0
IEquipmentTroubleshootingService.java
...nt/business/service/IEquipmentTroubleshootingService.java
+16
-0
IEquipmentUseService.java
...wise/sc/cement/business/service/IEquipmentUseService.java
+16
-0
ISupplierService.java
.../cn/wise/sc/cement/business/service/ISupplierService.java
+28
-0
ITeamService.java
...java/cn/wise/sc/cement/business/service/ITeamService.java
+0
-1
CommonServiceImpl.java
...se/sc/cement/business/service/impl/CommonServiceImpl.java
+68
-1
EntityEnclosureServiceImpl.java
...ent/business/service/impl/EntityEnclosureServiceImpl.java
+20
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+35
-2
EquipmentScrapServiceImpl.java
...ment/business/service/impl/EquipmentScrapServiceImpl.java
+20
-0
EquipmentServiceImpl.java
...sc/cement/business/service/impl/EquipmentServiceImpl.java
+443
-0
EquipmentTestServiceImpl.java
...ement/business/service/impl/EquipmentTestServiceImpl.java
+20
-0
EquipmentTroubleshootingServiceImpl.java
...ess/service/impl/EquipmentTroubleshootingServiceImpl.java
+20
-0
EquipmentUseServiceImpl.java
...cement/business/service/impl/EquipmentUseServiceImpl.java
+20
-0
SupplierServiceImpl.java
.../sc/cement/business/service/impl/SupplierServiceImpl.java
+111
-0
TeamServiceImpl.java
...wise/sc/cement/business/service/impl/TeamServiceImpl.java
+8
-0
application.yml
cement-business/src/main/resources/application.yml
+1
-1
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustController.java
View file @
90f21ac0
...
...
@@ -103,7 +103,7 @@ public class EntrustController {
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态(
0未审批,1已通过,2未通过,3样品处理,4派发
)"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态(
(0未接受,1接受,2完成)
)"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"clientId"
,
value
=
"委托单位id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"projectName"
,
value
=
"项目名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
...
...
@@ -154,7 +154,7 @@ public class EntrustController {
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态(
0未审批,1已通过,2未通过,3样品处理,4派发
)"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态(
(0未接受,1接受,2完成)
)"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"clientId"
,
value
=
"委托单位id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"projectName"
,
value
=
"项目名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EquipmentController.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.Equipment
;
import
cn.wise.sc.cement.business.entity.SysPost
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.*
;
import
cn.wise.sc.cement.business.model.vo.TeamVo
;
import
cn.wise.sc.cement.business.service.IEquipmentService
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 前端控制器
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Api
(
tags
=
"资源管理-设备管理"
)
@RestController
@RequestMapping
(
"/business/equipment"
)
public
class
EquipmentController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"EquipmentController"
);
@Autowired
private
IEquipmentService
equipmentService
;
@ApiOperation
(
value
=
"设备分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"brand"
,
value
=
"设备品牌"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"supplierId"
,
value
=
"供应商表id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"设备名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
String
brand
,
Integer
supplierId
,
String
name
)
{
try
{
return
equipmentService
.
getPage
(
pageQuery
,
brand
,
supplierId
,
name
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"新增设备"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
EquipmentQuery
query
)
{
try
{
return
equipmentService
.
create
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"新增设备{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"修改设备"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
EquipmentQuery
query
)
{
try
{
return
equipmentService
.
update
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"修改设备{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备详情"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
return
equipmentService
.
getDetail
(
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"设备详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备列表"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
getList
(){
try
{
List
<
Equipment
>
list
=
equipmentService
.
list
();
return
BaseResponse
.
okData
(
list
);
}
catch
(
Exception
e
){
log
.
debug
(
"设备列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除设备"
)
@PostMapping
(
"/delete/{id}"
)
public
BaseResponse
delete
(
@PathVariable
Integer
id
){
try
{
equipmentService
.
removeById
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
catch
(
Exception
e
){
log
.
debug
(
"删除设备{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"检定设备 (不传id为添加记录,传id为修改记录)"
)
@PostMapping
(
"/test"
)
public
BaseResponse
test
(
@RequestBody
EquipmentTestQuery
query
)
{
try
{
return
equipmentService
.
test
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"检定设备{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备检定分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"equipmentId"
,
value
=
"设备表id"
,
paramType
=
"query"
,
dataType
=
"Integer"
)
})
@GetMapping
(
"/getTestPage"
)
public
BaseResponse
getTestPage
(
PageQuery
pageQuery
,
Integer
equipmentId
)
{
try
{
return
equipmentService
.
getTestPage
(
pageQuery
,
equipmentId
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备检定分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备检定详情"
)
@GetMapping
(
"getTestDetail/{id}"
)
public
BaseResponse
getTestDetail
(
@PathVariable
Integer
id
){
try
{
return
equipmentService
.
getTestDetail
(
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"设备检定详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备故障维修登记 (不传id为添加记录,传id为修改记录)"
)
@PostMapping
(
"/troubleshooting"
)
public
BaseResponse
troubleshooting
(
@RequestBody
EquipmentTroubleshootingQuery
query
)
{
try
{
return
equipmentService
.
troubleshooting
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备故障维修登记{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备故障维修登记分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"equipmentId"
,
value
=
"设备表id"
,
paramType
=
"query"
,
dataType
=
"Integer"
)
})
@GetMapping
(
"/getTroubleshootingPage"
)
public
BaseResponse
getTroubleshootingPage
(
PageQuery
pageQuery
,
Integer
equipmentId
)
{
try
{
return
equipmentService
.
getTroubleshootingPage
(
pageQuery
,
equipmentId
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备故障维修登记分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"维修登记详情"
)
@GetMapping
(
"getTroubleshootingDetail/{id}"
)
public
BaseResponse
getTroubleshootingDetail
(
@PathVariable
Integer
id
){
try
{
return
equipmentService
.
getTroubleshootingDetail
(
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"维修登记详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备报废申请"
)
@PostMapping
(
"/scrap"
)
public
BaseResponse
scrap
(
@RequestBody
EquipmentScrapQuery
query
)
{
try
{
return
equipmentService
.
scrap
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备报废申请{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备报废审批"
)
@PostMapping
(
"/scrapApproval"
)
public
BaseResponse
scrapApproval
(
@RequestBody
EquipmentScrapApprovalQuery
query
)
{
try
{
return
equipmentService
.
scrapApproval
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备报废审批{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"报废申请分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"brand"
,
value
=
"设备品牌"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"supplierId"
,
value
=
"供应商表id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"设备名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getScrapApprovalPage"
)
public
BaseResponse
getScrapApprovalPage
(
PageQuery
pageQuery
,
String
brand
,
Integer
supplierId
,
String
name
)
{
try
{
return
equipmentService
.
getScrapApprovalPage
(
pageQuery
,
brand
,
supplierId
,
name
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"报废申请分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"报废申请详情"
)
@GetMapping
(
"getscrapApprovalDetail/{id}"
)
public
BaseResponse
getscrapApprovalDetail
(
@PathVariable
Integer
id
){
try
{
return
equipmentService
.
getscrapApprovalDetail
(
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"报废申请详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"设备使用记录分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"brand"
,
value
=
"设备品牌"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"supplierId"
,
value
=
"供应商表id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"设备名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getUsePage"
)
public
BaseResponse
getUsePage
(
PageQuery
pageQuery
,
String
brand
,
Integer
supplierId
,
String
name
)
{
try
{
return
equipmentService
.
getUsePage
(
pageQuery
,
brand
,
supplierId
,
name
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备使用记录分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/SupplierController.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.Supplier
;
import
cn.wise.sc.cement.business.entity.SysPost
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.PostQuery
;
import
cn.wise.sc.cement.business.model.query.SupplierQuery
;
import
cn.wise.sc.cement.business.service.ISupplierService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* <p>
* 前端控制器
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Api
(
tags
=
"资源管理-供应商管理"
)
@RestController
@RequestMapping
(
"/business/supplier"
)
public
class
SupplierController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"SupplierController"
);
@Autowired
private
ISupplierService
supplierService
;
@ApiOperation
(
value
=
"供应商分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"name"
,
value
=
"供应商名称"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
String
name
)
{
try
{
return
supplierService
.
getPage
(
pageQuery
,
name
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"供应商分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"新增供应商"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
SupplierQuery
query
)
{
try
{
return
supplierService
.
create
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"新增供应商{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"修改供应商"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
SupplierQuery
query
)
{
try
{
return
supplierService
.
update
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"修改供应商{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"供应商详情"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
Supplier
supplier
=
supplierService
.
getById
(
id
);
if
(
supplier
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
return
BaseResponse
.
okData
(
supplier
);
}
catch
(
Exception
e
){
log
.
debug
(
"供应商详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"供应商列表"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
getList
(){
try
{
List
<
Supplier
>
list
=
supplierService
.
list
();
return
BaseResponse
.
okData
(
list
);
}
catch
(
Exception
e
){
log
.
debug
(
"供应商列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除供应商"
)
@PostMapping
(
"/delete/{id}"
)
public
BaseResponse
delete
(
@PathVariable
Integer
id
){
try
{
supplierService
.
removeById
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
catch
(
Exception
e
){
log
.
debug
(
"删除供应商{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/SysPostController.java
View file @
90f21ac0
...
...
@@ -89,7 +89,7 @@ public class SysPostController {
@ApiOperation
(
value
=
"职务列表"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
get
ById
(){
public
BaseResponse
get
List
(){
try
{
List
<
SysPost
>
list
=
postService
.
list
();
return
BaseResponse
.
okData
(
list
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EntityEnclosure.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-09-02
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
EntityEnclosure
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"实体id"
)
private
Integer
entityId
;
/**
* 实体类型(0:用户(头像),
3设备校核附件,4标样材料)
*/
@ApiModelProperty
(
"实体类型"
)
private
Integer
entityType
;
@ApiModelProperty
(
"附件地址"
)
private
String
enclosureUrl
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"更新时间"
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"是否删除(0:已经删除,1:未删除)"
)
private
Integer
isDeleted
;
@ApiModelProperty
(
"文件名"
)
private
String
alias
;
@ApiModelProperty
(
"扩展名"
)
private
String
extName
;
public
interface
EntityType
{
int
HEAD
=
0
;
int
EQUIPMENT_TEST
=
3
;
int
STANDARD_SAMPLE
=
4
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/Entrust.java
View file @
90f21ac0
...
...
@@ -29,7 +29,7 @@ public class Entrust implements Serializable {
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"委托编号"
)
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/Equipment.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.springframework.format.annotation.DateTimeFormat
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
Equipment
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"设备名称"
)
private
String
name
;
@ApiModelProperty
(
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
"设备品牌"
)
private
String
brand
;
@ApiModelProperty
(
"型号"
)
private
String
model
;
@ApiModelProperty
(
"供应商表id"
)
private
Integer
supplierId
;
@ApiModelProperty
(
"位置"
)
private
String
position
;
@ApiModelProperty
(
"采购日期(购买日期)"
)
private
LocalDate
purchaseDate
;
@ApiModelProperty
(
"资产编码"
)
private
String
assetsCode
;
@ApiModelProperty
(
"资产原值"
)
private
String
assetsValue
;
@ApiModelProperty
(
"状态(0已禁用,1已启用,2故障, 3报废)"
)
private
Integer
status
;
@ApiModelProperty
(
"检/校周期(年)"
)
private
Integer
testCycle
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EquipmentScrap.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
EquipmentScrap
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"申请人id"
)
private
Integer
userId
;
@ApiModelProperty
(
"报废原因"
)
private
String
scrapReason
;
@ApiModelProperty
(
"报废申请日期"
)
private
LocalDate
scrapDate
;
@ApiModelProperty
(
"申请结果(0待审批,1已通过,2未通过)"
)
private
Integer
status
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EquipmentTest.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
EquipmentTest
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"检定人id"
)
private
Integer
userId
;
@ApiModelProperty
(
"检定日期"
)
private
LocalDate
testDate
;
@ApiModelProperty
(
"校验日期"
)
private
LocalDate
checkDate
;
@ApiModelProperty
(
"期间核查日期"
)
private
LocalDate
periodDate
;
@ApiModelProperty
(
"实施结果"
)
private
String
tryResult
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EquipmentTroubleshooting.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
EquipmentTroubleshooting
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"提交人id"
)
private
Integer
userId
;
@ApiModelProperty
(
"发现日期"
)
private
LocalDate
findDate
;
@ApiModelProperty
(
"发现人"
)
private
String
findUser
;
@ApiModelProperty
(
"办公室主任"
)
private
String
officeDirector
;
@ApiModelProperty
(
"故障现象"
)
private
String
faultPhenomenon
;
@ApiModelProperty
(
"维修日期"
)
private
LocalDate
repairDate
;
@ApiModelProperty
(
"维修单位"
)
private
String
repairClient
;
@ApiModelProperty
(
"设备保管人"
)
private
String
safekeeping
;
@ApiModelProperty
(
"故障原因"
)
private
String
faultReason
;
@ApiModelProperty
(
"处理措施"
)
private
String
handleMeasures
;
@ApiModelProperty
(
"修复状态"
)
private
String
repairStatus
;
@ApiModelProperty
(
"维修结论"
)
private
String
repairConclusion
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EquipmentUse.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
EquipmentUse
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"使用人id"
)
private
Integer
userId
;
@ApiModelProperty
(
"使用人姓名"
)
private
String
userName
;
@ApiModelProperty
(
"使用日期"
)
private
LocalDate
useDate
;
@ApiModelProperty
(
"项目id"
)
private
Integer
projectId
;
@ApiModelProperty
(
"项目名称"
)
private
String
projectName
;
@ApiModelProperty
(
"项目编号"
)
private
String
projectCode
;
@ApiModelProperty
(
"检测项id(检测项表id)"
)
private
Integer
testItemId
;
@ApiModelProperty
(
"检测项名称"
)
private
String
testItem
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/Supplier.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
java.time.LocalDate
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
Supplier
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"供应商名称"
)
private
String
name
;
@ApiModelProperty
(
"经营类型"
)
private
String
manageType
;
@ApiModelProperty
(
"供应商类型(生产商,代理商)"
)
private
String
supplierType
;
@ApiModelProperty
(
"联系人"
)
private
String
contacts
;
@ApiModelProperty
(
"联系人电话"
)
private
String
contactsPhone
;
@ApiModelProperty
(
"登记日期"
)
private
LocalDate
registerDate
;
@ApiModelProperty
(
"经营产品"
)
private
String
businessProducts
;
@ApiModelProperty
(
"资质"
)
private
String
qualifications
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EntityEnclosureMapper.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EntityEnclosure
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-09-02
*/
public
interface
EntityEnclosureMapper
extends
BaseMapper
<
EntityEnclosure
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EquipmentMapper.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.Equipment
;
import
cn.wise.sc.cement.business.model.vo.EntrustVo
;
import
cn.wise.sc.cement.business.model.vo.EquipmentVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
EquipmentMapper
extends
BaseMapper
<
Equipment
>
{
IPage
<
EquipmentVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
EquipmentVo
getDetail
(
Integer
id
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EquipmentScrapMapper.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EquipmentScrap
;
import
cn.wise.sc.cement.business.model.vo.EquipmentScrapVo
;
import
cn.wise.sc.cement.business.model.vo.EquipmentTestVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
EquipmentScrapMapper
extends
BaseMapper
<
EquipmentScrap
>
{
IPage
<
EquipmentScrapVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
EquipmentScrapVo
getScrapDetail
(
Integer
id
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EquipmentTestMapper.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EquipmentTest
;
import
cn.wise.sc.cement.business.model.vo.EquipmentTestVo
;
import
cn.wise.sc.cement.business.model.vo.TeamVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
EquipmentTestMapper
extends
BaseMapper
<
EquipmentTest
>
{
IPage
<
EquipmentTestVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
EquipmentTestVo
getTestDetail
(
Integer
id
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EquipmentTroubleshootingMapper.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EquipmentTroubleshooting
;
import
cn.wise.sc.cement.business.model.vo.EquipmentTestVo
;
import
cn.wise.sc.cement.business.model.vo.EquipmentTroubleshootingVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
EquipmentTroubleshootingMapper
extends
BaseMapper
<
EquipmentTroubleshooting
>
{
IPage
<
EquipmentTroubleshootingVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
EquipmentTroubleshootingVo
getTroubleshootingDetail
(
Integer
id
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EquipmentUseMapper.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EquipmentUse
;
import
cn.wise.sc.cement.business.model.vo.EquipmentTestVo
;
import
cn.wise.sc.cement.business.model.vo.EquipmentUseVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
EquipmentUseMapper
extends
BaseMapper
<
EquipmentUse
>
{
IPage
<
EquipmentUseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SupplierMapper.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.Supplier
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
SupplierMapper
extends
BaseMapper
<
Supplier
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EntityEnclosureMapper.xml
0 → 100644
View file @
90f21ac0
<?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.EntityEnclosureMapper"
>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EquipmentMapper.xml
0 → 100644
View file @
90f21ac0
<?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.EquipmentMapper"
>
<sql
id=
"where"
>
<where>
<if
test=
"params.brand != null and params.brand != ''"
>
and t.brand = #{params.brand}
</if>
<if
test=
"params.supplierId != null"
>
and t.supplier_id = #{params.supplierId}
</if>
<if
test=
"params.name != null and params.name != ''"
>
and t.name like concat('%', #{params.name}, '%')
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentVo"
>
SELECT t.*, s.name as supplierName
FROM equipment t
left join supplier s on s.id = t.supplier_id
<include
refid=
"where"
/>
ORDER BY t.id DESC
</select>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentVo"
>
SELECT t.*, s.name as supplierName
FROM equipment t
left join supplier s on s.id = t.supplier_id
where t.id = #{id}
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EquipmentScrapMapper.xml
0 → 100644
View file @
90f21ac0
<?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.EquipmentScrapMapper"
>
<sql
id=
"where"
>
<where>
<if
test=
"params.brand != null and params.brand != ''"
>
and e.brand = #{params.brand}
</if>
<if
test=
"params.supplierId != null"
>
and e.supplier_id = #{params.supplierId}
</if>
<if
test=
"params.name != null and params.name != ''"
>
and e.name like concat('%', #{params.name}, '%')
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentScrapVo"
>
SELECT es.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model, e.purchase_date as purchaseDate,
e.assets_value as assetsValue
FROM equipment_scrap es
left join equipment e on e.id = et.equipment_id
<include
refid=
"where"
/>
ORDER BY es.create_time ASC
</select>
<select
id=
"getScrapDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentScrapVo"
>
SELECT es.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model, e.purchase_date as purchaseDate,
e.assets_value as assetsValue
FROM equipment_scrap es
left join equipment e on e.id = et.equipment_id
where es.id = #{id}
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EquipmentTestMapper.xml
0 → 100644
View file @
90f21ac0
<?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.EquipmentTestMapper"
>
<sql
id=
"where"
>
<where>
and et.equipment_id = #{params.equipmentId}
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentTestVo"
>
SELECT et.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model, e.test_cycle as testCycle
FROM equipment_test et
left join equipment e on e.id = et.equipment_id
<include
refid=
"where"
/>
ORDER BY et.create_time ASC
</select>
<select
id=
"getTestDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentTestVo"
>
SELECT et.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model, e.test_cycle as testCycle
FROM equipment_test et
left join equipment e on e.id = et.equipment_id
where et.id = #{id}
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EquipmentTroubleshootingMapper.xml
0 → 100644
View file @
90f21ac0
<?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.EquipmentTroubleshootingMapper"
>
<sql
id=
"where"
>
<where>
and et.equipment_id = #{params.equipmentId}
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentTroubleshootingVo"
>
SELECT et.*,
e.name as name, e.code as code, e.brand as brand, e.model as model
FROM equipment_troubleshooting et
left join equipment e on e.id = et.equipment_id
<include
refid=
"where"
/>
ORDER BY et.create_time ASC
</select>
<select
id=
"getTroubleshootingDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentTroubleshootingVo"
>
SELECT et.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model
FROM equipment_troubleshooting et
left join equipment e on e.id = et.equipment_id
where et.id = #{id}
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EquipmentUseMapper.xml
0 → 100644
View file @
90f21ac0
<?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.EquipmentUseMapper"
>
<sql
id=
"where"
>
<where>
<if
test=
"params.brand != null and params.brand != ''"
>
and e.brand = #{params.brand}
</if>
<if
test=
"params.supplierId != null"
>
and e.supplier_id = #{params.supplierId}
</if>
<if
test=
"params.name != null and params.name != ''"
>
and e.name like concat('%', #{params.name}, '%')
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentUseVo"
>
SELECT et.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model
FROM equipment_use eu
left join equipment e on e.id = et.equipment_id
<include
refid=
"where"
/>
ORDER BY et.create_time ASC
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SupplierMapper.xml
0 → 100644
View file @
90f21ac0
<?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.SupplierMapper"
>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/EnclosureQuery.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@Data
@Accessors
(
chain
=
true
)
public
class
EnclosureQuery
{
@ApiModelProperty
(
"文件名"
)
private
String
alias
;
@ApiModelProperty
(
"扩展名"
)
private
String
extName
;
@ApiModelProperty
(
"路径"
)
private
String
enclosureUrl
;
}
\ No newline at end of file
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/EquipmentQuery.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 14:58
**/
@Data
@ApiModel
(
"设备请求"
)
public
class
EquipmentQuery
{
private
Integer
id
;
@ApiModelProperty
(
"设备名称"
)
private
String
name
;
@ApiModelProperty
(
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
"设备品牌"
)
private
String
brand
;
@ApiModelProperty
(
"型号"
)
private
String
model
;
@ApiModelProperty
(
"供应商表id"
)
private
Integer
supplierId
;
@ApiModelProperty
(
"位置"
)
private
String
position
;
@ApiModelProperty
(
"采购日期(购买日期)"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
LocalDate
purchaseDate
;
@ApiModelProperty
(
"资产编码"
)
private
String
assetsCode
;
@ApiModelProperty
(
"资产原值"
)
private
String
assetsValue
;
@ApiModelProperty
(
"检/校周期(年)"
)
private
Integer
testCycle
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/EquipmentScrapApprovalQuery.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 14:58
**/
@Data
@ApiModel
(
"设备报废审批请求"
)
public
class
EquipmentScrapApprovalQuery
{
@ApiModelProperty
(
"设备报废表id"
)
private
Integer
id
;
@ApiModelProperty
(
"是否同意 1同意,2拒绝"
)
private
Integer
isAgree
;
@ApiModelProperty
(
"审批意见"
)
private
String
auditReason
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/EquipmentScrapQuery.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 14:58
**/
@Data
@ApiModel
(
"设备报废请求"
)
public
class
EquipmentScrapQuery
{
@ApiModelProperty
(
"设备报废表id"
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"报废原因"
)
private
String
scrapReason
;
@ApiModelProperty
(
"报废申请日期"
)
private
LocalDate
scrapDate
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/EquipmentTestQuery.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 14:58
**/
@Data
@ApiModel
(
"设备检定请求"
)
public
class
EquipmentTestQuery
{
@ApiModelProperty
(
"设备检定表id"
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"检定日期"
)
private
LocalDate
testDate
;
@ApiModelProperty
(
"校验日期"
)
private
LocalDate
checkDate
;
@ApiModelProperty
(
"期间核查日期"
)
private
LocalDate
periodDate
;
@ApiModelProperty
(
"实施结果"
)
private
String
tryResult
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"校核附件信息"
)
private
List
<
EnclosureQuery
>
enclosureQueryList
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/EquipmentTroubleshootingQuery.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 14:58
**/
@Data
@ApiModel
(
"设备维修请求"
)
public
class
EquipmentTroubleshootingQuery
{
@ApiModelProperty
(
"设备维修表id"
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"发现日期"
)
private
LocalDate
findDate
;
@ApiModelProperty
(
"发现人"
)
private
String
findUser
;
@ApiModelProperty
(
"办公室主任"
)
private
String
officeDirector
;
@ApiModelProperty
(
"故障现象"
)
private
String
faultPhenomenon
;
@ApiModelProperty
(
"维修日期"
)
private
LocalDate
repairDate
;
@ApiModelProperty
(
"维修单位"
)
private
String
repairClient
;
@ApiModelProperty
(
"设备保管人"
)
private
String
safekeeping
;
@ApiModelProperty
(
"故障原因"
)
private
String
faultReason
;
@ApiModelProperty
(
"处理措施"
)
private
String
handleMeasures
;
@ApiModelProperty
(
"修复状态"
)
private
String
repairStatus
;
@ApiModelProperty
(
"维修结论"
)
private
String
repairConclusion
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/PostQuery.java
View file @
90f21ac0
...
...
@@ -9,7 +9,7 @@ import java.util.List;
/**
* @description:
* @author:
qh
* @author:
ztw
* @create: 2020-08-07 14:58
**/
@Data
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/SupplierQuery.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 14:58
**/
@Data
@ApiModel
(
"供应商请求"
)
public
class
SupplierQuery
{
private
Integer
id
;
@ApiModelProperty
(
"供应商名称"
)
private
String
name
;
@ApiModelProperty
(
"经营类型"
)
private
String
manageType
;
@ApiModelProperty
(
"供应商类型(生产商,代理商)"
)
private
String
supplierType
;
@ApiModelProperty
(
"联系人"
)
private
String
contacts
;
@ApiModelProperty
(
"联系人电话"
)
private
String
contactsPhone
;
@ApiModelProperty
(
"登记日期"
)
private
LocalDate
registerDate
;
@ApiModelProperty
(
"经营产品"
)
private
String
businessProducts
;
@ApiModelProperty
(
"资质"
)
private
String
qualifications
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/EquipmentScrapVo.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
cn.wise.sc.cement.business.model.query.EnclosureQuery
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 15:09
**/
@Data
@ApiModel
(
"设备报废Vo"
)
public
class
EquipmentScrapVo
{
@ApiModelProperty
(
"设备报废表id"
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"设备名称"
)
private
String
equipmentName
;
@ApiModelProperty
(
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
"设备品牌"
)
private
String
brand
;
@ApiModelProperty
(
"型号"
)
private
String
model
;
@ApiModelProperty
(
"购置日期"
)
private
LocalDate
purchaseDate
;
@ApiModelProperty
(
"资产原值"
)
private
String
assetsValue
;
@ApiModelProperty
(
"申请人id"
)
private
Integer
userId
;
@ApiModelProperty
(
"报废原因"
)
private
String
scrapReason
;
@ApiModelProperty
(
"报废申请日期"
)
private
LocalDate
scrapDate
;
@ApiModelProperty
(
"申请结果(0待审批,1已通过,2未通过)"
)
private
Integer
status
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/EquipmentTestVo.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
cn.wise.sc.cement.business.model.query.EnclosureQuery
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 15:09
**/
@Data
@ApiModel
(
"设备检定Vo"
)
public
class
EquipmentTestVo
{
@ApiModelProperty
(
"设备检定表id"
)
private
Integer
id
;
@ApiModelProperty
(
"设备名称"
)
private
String
equipmentName
;
@ApiModelProperty
(
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
"设备品牌"
)
private
String
brand
;
@ApiModelProperty
(
"型号"
)
private
String
model
;
@ApiModelProperty
(
"检/校周期(年)"
)
private
Integer
testCycle
;
@ApiModelProperty
(
"检定日期"
)
private
LocalDate
testDate
;
@ApiModelProperty
(
"校验日期"
)
private
LocalDate
checkDate
;
@ApiModelProperty
(
"期间核查日期"
)
private
LocalDate
periodDate
;
@ApiModelProperty
(
"实施结果"
)
private
String
tryResult
;
@ApiModelProperty
(
"校核附件"
)
private
String
enclosure
;
@ApiModelProperty
(
"校核附件信息"
)
private
List
<
EnclosureQuery
>
enclosureQueryList
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/EquipmentTroubleshootingVo.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
cn.wise.sc.cement.business.model.query.EnclosureQuery
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 15:09
**/
@Data
@ApiModel
(
"设备维修Vo"
)
public
class
EquipmentTroubleshootingVo
{
@ApiModelProperty
(
"设备检定表id"
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"设备名称"
)
private
String
equipmentName
;
@ApiModelProperty
(
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
"设备品牌"
)
private
String
brand
;
@ApiModelProperty
(
"型号"
)
private
String
model
;
@ApiModelProperty
(
"提交人id"
)
private
Integer
userId
;
@ApiModelProperty
(
"发现日期"
)
private
LocalDate
findDate
;
@ApiModelProperty
(
"发现人"
)
private
String
findUser
;
@ApiModelProperty
(
"办公室主任"
)
private
String
officeDirector
;
@ApiModelProperty
(
"故障现象"
)
private
String
faultPhenomenon
;
@ApiModelProperty
(
"维修日期"
)
private
LocalDate
repairDate
;
@ApiModelProperty
(
"维修单位"
)
private
String
repairClient
;
@ApiModelProperty
(
"设备保管人"
)
private
String
safekeeping
;
@ApiModelProperty
(
"故障原因"
)
private
String
faultReason
;
@ApiModelProperty
(
"处理措施"
)
private
String
handleMeasures
;
@ApiModelProperty
(
"修复状态"
)
private
String
repairStatus
;
@ApiModelProperty
(
"维修结论"
)
private
String
repairConclusion
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/EquipmentUseVo.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 15:09
**/
@Data
@ApiModel
(
"设备使用Vo"
)
public
class
EquipmentUseVo
{
@ApiModelProperty
(
"设备使用表id"
)
private
Integer
id
;
@ApiModelProperty
(
"设备表id"
)
private
Integer
equipmentId
;
@ApiModelProperty
(
"设备名称"
)
private
String
equipmentName
;
@ApiModelProperty
(
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
"设备品牌"
)
private
String
brand
;
@ApiModelProperty
(
"型号"
)
private
String
model
;
@ApiModelProperty
(
"使用人id"
)
private
Integer
userId
;
@ApiModelProperty
(
"使用人姓名"
)
private
String
userName
;
@ApiModelProperty
(
"使用日期"
)
private
LocalDate
useDate
;
@ApiModelProperty
(
"项目id"
)
private
Integer
projectId
;
@ApiModelProperty
(
"项目名称"
)
private
String
projectName
;
@ApiModelProperty
(
"项目编号"
)
private
String
projectCode
;
@ApiModelProperty
(
"检测项id(检测项表id)"
)
private
Integer
testItemId
;
@ApiModelProperty
(
"检测项名称"
)
private
String
testItem
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/EquipmentVo.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* @description:
* @author: ztw
* @create: 2020-08-07 15:09
**/
@Data
@ApiModel
(
"设备Vo"
)
public
class
EquipmentVo
{
/**
* 主键
*/
private
Integer
id
;
@ApiModelProperty
(
"设备名称"
)
private
String
name
;
@ApiModelProperty
(
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
"设备品牌"
)
private
String
brand
;
@ApiModelProperty
(
"型号"
)
private
String
model
;
@ApiModelProperty
(
"供应商表id"
)
private
Integer
supplierId
;
@ApiModelProperty
(
"位置"
)
private
String
position
;
@ApiModelProperty
(
"采购日期(购买日期)"
)
private
LocalDate
purchaseDate
;
@ApiModelProperty
(
"资产编码"
)
private
String
assetsCode
;
@ApiModelProperty
(
"资产原值"
)
private
String
assetsValue
;
@ApiModelProperty
(
"状态(0已禁用,1已启用,2故障, 3报废)"
)
private
Integer
status
;
@ApiModelProperty
(
"检/校周期(年)"
)
private
Integer
testCycle
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"供应商名称"
)
private
String
supplierName
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/SampleDistributionVo.java
View file @
90f21ac0
...
...
@@ -42,5 +42,8 @@ public class SampleDistributionVo {
@ApiModelProperty
(
"检测人员姓名"
)
private
String
userName
;
@ApiModelProperty
(
"(0未接受,1接受,2完成)"
)
private
Integer
status
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/SampleHandleVo.java
View file @
90f21ac0
...
...
@@ -57,4 +57,7 @@ public class SampleHandleVo {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"(0未接受,1接受,2完成)"
)
private
Integer
status
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/TeamVo.java
View file @
90f21ac0
...
...
@@ -16,11 +16,7 @@ import java.util.List;
@Data
@ApiModel
(
"检测项Vo"
)
public
class
TeamVo
extends
BaseVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
public
class
TeamVo
{
@ApiModelProperty
(
"检测项表id"
)
private
Integer
id
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntityEnclosureService.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EntityEnclosure
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-09-02
*/
public
interface
IEntityEnclosureService
extends
IService
<
EntityEnclosure
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEquipmentScrapService.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EquipmentScrap
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
IEquipmentScrapService
extends
IService
<
EquipmentScrap
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEquipmentService.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.Equipment
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.*
;
import
cn.wise.sc.cement.business.model.vo.*
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
IEquipmentService
extends
IService
<
Equipment
>
{
BaseResponse
<
IPage
<
EquipmentVo
>>
getPage
(
PageQuery
pageQuery
,
String
brand
,
Integer
supplierId
,
String
name
);
BaseResponse
<
Equipment
>
create
(
EquipmentQuery
query
);
BaseResponse
<
Equipment
>
update
(
EquipmentQuery
query
);
BaseResponse
<
EquipmentVo
>
getDetail
(
Integer
id
);
BaseResponse
<
String
>
test
(
EquipmentTestQuery
query
);
BaseResponse
<
IPage
<
EquipmentTestVo
>>
getTestPage
(
PageQuery
pageQuery
,
Integer
equipmentId
);
BaseResponse
<
EquipmentTestVo
>
getTestDetail
(
Integer
id
);
BaseResponse
<
String
>
troubleshooting
(
EquipmentTroubleshootingQuery
query
);
BaseResponse
<
IPage
<
EquipmentTroubleshootingVo
>>
getTroubleshootingPage
(
PageQuery
pageQuery
,
Integer
equipmentId
);
BaseResponse
<
EquipmentTroubleshootingVo
>
getTroubleshootingDetail
(
Integer
id
);
BaseResponse
<
String
>
scrap
(
EquipmentScrapQuery
query
);
BaseResponse
<
String
>
scrapApproval
(
EquipmentScrapApprovalQuery
query
);
BaseResponse
<
IPage
<
EquipmentScrapVo
>>
getScrapApprovalPage
(
PageQuery
pageQuery
,
String
brand
,
Integer
supplierId
,
String
name
);
BaseResponse
<
EquipmentScrapVo
>
getscrapApprovalDetail
(
Integer
id
);
BaseResponse
<
IPage
<
EquipmentUseVo
>>
getUsePage
(
PageQuery
pageQuery
,
String
brand
,
Integer
supplierId
,
String
name
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEquipmentTestService.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EquipmentTest
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
IEquipmentTestService
extends
IService
<
EquipmentTest
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEquipmentTroubleshootingService.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EquipmentTroubleshooting
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
IEquipmentTroubleshootingService
extends
IService
<
EquipmentTroubleshooting
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEquipmentUseService.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EquipmentUse
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
IEquipmentUseService
extends
IService
<
EquipmentUse
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ISupplierService.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.Supplier
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.SupplierQuery
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
public
interface
ISupplierService
extends
IService
<
Supplier
>
{
BaseResponse
<
IPage
<
Supplier
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
BaseResponse
<
Supplier
>
create
(
SupplierQuery
query
);
BaseResponse
<
Supplier
>
update
(
SupplierQuery
query
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ITeamService.java
View file @
90f21ac0
...
...
@@ -25,7 +25,6 @@ public interface ITeamService extends IService<Team> {
* 获取分页
* @param pageQuery
* @param status
* @param gourpId
* @param name
* @return
*/
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/CommonServiceImpl.java
View file @
90f21ac0
...
...
@@ -2,15 +2,28 @@ package cn.wise.sc.cement.business.service.impl;
import
cn.wise.sc.cement.business.entity.EntityEnclosure
;
import
cn.wise.sc.cement.business.mapper.EntityEnclosureMapper
;
import
cn.wise.sc.cement.business.model.query.EnclosureQuery
;
import
cn.wise.sc.cement.business.service.IEntityEnclosureService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
CommonServiceImpl
{
@Resource
private
EntityEnclosureMapper
entityEnclosureMapper
;
@Autowired
private
IEntityEnclosureService
entityEnclosureService
;
/**
* 生成编号
...
...
@@ -25,7 +38,61 @@ public class CommonServiceImpl {
String
tailNo
=
counts
==
0
?
"00"
+
nextNo:
(
counts
<
10
?
"00"
+
nextNo:
(
counts
<
100
?
"0"
+
nextNo:
String
.
valueOf
(
nextNo
)));
String
applyNo
=
prefix
+
date
+
tailNo
;
return
applyNo
;
}
/**
* 保存附件信息
* @param entityType 实体类型(0:用户(头像),1:合同附件,3设备校核附件,4标样材料)
* @param entityId 关联实体类id
* @param enclosureQueryList 上传的附件列表
*/
public
Boolean
saveEntityEnclosure
(
Integer
entityType
,
Integer
entityId
,
List
<
EnclosureQuery
>
enclosureQueryList
){
Boolean
ref
=
false
;
QueryWrapper
<
EntityEnclosure
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"entity_type"
,
entityType
);
wrapper
.
eq
(
"entity_id"
,
entityId
);
List
<
EntityEnclosure
>
entityEnclosureList
=
entityEnclosureMapper
.
selectList
(
wrapper
);
if
(
entityEnclosureList
!=
null
&&
entityEnclosureList
.
size
()>
0
){
for
(
EntityEnclosure
eeOld
:
entityEnclosureList
){
eeOld
.
setIsDeleted
(
0
);
entityEnclosureMapper
.
updateById
(
eeOld
);
}
}
if
(
enclosureQueryList
!=
null
&&
enclosureQueryList
.
size
()>
0
){
List
<
EntityEnclosure
>
eeList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
enclosureQueryList
.
size
();
i
++){
EnclosureQuery
enclosureDto
=
enclosureQueryList
.
get
(
i
);
EntityEnclosure
ee
=
new
EntityEnclosure
();
ee
.
setEntityId
(
entityId
);
ee
.
setEntityType
(
entityType
);
ee
.
setEnclosureUrl
(
enclosureDto
.
getEnclosureUrl
());
ee
.
setCreateTime
(
LocalDateTime
.
now
());
ee
.
setUpdateTime
(
ee
.
getCreateTime
());
ee
.
setIsDeleted
(
1
);
ee
.
setAlias
(
enclosureDto
.
getAlias
());
ee
.
setExtName
(
enclosureDto
.
getExtName
());
eeList
.
add
(
ee
);
}
entityEnclosureService
.
saveBatch
(
eeList
);
}
ref
=
true
;
return
ref
;
}
/**
* 根据实体类型 和实体类id获取附件列表
* @param entityType 实体类型(0:用户(头像),1:合同附件,3设备校核附件,4标样材料)
* @param entityId 关联实体类id
* @return
*/
public
List
<
EntityEnclosure
>
getEnclosureList
(
Integer
entityType
,
Integer
entityId
){
QueryWrapper
<
EntityEnclosure
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"entity_type"
,
entityType
);
wrapper
.
eq
(
"entity_id"
,
entityId
);
List
<
EntityEnclosure
>
entityEnclosureList
=
entityEnclosureMapper
.
selectList
(
wrapper
);
return
entityEnclosureList
;
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntityEnclosureServiceImpl.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EntityEnclosure
;
import
cn.wise.sc.cement.business.mapper.EntityEnclosureMapper
;
import
cn.wise.sc.cement.business.service.IEntityEnclosureService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2020-09-02
*/
@Service
public
class
EntityEnclosureServiceImpl
extends
ServiceImpl
<
EntityEnclosureMapper
,
EntityEnclosure
>
implements
IEntityEnclosureService
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
90f21ac0
...
...
@@ -23,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
import
sun.print.BackgroundServiceLookup
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.*
;
...
...
@@ -65,6 +66,10 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
private
ISampleCheckService
sampleCheckService
;
@Autowired
private
ISampleCheckTeamService
sampleCheckTeamService
;
@Autowired
private
IEquipmentUseService
equipmentUseService
;
@Resource
private
ProjectMapper
projectMapper
;
/**
* 委托分页
...
...
@@ -186,13 +191,17 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
BeanUtils
.
copyProperties
(
sample
,
sampleVo
);
String
teamIds
=
sample
.
getTeamIds
();
String
teamName
=
""
;
List
<
SampleDistributionTeamVo
>
sampleNoDistributionTeamVoList
=
new
ArrayList
<>();
if
(
teamIds
!=
null
){
String
[]
teamIdS
=
teamIds
.
split
(
"、"
);
for
(
String
teamId
:
teamIdS
){
Team
team
=
teamMapper
.
selectById
(
Integer
.
valueOf
(
teamId
));
if
(
team
!=
null
){
team
.
getName
();
teamName
=
teamName
.
equals
(
""
)?
team
.
getName
():(
teamName
+
"、"
+
team
.
getName
());
SampleDistributionTeamVo
distributionTeamVo
=
new
SampleDistributionTeamVo
();
distributionTeamVo
.
setTeamId
(
team
.
getId
());
distributionTeamVo
.
setTeamName
(
team
.
getName
());
sampleNoDistributionTeamVoList
.
add
(
distributionTeamVo
);
}
}
}
...
...
@@ -201,7 +210,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
distributionMapper
.
getDistributionTeamList
(
sample
.
getId
());
if
(
sampleDistributionTeamVoList
!=
null
&&
sampleDistributionTeamVoList
.
size
()>
0
)
{
sampleVo
.
setSampleDistributionTeamVoList
(
sampleDistributionTeamVoList
);
}
else
{
sampleVo
.
setSampleDistributionTeamVoList
(
sampleNoDistributionTeamVoList
);
}
sampleVoList
.
add
(
sampleVo
);
}
...
...
@@ -587,6 +597,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
return
BaseResponse
.
okMsg
(
"已完成检测项目任务"
);
}
/**
* 数据校核
* @param query
...
...
@@ -609,8 +620,13 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(
loginUser
==
null
){
return
BaseResponse
.
errorMsg
(
"请登录用户"
);
}
Project
project
=
projectMapper
.
selectById
(
entrust
.
getProjectId
());
if
(
project
==
null
||
entrust
.
getProjectId
()
==
null
){
return
BaseResponse
.
errorMsg
(
"项目信息有误"
);
}
if
(
query
.
getSampleCheckQueryList
()
!=
null
&&
query
.
getSampleCheckQueryList
().
size
()>
0
){
List
<
SampleCheckQuery
>
sampleCheckQueryList
=
query
.
getSampleCheckQueryList
();
List
<
EquipmentUse
>
useList
=
new
ArrayList
<>();
for
(
SampleCheckQuery
checkQuery
:
sampleCheckQueryList
){
if
(
checkQuery
==
null
||
checkQuery
.
getSampleId
()
==
null
){
return
BaseResponse
.
errorMsg
(
"样品信息错误"
);
...
...
@@ -628,6 +644,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setEquipmentName
(
checkQuery
.
getEquipmentName
())
.
setCreateTime
(
LocalDateTime
.
now
());
sampleCheckService
.
save
(
check
);
String
testItems
=
""
;
if
(
checkQuery
.
getSampleCheckTeamQueryList
()
!=
null
&&
checkQuery
.
getSampleCheckTeamQueryList
().
size
()>
0
){
List
<
SampleCheckTeam
>
sampleCheckTeamList
=
new
ArrayList
<>();
List
<
SampleCheckTeamQuery
>
sampleCheckTeamQueryList
=
checkQuery
.
getSampleCheckTeamQueryList
();
...
...
@@ -652,10 +669,26 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setCreateTime
(
LocalDateTime
.
now
())
.
setRemark
(
checkTeamQuery
.
getRemark
());
sampleCheckTeamList
.
add
(
sampleCheckTeam
);
testItems
=
testItems
.
equals
(
""
)?
sampleCheckTeam
.
getTestItem
():
testItems
+
"、"
+
sampleCheckTeam
.
getTestItem
();
}
sampleCheckTeamService
.
saveBatch
(
sampleCheckTeamList
);
}
//添加设备使用记录 设备使用记录表 equipment_use
EquipmentUse
equipmentUse
=
new
EquipmentUse
();
equipmentUse
.
setEquipmentId
(
check
.
getEquipmentId
())
.
setUserId
(
check
.
getUserId
())
.
setUserName
(
loginUser
.
getName
())
.
setUseDate
(
LocalDate
.
now
())
.
setProjectId
(
project
.
getId
())
.
setProjectName
(
project
.
getName
())
.
setProjectCode
(
project
.
getCode
())
.
setTestItem
(
testItems
)
.
setCreateTime
(
LocalDateTime
.
now
())
.
setRemark
(
"委托派发-数据校核"
);
useList
.
add
(
equipmentUse
);
}
equipmentUseService
.
saveBatch
(
useList
);
}
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"数据校核"
,
null
);
return
BaseResponse
.
okMsg
(
"数据校核完成"
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EquipmentScrapServiceImpl.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EquipmentScrap
;
import
cn.wise.sc.cement.business.mapper.EquipmentScrapMapper
;
import
cn.wise.sc.cement.business.service.IEquipmentScrapService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Service
public
class
EquipmentScrapServiceImpl
extends
ServiceImpl
<
EquipmentScrapMapper
,
EquipmentScrap
>
implements
IEquipmentScrapService
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EquipmentServiceImpl.java
0 → 100644
View file @
90f21ac0
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EquipmentTestServiceImpl.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EquipmentTest
;
import
cn.wise.sc.cement.business.mapper.EquipmentTestMapper
;
import
cn.wise.sc.cement.business.service.IEquipmentTestService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Service
public
class
EquipmentTestServiceImpl
extends
ServiceImpl
<
EquipmentTestMapper
,
EquipmentTest
>
implements
IEquipmentTestService
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EquipmentTroubleshootingServiceImpl.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EquipmentTroubleshooting
;
import
cn.wise.sc.cement.business.mapper.EquipmentTroubleshootingMapper
;
import
cn.wise.sc.cement.business.service.IEquipmentTroubleshootingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Service
public
class
EquipmentTroubleshootingServiceImpl
extends
ServiceImpl
<
EquipmentTroubleshootingMapper
,
EquipmentTroubleshooting
>
implements
IEquipmentTroubleshootingService
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EquipmentUseServiceImpl.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EquipmentUse
;
import
cn.wise.sc.cement.business.mapper.EquipmentUseMapper
;
import
cn.wise.sc.cement.business.service.IEquipmentUseService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Service
public
class
EquipmentUseServiceImpl
extends
ServiceImpl
<
EquipmentUseMapper
,
EquipmentUse
>
implements
IEquipmentUseService
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/SupplierServiceImpl.java
0 → 100644
View file @
90f21ac0
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.Supplier
;
import
cn.wise.sc.cement.business.entity.SysPost
;
import
cn.wise.sc.cement.business.mapper.SupplierMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.PostQuery
;
import
cn.wise.sc.cement.business.model.query.SupplierQuery
;
import
cn.wise.sc.cement.business.service.ISupplierService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
jdk.nashorn.internal.ir.annotations.Reference
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2020-09-01
*/
@Service
public
class
SupplierServiceImpl
extends
ServiceImpl
<
SupplierMapper
,
Supplier
>
implements
ISupplierService
{
@Resource
private
SupplierMapper
supplierMapper
;
/**
* 获取分页
* @param pageQuery
* @param name
* @return
*/
@Override
public
BaseResponse
<
IPage
<
Supplier
>>
getPage
(
PageQuery
pageQuery
,
String
name
)
{
QueryWrapper
<
Supplier
>
qw
=
new
QueryWrapper
<>();
if
(
StringUtils
.
isNotEmpty
(
name
)){
qw
.
like
(
"name"
,
name
);
}
qw
.
orderByDesc
(
"create_time"
);
IPage
<
Supplier
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
page
=
supplierMapper
.
selectPage
(
page
,
qw
);
return
BaseResponse
.
okData
(
page
);
}
/**
* 新增供应商
* @param query
* @return
*/
@Override
@Transactional
public
BaseResponse
<
Supplier
>
create
(
SupplierQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getName
()))
{
return
BaseResponse
.
errorMsg
(
"供应商名称不能为空!"
);
}
QueryWrapper
<
Supplier
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"name"
,
query
.
getName
());
int
count
=
supplierMapper
.
selectCount
(
qw
);
if
(
count
>
0
)
{
return
BaseResponse
.
errorMsg
(
query
.
getName
()
+
"已存在"
);
}
Supplier
supplier
=
new
Supplier
();
BeanUtils
.
copyProperties
(
query
,
supplier
);
supplier
.
setCreateTime
(
LocalDateTime
.
now
());
supplierMapper
.
insert
(
supplier
);
return
BaseResponse
.
okData
(
supplier
);
}
/**
* 修改供应商
* @param query
* @return
*/
@Override
public
BaseResponse
<
Supplier
>
update
(
SupplierQuery
query
)
{
if
(
StringUtils
.
isEmpty
(
query
.
getName
()))
{
return
BaseResponse
.
errorMsg
(
"供应商名称不能为空!"
);
}
QueryWrapper
<
Supplier
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"name"
,
query
.
getName
());
qw
.
ne
(
"id"
,
query
.
getId
());
int
count
=
supplierMapper
.
selectCount
(
qw
);
if
(
count
>
0
)
{
return
BaseResponse
.
errorMsg
(
query
.
getName
()
+
"已存在"
);
}
Supplier
supplier
=
new
Supplier
();
BeanUtils
.
copyProperties
(
query
,
supplier
);
supplierMapper
.
updateById
(
supplier
);
return
BaseResponse
.
okData
(
supplier
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/TeamServiceImpl.java
View file @
90f21ac0
...
...
@@ -45,6 +45,14 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT
@Resource
private
TeamMapper
teamMapper
;
/**
* 分页查询
* @param pageQuery
* @param status
* @param groupName
* @param name
* @return
*/
@Override
public
BaseResponse
<
IPage
<
TeamVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
status
,
String
groupName
,
String
name
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
cement-business/src/main/resources/application.yml
View file @
90f21ac0
...
...
@@ -8,7 +8,7 @@ spring:
active
:
dev
datasource
:
#admin!@#123
url
:
jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=
UTC
&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=
Asia/Shanghai
&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username
:
root
password
:
admin!@#123
driverClassName
:
com.mysql.jdbc.Driver
...
...
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