Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_platformV2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb_platformV2
Commits
a0d51399
Commit
a0d51399
authored
Jul 29, 2023
by
赵剑炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改基础信息方法
parent
3f93ff52
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
246 行增加
和
438 行删除
+246
-438
EquipmentSizeDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EquipmentSizeDto.java
+62
-0
SupplierDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/SupplierDto.java
+65
-0
QueryEquipmentSizeReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QueryEquipmentSizeReq.java
+1
-9
QuerySupplierReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QuerySupplierReq.java
+1
-20
UpdateEquipmentSizeReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateEquipmentSizeReq.java
+28
-0
UpdateSupplierReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateSupplierReq.java
+26
-0
EquipmentSizeController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/EquipmentSizeController.java
+11
-14
PubOrgController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PubOrgController.java
+0
-18
SupplierController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/SupplierController.java
+14
-18
EquipmentSize.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/EquipmentSize.java
+1
-4
EquipmentSizeMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/EquipmentSizeMapper.java
+0
-18
SupplierMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/SupplierMapper.java
+0
-17
EquipmentSizeService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/EquipmentSizeService.java
+9
-24
SupplierService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/SupplierService.java
+8
-8
EquipmentSizeServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentSizeServiceImpl.java
+0
-0
SupplierServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/SupplierServiceImpl.java
+20
-161
EquipmentSizeMapper.xml
jyzb-biz/src/main/resources/mapper/EquipmentSizeMapper.xml
+0
-53
SupplierMapper.xml
jyzb-biz/src/main/resources/mapper/SupplierMapper.xml
+0
-74
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/EquipmentSizeDto.java
0 → 100644
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
api
.
bean
.
dto
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
public
class
EquipmentSizeDto
{
/**
* 装备号型ID
*/
private
String
id
;
/**
* 装备类型ID
*/
private
String
typeId
;
/**
* 号型码
*/
private
String
code
;
/**
* 号型名称
*/
private
String
name
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 备注
*/
private
String
note
;
/**
* 价格
*/
private
BigDecimal
price
;
/**
* 当前状态:0关闭/1启用
*/
private
Integer
state
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/SupplierDto.java
0 → 100644
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
api
.
bean
.
dto
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
SupplierDto
{
/**
* 供应商ID
*/
private
String
id
;
/**
* 供应商名称
*/
private
String
name
;
/**
* 供应商短码
*/
private
String
code
;
/**
* 简称
*/
private
String
shortName
;
/**
* 联系人
*/
private
String
contacts
;
/**
* 联系电话
*/
private
String
phone
;
private
Date
createTime
;
private
Date
updateTime
;
/**
* 创建人员
*/
private
String
createUser
;
/**
* 更新人ID
*/
private
String
updateUser
;
/**
* 1为启用,0为禁用
*/
private
Integer
state
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/EquipmentSizeReq.java
→
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/
Query
EquipmentSizeReq.java
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
api
.
bean
.
query
;
package
com
.
junmp
.
jyzb
.
api
.
bean
.
query
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
EquipmentSizeReq
extends
BaseRequest
{
public
class
Query
EquipmentSizeReq
extends
BaseRequest
{
@NotNull
(
message
=
"装备号型主键不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
@NotNull
(
message
=
"装备号型主键不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
private
String
id
;
private
String
id
;
...
@@ -31,6 +25,4 @@ public class EquipmentSizeReq extends BaseRequest {
...
@@ -31,6 +25,4 @@ public class EquipmentSizeReq extends BaseRequest {
private
BigDecimal
price
;
private
BigDecimal
price
;
private
Integer
state
;
private
Integer
state
;
private
Integer
epcType
;
}
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/SupplierReq.java
→
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/
Query
SupplierReq.java
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
api
.
bean
.
query
;
package
com
.
junmp
.
jyzb
.
api
.
bean
.
query
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
...
@@ -12,10 +10,7 @@ import java.util.List;
...
@@ -12,10 +10,7 @@ import java.util.List;
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
SupplierReq
extends
BaseRequest
{
public
class
QuerySupplierReq
extends
BaseRequest
{
@NotNull
(
message
=
"供应商主键不能为空"
,
groups
=
{
edit
.
class
,
delete
.
class
,
detail
.
class
})
private
String
id
;
private
String
name
;
private
String
name
;
...
@@ -23,19 +18,5 @@ public class SupplierReq extends BaseRequest {
...
@@ -23,19 +18,5 @@ public class SupplierReq extends BaseRequest {
private
String
shortName
;
private
String
shortName
;
private
String
contacts
;
private
String
phone
;
private
Date
createTime
;
private
String
createUser
;
private
Date
updateTime
;
private
String
updateUser
;
private
Integer
state
;
private
Integer
state
;
private
List
<
String
>
supplierList
;
}
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateEquipmentSizeReq.java
0 → 100644
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
api
.
bean
.
req
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Data
public
class
UpdateEquipmentSizeReq
{
@NotBlank
(
message
=
"装备号型主键不能为空"
,
groups
=
{
ValidationApi
.
edit
.
class
,
ValidationApi
.
delete
.
class
,
ValidationApi
.
detail
.
class
})
private
String
id
;
private
String
typeId
;
private
String
code
;
private
String
name
;
private
String
note
;
private
BigDecimal
price
;
@NotBlank
(
message
=
"状态值不能为空"
,
groups
=
{
ValidationApi
.
edit
.
class
})
private
Integer
state
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateSupplierReq.java
0 → 100644
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
api
.
bean
.
req
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
UpdateSupplierReq
{
@NotBlank
(
message
=
"供应商主键不能为空"
,
groups
=
{
ValidationApi
.
edit
.
class
,
ValidationApi
.
delete
.
class
,
ValidationApi
.
detail
.
class
})
private
String
id
;
private
String
name
;
private
String
code
;
private
String
shortName
;
private
String
contacts
;
private
String
phone
;
@NotBlank
(
message
=
"状态不能为空"
,
groups
=
{
ValidationApi
.
updateStatus
.
class
})
private
Integer
state
;
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/EquipmentSizeController.java
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
controller
;
package
com
.
junmp
.
jyzb
.
controller
;
import
com.junmp.jyzb.api.bean.query.EquipmentSizeReq
;
import
com.junmp.jyzb.api.bean.dto.EquipmentSizeDto
;
import
com.junmp.jyzb.api.bean.query.QueryEquipmentSizeReq
;
import
com.junmp.jyzb.api.bean.req.UpdateEquipmentSizeReq
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
com.junmp.jyzb.service.EquipmentSizeService
;
import
com.junmp.jyzb.service.EquipmentSizeService
;
import
com.junmp.
jyzb.utils.ResponseResult
;
import
com.junmp.
v2.common.bean.request.ValidationApi
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -27,13 +29,13 @@ public class EquipmentSizeController {
...
@@ -27,13 +29,13 @@ public class EquipmentSizeController {
@PostMapping
(
"/AddSize"
)
@PostMapping
(
"/AddSize"
)
@ApiOperation
(
"添加号型信息"
)
@ApiOperation
(
"添加号型信息"
)
public
ApiRes
<
Boolean
>
addSize
(
@RequestBody
@Validated
(
EquipmentSizeReq
.
add
.
class
)
EquipmentSizeReq
req
)
{
public
ApiRes
<
Boolean
>
addSize
(
@RequestBody
@Validated
(
ValidationApi
.
add
.
class
)
Update
EquipmentSizeReq
req
)
{
return
ApiRes
.
success
(
equipmentSizeService
.
addSize
(
req
));
return
ApiRes
.
success
(
equipmentSizeService
.
addSize
(
req
));
}
}
@PostMapping
(
"/DeleteSize"
)
@PostMapping
(
"/DeleteSize"
)
@ApiOperation
(
"删除号型信息"
)
@ApiOperation
(
"删除号型信息"
)
public
ApiRes
<
Boolean
>
deleteSize
(
@RequestBody
@Validated
(
EquipmentSizeReq
.
delete
.
class
)
EquipmentSizeReq
req
)
{
public
ApiRes
<
Boolean
>
deleteSize
(
@RequestBody
@Validated
(
ValidationApi
.
delete
.
class
)
Update
EquipmentSizeReq
req
)
{
// ResponseResult returnMsg = equipmentSizeService.deleteSize(msg);
// ResponseResult returnMsg = equipmentSizeService.deleteSize(msg);
// return returnMsg;
// return returnMsg;
return
ApiRes
.
success
(
equipmentSizeService
.
deleteSize
(
req
));
return
ApiRes
.
success
(
equipmentSizeService
.
deleteSize
(
req
));
...
@@ -41,33 +43,28 @@ public class EquipmentSizeController {
...
@@ -41,33 +43,28 @@ public class EquipmentSizeController {
@PostMapping
(
"/GetOneSize"
)
@PostMapping
(
"/GetOneSize"
)
@ApiOperation
(
"查询单个号型信息"
)
@ApiOperation
(
"查询单个号型信息"
)
public
ApiRes
<
EquipmentSize
>
getOneSize
(
@RequestBody
EquipmentSizeReq
req
)
{
public
ApiRes
<
EquipmentSize
>
getOneSize
(
@RequestBody
Query
EquipmentSizeReq
req
)
{
//ResponseResult returnMsg =
//ResponseResult returnMsg =
return
ApiRes
.
success
(
equipmentSizeService
.
getOneSize
(
req
));
return
ApiRes
.
success
(
equipmentSizeService
.
getOneSize
(
req
));
}
}
@PostMapping
(
"/ShowSize"
)
@PostMapping
(
"/ShowSize"
)
@ApiOperation
(
"根据装备类型查询号型"
)
@ApiOperation
(
"根据装备类型查询号型"
)
public
ApiRes
<
List
<
EquipmentSize
>>
getAllSize
(
@RequestBody
EquipmentSizeReq
req
){
public
ApiRes
<
List
<
EquipmentSize
Dto
>>
getAllSize
(
@RequestBody
Query
EquipmentSizeReq
req
){
return
ApiRes
.
success
(
equipmentSizeService
.
getAllSize
(
req
));
return
ApiRes
.
success
(
equipmentSizeService
.
getAllSize
(
req
));
}
}
@PostMapping
(
"/UpdateSize"
)
@PostMapping
(
"/UpdateSize"
)
@ApiOperation
(
"修改号型信息"
)
@ApiOperation
(
"修改号型信息"
)
public
ApiRes
<
Boolean
>
updateSize
(
@RequestBody
@Validated
(
EquipmentSizeReq
.
edit
.
class
)
EquipmentSizeReq
req
)
{
public
ApiRes
<
Boolean
>
updateSize
(
@RequestBody
@Validated
(
ValidationApi
.
edit
.
class
)
Update
EquipmentSizeReq
req
)
{
return
ApiRes
.
success
(
equipmentSizeService
.
updateSize
(
req
));
return
ApiRes
.
success
(
equipmentSizeService
.
updateSize
(
req
));
}
}
@PostMapping
(
"/ChangeSizeState"
)
@PostMapping
(
"/ChangeSizeState"
)
@ApiOperation
(
"禁用/启用装备号型"
)
@ApiOperation
(
"禁用/启用装备号型"
)
public
ApiRes
<
Boolean
>
changeSizeState
(
@RequestBody
@Validated
(
EquipmentSizeReq
.
edit
.
class
)
EquipmentSizeReq
req
)
{
public
ApiRes
<
Boolean
>
changeSizeState
(
@RequestBody
@Validated
(
ValidationApi
.
edit
.
class
)
Update
EquipmentSizeReq
req
)
{
return
ApiRes
.
success
(
equipmentSizeService
.
changeSizeState
(
req
));
return
ApiRes
.
success
(
equipmentSizeService
.
changeSizeState
(
req
));
}
}
@PostMapping
(
"/GetSizeDevelop"
)
@ApiOperation
(
"获取号型表所有信息(非树表)"
)
public
ApiRes
<
EquipmentSize
>
getSizeDevelop
()
{
ResponseResult
returnMsg
=
equipmentSizeService
.
getSizeDevelop
();
return
null
;
}
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/PubOrgController.java
View file @
a0d51399
...
@@ -26,27 +26,9 @@ public class PubOrgController {
...
@@ -26,27 +26,9 @@ public class PubOrgController {
@PostMapping
(
"/ShowPubOrgList"
)
@PostMapping
(
"/ShowPubOrgList"
)
@ApiOperation
(
"查询组织机构列表_简化版"
)
@ApiOperation
(
"查询组织机构列表_简化版"
)
public
ApiRes
<
List
<
Map
<
String
,
Object
>>>
ShowEquipmentList
(
@RequestBody
Map
<
String
,
Object
>
orgId
)
{
public
ApiRes
<
List
<
Map
<
String
,
Object
>>>
ShowEquipmentList
(
@RequestBody
Map
<
String
,
Object
>
orgId
)
{
//传入当前的组织机构id,展示所有本级及下级的
//ResponseResult returnMsg = pubOrgService.showPubOrgList(orgId);
return
ApiRes
.
success
(
pubOrgService
.
showPubOrgList
(
orgId
));
return
ApiRes
.
success
(
pubOrgService
.
showPubOrgList
(
orgId
));
}
}
// @PostMapping("/ChangeOrgState")
// @ApiOperation("改变组织机构状态信息")
// public ResponseResult changeOrgState(@RequestBody OrgUpdateReq req) {
// //传入当前的组织机构id,展示所有本级及下级的
// ResponseResult returnMsg = pubOrgService.changeOrgState(msg);
// return returnMsg;
// }
// @PostMapping("/ShowAllPubOrgList")
// @ApiOperation("查询组织机构列表(含禁用)")
// public ResponseResult showAllPubOrgList(@RequestBody Map<String, Object> orgId) {
// //传入当前的组织机构id,展示所有本级及下级的
// ResponseResult returnMsg = pubOrgService.showAllPubOrgList(orgId);
// return returnMsg;
// }
@PostMapping
(
"/ShowPubOrgListOld"
)
@PostMapping
(
"/ShowPubOrgListOld"
)
@ApiOperation
(
"查询组织机构列表_完整版"
)
@ApiOperation
(
"查询组织机构列表_完整版"
)
public
ResponseResult
showPubOrgListOld
(
@RequestBody
Map
<
String
,
Object
>
orgId
)
{
public
ResponseResult
showPubOrgListOld
(
@RequestBody
Map
<
String
,
Object
>
orgId
)
{
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/SupplierController.java
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
controller
;
package
com
.
junmp
.
jyzb
.
controller
;
import
com.junmp.jyzb.api.bean.query.SupplierReq
;
import
com.junmp.jyzb.api.bean.dto.SupplierDto
;
import
com.junmp.jyzb.api.bean.query.QuerySupplierReq
;
import
com.junmp.jyzb.api.bean.req.UpdateSupplierReq
;
import
com.junmp.jyzb.entity.Supplier
;
import
com.junmp.jyzb.entity.Supplier
;
import
com.junmp.jyzb.service.SupplierService
;
import
com.junmp.jyzb.service.SupplierService
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -26,39 +29,32 @@ public class SupplierController {
...
@@ -26,39 +29,32 @@ public class SupplierController {
@PostMapping
(
"/AddSupplier"
)
@PostMapping
(
"/AddSupplier"
)
@ApiOperation
(
"添加供应商"
)
@ApiOperation
(
"添加供应商"
)
public
ApiRes
<
Boolean
>
addSupplier
(
@RequestBody
@Validated
(
SupplierReq
.
add
.
class
)
SupplierReq
req
)
{
public
ApiRes
<
Boolean
>
AddSupplier
(
@RequestBody
@Validated
(
ValidationApi
.
add
.
class
)
Update
SupplierReq
req
)
{
return
ApiRes
.
success
(
supplierService
.
a
ddSupplier
(
req
));
return
ApiRes
.
success
(
supplierService
.
A
ddSupplier
(
req
));
}
}
@PostMapping
(
"/DeleteSupplier"
)
@PostMapping
(
"/DeleteSupplier"
)
@ApiOperation
(
"删除供应商信息"
)
@ApiOperation
(
"删除供应商信息"
)
public
ApiRes
<
Boolean
>
deleteSupplier
(
@RequestBody
@Validated
(
SupplierReq
.
delete
.
class
)
SupplierReq
req
)
{
public
ApiRes
<
Boolean
>
DeleteSupplier
(
@RequestBody
@Validated
(
ValidationApi
.
delete
.
class
)
Update
SupplierReq
req
)
{
return
ApiRes
.
success
(
supplierService
.
d
eleteSupplier
(
req
));
return
ApiRes
.
success
(
supplierService
.
D
eleteSupplier
(
req
));
}
}
@PostMapping
(
"/ShowSupplier"
)
@PostMapping
(
"/ShowSupplier"
)
@ApiOperation
(
"查询供应商列表"
)
@ApiOperation
(
"查询供应商列表"
)
public
ApiRes
<
List
<
Supplier
>>
showSupplier
(
SupplierReq
req
){
public
ApiRes
<
List
<
Supplier
Dto
>>
ShowSupplier
(
Query
SupplierReq
req
){
return
ApiRes
.
success
(
supplierService
.
s
howSupplier
(
req
));
return
ApiRes
.
success
(
supplierService
.
S
howSupplier
(
req
));
}
}
// @PostMapping("/GetOneSupplier")
// @ApiOperation("查询单个供应商信息")
// public ResponseResult getOneSupplier(@RequestBody Map<String, Object> msg) {
// String supplierId = msg.get("supplierId").toString();
// Map<String, Object> supplierMsg = supplierService.getOneSupplier(supplierId);
// return new ResponseResult(HttpStatus.SUCCESS,"操作成功",supplierMsg);
// }
@PostMapping
(
"/UpdateSupplier"
)
@PostMapping
(
"/UpdateSupplier"
)
@ApiOperation
(
"修改供应商信息"
)
@ApiOperation
(
"修改供应商信息"
)
public
ApiRes
<
Boolean
>
updateSupplier
(
@RequestBody
@Validated
(
SupplierReq
.
edit
.
class
)
SupplierReq
req
)
{
public
ApiRes
<
Boolean
>
updateSupplier
(
@RequestBody
@Validated
(
QuerySupplierReq
.
edit
.
class
)
Update
SupplierReq
req
)
{
return
ApiRes
.
success
(
supplierService
.
u
pdateSupplier
(
req
));
return
ApiRes
.
success
(
supplierService
.
U
pdateSupplier
(
req
));
}
}
@PostMapping
(
"/ChangeSupplierState"
)
@PostMapping
(
"/ChangeSupplierState"
)
@ApiOperation
(
"修改供应商状态"
)
@ApiOperation
(
"修改供应商状态"
)
public
ApiRes
<
Boolean
>
changeSupplierState
(
@RequestBody
@Validated
(
SupplierReq
.
edit
.
class
)
SupplierReq
req
)
{
public
ApiRes
<
Boolean
>
changeSupplierState
(
@RequestBody
@Validated
(
QuerySupplierReq
.
edit
.
class
)
Update
SupplierReq
req
)
{
return
ApiRes
.
success
(
supplierService
.
c
hangeSupplierState
(
req
));
return
ApiRes
.
success
(
supplierService
.
C
hangeSupplierState
(
req
));
}
}
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/entity/EquipmentSize.java
View file @
a0d51399
...
@@ -20,13 +20,12 @@ public class EquipmentSize implements Serializable {
...
@@ -20,13 +20,12 @@ public class EquipmentSize implements Serializable {
* 装备号型ID
* 装备号型ID
*/
*/
@ApiModelProperty
(
value
=
"装备号型ID"
)
@ApiModelProperty
(
value
=
"装备号型ID"
)
@Table
Id
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_UUID
)
@Table
Field
(
"id"
)
private
String
id
;
private
String
id
;
/**
/**
* 装备类型ID
* 装备类型ID
*/
*/
@ApiModelProperty
(
value
=
"装备类型ID"
)
@TableField
(
"type_id"
)
@TableField
(
"type_id"
)
private
String
typeId
;
private
String
typeId
;
...
@@ -34,13 +33,11 @@ public class EquipmentSize implements Serializable {
...
@@ -34,13 +33,11 @@ public class EquipmentSize implements Serializable {
/**
/**
* 号型码
* 号型码
*/
*/
@ApiModelProperty
(
value
=
"号型码"
)
private
String
code
;
private
String
code
;
/**
/**
* 号型名称
* 号型名称
*/
*/
@ApiModelProperty
(
value
=
"号型名称"
)
private
String
name
;
private
String
name
;
/**
/**
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/EquipmentSizeMapper.java
View file @
a0d51399
...
@@ -10,21 +10,4 @@ import java.util.Map;
...
@@ -10,21 +10,4 @@ import java.util.Map;
@Mapper
@Mapper
public
interface
EquipmentSizeMapper
extends
BaseMapper
<
EquipmentSize
>
{
public
interface
EquipmentSizeMapper
extends
BaseMapper
<
EquipmentSize
>
{
public
int
addSize
(
EquipmentSize
size
);
Map
<
String
,
Object
>
getOneSize
(
String
id
);
void
deleteSize
(
String
id
);
void
updateSize
(
EquipmentSize
size
);
List
<
String
>
getAllSizeId
(
String
orgId
);
void
changeSizeState
(
EquipmentSize
size
);
List
<
String
>
getSizeByCode
(
String
code
);
//String getCodeById(String id);
List
<
Map
<
String
,
Object
>>
getSizeDevelop
();
}
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/SupplierMapper.java
View file @
a0d51399
...
@@ -12,20 +12,4 @@ import java.util.Map;
...
@@ -12,20 +12,4 @@ import java.util.Map;
@Mapper
@Mapper
public
interface
SupplierMapper
extends
BaseMapper
<
Supplier
>
{
public
interface
SupplierMapper
extends
BaseMapper
<
Supplier
>
{
public
int
addSupplier
(
Supplier
supplier
);
// Map<String, Object> getOneSupplier(String id,Object SelectName,Object SelectCode);
Map
<
String
,
Object
>
getOneSupplier
(
@Param
(
"code"
)
String
code
,
@Param
(
"SelectName"
)
Object
SelectName
,
@Param
(
"SelectCode"
)
Object
SelectCode
);
//Map<String, Object> getOneSupplier(@Param("id") String id);
void
deleteSupplier
(
String
id
);
void
updateSupplier
(
Supplier
supplier
);
List
<
String
>
getAllSupplierId
();
void
changeSupplierState
(
Supplier
supplier
);
List
<
Map
<
String
,
Object
>>
getAllSupplier
(
@Param
(
"name"
)
String
name
,
@Param
(
"shortName"
)
String
shortName
);
}
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/service/EquipmentSizeService.java
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
service
;
package
com
.
junmp
.
jyzb
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.api.bean.query.EquipmentSizeReq
;
import
com.junmp.jyzb.api.bean.dto.EquipmentSizeDto
;
import
com.junmp.jyzb.api.bean.query.QueryEquipmentSizeReq
;
import
com.junmp.jyzb.api.bean.req.UpdateEquipmentSizeReq
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
com.junmp.jyzb.utils.ResponseResult
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
public
interface
EquipmentSizeService
extends
IService
<
EquipmentSize
>
{
public
interface
EquipmentSizeService
extends
IService
<
EquipmentSize
>
{
boolean
addSize
(
EquipmentSizeReq
req
);
Boolean
addSize
(
Update
EquipmentSizeReq
req
);
EquipmentSize
getOneSize
(
EquipmentSizeReq
req
);
EquipmentSize
getOneSize
(
Query
EquipmentSizeReq
req
);
boolean
deleteSize
(
EquipmentSizeReq
req
);
Boolean
deleteSize
(
Update
EquipmentSizeReq
req
);
boolean
updateSize
(
EquipmentSizeReq
req
);
Boolean
updateSize
(
Update
EquipmentSizeReq
req
);
ResponseResult
addSize
(
Map
<
String
,
Object
>
msg
);
Boolean
changeSizeState
(
UpdateEquipmentSizeReq
req
);
ResponseResult
getOneSize
(
Map
<
String
,
Object
>
msg
);
List
<
EquipmentSizeDto
>
getAllSize
(
QueryEquipmentSizeReq
req
);
ResponseResult
deleteSize
(
Map
<
String
,
Object
>
msg
);
ResponseResult
updateSize
(
Map
<
String
,
Object
>
msg
);
List
<
String
>
getAllSizeId
(
Map
<
String
,
Object
>
orgId
);
boolean
changeSizeState
(
EquipmentSizeReq
req
);
List
<
EquipmentSize
>
getAllSize
(
EquipmentSizeReq
req
);
ResponseResult
changeSizeState
(
Map
<
String
,
Object
>
msg
);
ResponseResult
getAllSize
(
Map
<
String
,
Object
>
msg
);
ResponseResult
getSizeDevelop
();
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/SupplierService.java
View file @
a0d51399
package
com
.
junmp
.
jyzb
.
service
;
package
com
.
junmp
.
jyzb
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.jyzb.api.bean.query.SupplierReq
;
import
com.junmp.jyzb.api.bean.dto.SupplierDto
;
import
com.junmp.jyzb.api.bean.query.QuerySupplierReq
;
import
com.junmp.jyzb.api.bean.req.UpdateSupplierReq
;
import
com.junmp.jyzb.entity.Supplier
;
import
com.junmp.jyzb.entity.Supplier
;
import
java.util.List
;
import
java.util.List
;
...
@@ -12,7 +14,7 @@ public interface SupplierService extends IService<Supplier> {
...
@@ -12,7 +14,7 @@ public interface SupplierService extends IService<Supplier> {
*
*
* @param req
* @param req
*/
*/
boolean
addSupplier
(
SupplierReq
req
);
boolean
AddSupplier
(
Update
SupplierReq
req
);
/**
/**
* @Author: Zhaojw
* @Author: Zhaojw
...
@@ -28,28 +30,26 @@ public interface SupplierService extends IService<Supplier> {
...
@@ -28,28 +30,26 @@ public interface SupplierService extends IService<Supplier> {
*
*
* @param req
* @param req
*/
*/
boolean
deleteSupplier
(
SupplierReq
req
);
boolean
DeleteSupplier
(
Update
SupplierReq
req
);
/**
/**
* 编辑
* 编辑
*
*
* @param req
* @param req
*/
*/
boolean
updateSupplier
(
SupplierReq
req
);
boolean
UpdateSupplier
(
UpdateSupplierReq
req
);
List
<
String
>
getAllSupplierId
();
/**
/**
* 列表信息
* 列表信息
*
*
* @param req
* @param req
*/
*/
List
<
Supplier
>
showSupplier
(
SupplierReq
req
);
List
<
Supplier
Dto
>
ShowSupplier
(
Query
SupplierReq
req
);
/**
/**
* 更改状态
* 更改状态
*
*
* @param req
* @param req
*/
*/
boolean
changeSupplierState
(
SupplierReq
req
);
Boolean
ChangeSupplierState
(
Update
SupplierReq
req
);
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentSizeServiceImpl.java
View file @
a0d51399
差异被折叠。
点击展开。
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/SupplierServiceImpl.java
View file @
a0d51399
...
@@ -3,11 +3,12 @@ package com.junmp.jyzb.service.impl;
...
@@ -3,11 +3,12 @@ package com.junmp.jyzb.service.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.query.SupplierReq
;
import
com.junmp.jyzb.api.bean.dto.SupplierDto
;
import
com.junmp.jyzb.api.bean.query.QuerySupplierReq
;
import
com.junmp.jyzb.api.bean.req.UpdateSupplierReq
;
import
com.junmp.jyzb.api.exception.enums.SupplierExceptionEnum
;
import
com.junmp.jyzb.api.exception.enums.SupplierExceptionEnum
;
import
com.junmp.jyzb.entity.Supplier
;
import
com.junmp.jyzb.entity.Supplier
;
import
com.junmp.jyzb.service.SupplierService
;
import
com.junmp.jyzb.service.SupplierService
;
import
com.junmp.jyzb.utils.*
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -16,94 +17,36 @@ import com.junmp.jyzb.mapper.SupplierMapper;
...
@@ -16,94 +17,36 @@ import com.junmp.jyzb.mapper.SupplierMapper;
import
java.util.*
;
import
java.util.*
;
import
static
com
.
junmp
.
jyzb
.
utils
.
CheckBlank
.
checkNotBlank
;
@Service
@Service
public
class
SupplierServiceImpl
extends
ServiceImpl
<
SupplierMapper
,
Supplier
>
implements
SupplierService
{
public
class
SupplierServiceImpl
extends
ServiceImpl
<
SupplierMapper
,
Supplier
>
implements
SupplierService
{
@Resource
@Resource
private
SupplierMapper
supplierMapper
;
private
SupplierMapper
supplierMapper
;
@Resource
private
RedisUtils
redisUtils
;
private
static
final
String
REDIS_SUPPLIER
=
"Supplier_"
;
@Override
@Override
public
boolean
addSupplier
(
SupplierReq
req
)
{
public
boolean
AddSupplier
(
Update
SupplierReq
req
)
{
Supplier
supplier
=
new
Supplier
();
Supplier
supplier
=
new
Supplier
();
BeanPlusUtil
.
copyProperties
(
req
,
supplier
);
BeanPlusUtil
.
copyProperties
(
req
,
supplier
);
return
this
.
save
(
supplier
);
return
this
.
save
(
supplier
);
}
}
//@Override
public
ResponseResult
addSupplier
(
Map
<
String
,
Object
>
msg
)
{
try
{
checkNotBlank
(
msg
.
get
(
"name"
),
"name不能为空"
);
//checkNotBlank((String) msg.get("shortName"), "shortName不能为空");
checkNotBlank
(
msg
.
get
(
"name"
),
"name不能为空"
);
checkNotBlank
(
msg
.
get
(
"code"
),
"code不能为空"
);
checkNotBlank
(
msg
.
get
(
"contacts"
),
"contacts不能为空"
);
checkNotBlank
(
msg
.
get
(
"phone"
),
"phone不能为空"
);
}
catch
(
IllegalArgumentException
e
)
{
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
}
Supplier
supplier
=
new
Supplier
();
//将警员相关信息添加到警员表
//生成一个uuid
String
uuid
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
//生成当前时间
Date
currentDate
=
DateTimeUtil
.
getCurrentDateTime
();
supplier
.
setId
(
uuid
);
supplier
.
setCreateTime
(
currentDate
);
supplier
.
setUpdateTime
(
currentDate
);
supplier
.
setName
((
String
)
msg
.
get
(
"name"
));
supplier
.
setShortName
((
String
)
msg
.
get
(
"shortName"
));
supplier
.
setCode
((
String
)
msg
.
get
(
"code"
));
supplier
.
setContacts
((
String
)
msg
.
get
(
"contacts"
));
supplier
.
setPhone
((
String
)
msg
.
get
(
"phone"
));
//supplier.setCreateUser((String) msg.get("createUser"));
supplierMapper
.
addSupplier
(
supplier
);
// 将uuid、创建时间、更新时间加入到policeman中
msg
.
put
(
"id"
,
uuid
);
long
timestamp
=
currentDate
.
getTime
();
// 将Date对象转换为long类型的时间戳
//policeman.put("createTime",timestamp);
msg
.
put
(
"updateTime"
,
timestamp
);
/**
* 更新缓存
* */
//构建Redis缓存键
String
redisKey
=
REDIS_SUPPLIER
;
// 从 Redis 中获取数据
List
<
Map
<
String
,
Object
>>
cachedData
=
redisUtils
.
findCachedData
(
redisKey
);
if
(
cachedData
!=
null
)
{
cachedData
.
add
(
0
,
msg
);
//将查询结果存入 Redis 中
redisUtils
.
set
(
redisKey
,
cachedData
);
}
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
ReturnMsg
.
PASS
,
uuid
);
}
@Override
@Override
public
boolean
deleteSupplier
(
SupplierReq
req
)
{
public
boolean
DeleteSupplier
(
Update
SupplierReq
req
)
{
this
.
removeById
(
req
.
getId
());
this
.
removeById
(
req
.
getId
());
return
true
;
return
true
;
}
}
@Override
@Override
public
boolean
updateSupplier
(
SupplierReq
req
)
{
public
boolean
UpdateSupplier
(
Update
SupplierReq
req
)
{
Supplier
supplier
=
this
.
q
uerySupplier
(
req
);
Supplier
supplier
=
this
.
Q
uerySupplier
(
req
);
BeanPlusUtil
.
copyProperties
(
req
,
supplier
);
BeanPlusUtil
.
copyProperties
(
req
,
supplier
);
return
this
.
updateById
(
supplier
);
return
this
.
updateById
(
supplier
);
}
}
private
Supplier
querySupplier
(
SupplierReq
req
)
{
private
Supplier
QuerySupplier
(
Update
SupplierReq
req
)
{
Supplier
app
=
this
.
getById
(
req
.
getId
());
Supplier
app
=
this
.
getById
(
req
.
getId
());
if
(
ObjectUtil
.
isNull
(
app
))
{
if
(
ObjectUtil
.
isNull
(
app
))
{
throw
new
ServiceException
(
SupplierExceptionEnum
.
SUPPLIER_NOT_EXIST
);
throw
new
ServiceException
(
SupplierExceptionEnum
.
SUPPLIER_NOT_EXIST
);
...
@@ -111,50 +54,6 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
...
@@ -111,50 +54,6 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
return
app
;
return
app
;
}
}
//@Override
public
ResponseResult
deleteSupplier
(
Map
<
String
,
Object
>
msg
)
{
try
{
checkNotBlank
(
msg
.
get
(
"supplierList"
),
"supplierList不能为空"
);
}
catch
(
IllegalArgumentException
e
)
{
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
}
List
<
Object
>
supplierList
=
(
List
<
Object
>)
msg
.
get
(
"supplierList"
);
for
(
Object
supplierId:
supplierList
){
supplierMapper
.
deleteSupplier
(
supplierId
.
toString
());
}
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
"操作成功"
);
}
//@Override
public
ResponseResult
updateSupplier
(
Map
<
String
,
Object
>
msg
)
{
try
{
checkNotBlank
(
msg
.
get
(
"id"
),
"id不能为空"
);
//checkNotBlank((String) msg.get("shortName"), "shortName不能为空");
checkNotBlank
(
msg
.
get
(
"name"
),
"name不能为空"
);
checkNotBlank
(
msg
.
get
(
"code"
),
"code不能为空"
);
checkNotBlank
(
msg
.
get
(
"contacts"
),
"contacts不能为空"
);
checkNotBlank
(
msg
.
get
(
"phone"
),
"phone不能为空"
);
}
catch
(
IllegalArgumentException
e
)
{
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
}
Supplier
supplier
=
new
Supplier
();
Date
currentDate
=
DateTimeUtil
.
getCurrentDateTime
();
supplier
.
setUpdateTime
(
currentDate
);
supplier
.
setId
((
String
)
msg
.
get
(
"id"
));
supplier
.
setName
((
String
)
msg
.
get
(
"name"
));
supplier
.
setShortName
((
String
)
msg
.
get
(
"shortName"
));
supplier
.
setCode
((
String
)
msg
.
get
(
"code"
));
supplier
.
setContacts
((
String
)
msg
.
get
(
"contacts"
));
supplier
.
setPhone
((
String
)
msg
.
get
(
"phone"
));
//supplier.setUpdateUser((String) msg.get("updateUser"));
supplierMapper
.
updateSupplier
(
supplier
);
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
ReturnMsg
.
PASS
);
}
public
List
<
String
>
CheckSupplierList
(
List
<
String
>
req
){
public
List
<
String
>
CheckSupplierList
(
List
<
String
>
req
){
LambdaQueryWrapper
<
Supplier
>
wp
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Supplier
>
wp
=
new
LambdaQueryWrapper
<>();
...
@@ -180,69 +79,29 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
...
@@ -180,69 +79,29 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
}
}
@Override
public
List
<
String
>
getAllSupplierId
()
{
List
<
String
>
msg
=
supplierMapper
.
getAllSupplierId
();
return
msg
;
}
@Override
@Override
public
List
<
Supplier
>
showSupplier
(
SupplierReq
req
)
{
public
List
<
SupplierDto
>
ShowSupplier
(
QuerySupplierReq
req
)
{
System
.
out
.
println
(
req
);
LambdaQueryWrapper
<
Supplier
>
wrapper
=
createWrapper
(
req
);
LambdaQueryWrapper
<
Supplier
>
wrapper
=
createWrapper
(
req
);
return
this
.
list
(
wrapper
);
List
<
SupplierDto
>
dto
=
new
ArrayList
<>();
this
.
list
(
wrapper
).
forEach
(
p
->
{
SupplierDto
sd
=
new
SupplierDto
();
BeanPlusUtil
.
copyProperties
(
p
,
sd
);
dto
.
add
(
sd
);
});
return
dto
;
}
}
@Override
@Override
public
boolean
changeSupplierState
(
SupplierReq
req
)
{
public
Boolean
ChangeSupplierState
(
UpdateSupplierReq
req
)
{
Supplier
supplier
=
this
.
querySupplier
(
req
);
Supplier
supplier
=
this
.
QuerySupplier
(
req
);
//获取supplierId 放入到 id中
// supplier.setId(req.getSupplierId());
//supplier.setId(req);
BeanPlusUtil
.
copyProperties
(
req
,
supplier
);
BeanPlusUtil
.
copyProperties
(
req
,
supplier
);
return
this
.
updateById
(
supplier
);
return
this
.
updateById
(
supplier
);
}
}
//@Override
private
LambdaQueryWrapper
<
Supplier
>
createWrapper
(
QuerySupplierReq
req
)
{
public
ResponseResult
getAllSupplier
(
Map
<
String
,
Object
>
msg
)
{
String
name
=
""
;
String
shortName
=
""
;
if
(
msg
.
containsKey
(
"name"
)){
name
=
msg
.
get
(
"name"
).
toString
();
}
else
if
(
msg
.
containsKey
(
"shortName"
)){
shortName
=
msg
.
get
(
"shortName"
).
toString
();
}
List
<
Map
<
String
,
Object
>>
allSupplier
=
new
ArrayList
<>();
//查询所有供应商信息,传入的参数为模糊查询的参数
allSupplier
=
supplierMapper
.
getAllSupplier
(
name
,
shortName
);
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
"操作成功"
,
allSupplier
);
}
//@Override
public
ResponseResult
changeSupplierState
(
Map
<
String
,
Object
>
msg
)
{
try
{
checkNotBlank
(
msg
.
get
(
"supplierId"
),
"supplierId不能为空"
);
checkNotBlank
(
msg
.
get
(
"state"
),
"state不能为空"
);
}
catch
(
IllegalArgumentException
e
)
{
return
new
ResponseResult
(
HttpStatus
.
ERROR
,
ReturnMsg
.
ERROR
,
e
.
getMessage
());
}
Supplier
supplier
=
new
Supplier
();
supplier
.
setId
(
msg
.
get
(
"supplierId"
).
toString
());
supplier
.
setState
((
Integer
)
msg
.
get
(
"state"
));
supplierMapper
.
changeSupplierState
(
supplier
);
return
new
ResponseResult
(
HttpStatus
.
SUCCESS
,
ReturnMsg
.
PASS
);
}
private
LambdaQueryWrapper
<
Supplier
>
createWrapper
(
SupplierReq
req
)
{
LambdaQueryWrapper
<
Supplier
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Supplier
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
ObjectUtil
.
isEmpty
(
req
))
{
if
(
ObjectUtil
.
isEmpty
(
req
))
{
return
wrapper
;
return
wrapper
;
...
...
jyzb-biz/src/main/resources/mapper/EquipmentSizeMapper.xml
View file @
a0d51399
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
<!--@Table base_equipment_size-->
<!--@Table base_equipment_size-->
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"type_id"
jdbcType=
"VARCHAR"
property=
"typeId"
/>
<result
column=
"type_id"
jdbcType=
"VARCHAR"
property=
"typeId"
/>
<result
column=
"detail_id"
jdbcType=
"VARCHAR"
property=
"detailId"
/>
<result
column=
"code"
jdbcType=
"INTEGER"
property=
"code"
/>
<result
column=
"code"
jdbcType=
"INTEGER"
property=
"code"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
...
@@ -19,55 +18,4 @@
...
@@ -19,55 +18,4 @@
id, type_id, detail_id, code, `name`, create_time, update_time, note, epc_type
id, type_id, detail_id, code, `name`, create_time, update_time, note, epc_type
</sql>
</sql>
<insert
id=
"addSize"
parameterType=
"com.junmp.jyzb.entity.EquipmentSize"
>
insert into base_equipment_size
(id,type_id,code,name,create_time,update_time,note,price,state,epc_type)
values
(#{id},#{typeId},#{code},#{name},#{createTime},#{updateTime},#{note},#{price},#{state},#{epcType})
</insert>
<select
id=
"getOneSize"
resultType=
"Map"
>
select id,code,name,note,price,state,epc_type as epcType from base_equipment_size p
where p.id=#{id}
</select>
<update
id=
"deleteSize"
>
update base_equipment_size w
set state = #{state}
where w.id =#{id}
</update>
<update
id=
"updateSize"
>
update base_equipment_size p
set type_id = #{typeId},code=#{code},name=#{name},update_time=#{updateTime},note=#{note},price=#{price},state=#{state},epc_type=#{epcType}
where p.id =#{id}
</update>
<select
id=
"getAllSizeId"
resultType=
"String"
>
select id
from base_equipment_size w
where type_id=#{typeId}
</select>
<update
id=
"changeSizeState"
>
update base_equipment_size w
set state = #{state}
where w.id =#{id}
</update>
<select
id=
"getSizeByCode"
resultType=
"String"
>
select code
from base_equipment_size s
where code=#{code}
</select>
<!-- <select id="getCodeById" resultType="java.lang.String">-->
<!-- select from where id =#{id}-->
<!-- </select>-->
<select
id=
"getSizeDevelop"
resultType=
"Map"
>
select
*
from base_equipment_size
</select>
</mapper>
</mapper>
\ No newline at end of file
jyzb-biz/src/main/resources/mapper/SupplierMapper.xml
View file @
a0d51399
...
@@ -5,9 +5,7 @@
...
@@ -5,9 +5,7 @@
<!--@mbg.generated-->
<!--@mbg.generated-->
<!--@Table base_supplier-->
<!--@Table base_supplier-->
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"equipment_id"
jdbcType=
"VARCHAR"
property=
"equipmentId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"supplier_code"
jdbcType=
"VARCHAR"
property=
"supplierCode"
/>
<result
column=
"short_name"
jdbcType=
"VARCHAR"
property=
"shortName"
/>
<result
column=
"short_name"
jdbcType=
"VARCHAR"
property=
"shortName"
/>
<result
column=
"contacts"
jdbcType=
"VARCHAR"
property=
"contacts"
/>
<result
column=
"contacts"
jdbcType=
"VARCHAR"
property=
"contacts"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
...
@@ -21,76 +19,5 @@
...
@@ -21,76 +19,5 @@
update_time, update_user
update_time, update_user
</sql>
</sql>
<insert
id=
"addSupplier"
parameterType=
"com.junmp.jyzb.entity.Supplier"
>
insert into base_supplier
(id,name,code,short_name,contacts,phone,create_time,update_time,create_user,state)
values
(#{id},#{name},#{code},#{shortName},#{contacts},#{phone},#{createTime},#{updateTime},#{createUser},1)
</insert>
<!-- <select id="getOneSupplier" resultType="Map">-->
<!-- SELECT id, name, code, short_name AS shortName, contacts, phone, update_user,-->
<!-- CASE-->
<!-- WHEN update_time IS NULL THEN create_time-->
<!-- ELSE update_time-->
<!-- END AS updateTime-->
<!-- FROM base_supplier-->
<!-- WHERE id = #{id}-->
<!-- </select>-->
<!--CASE-->
<!-- WHEN update_time IS NULL THEN create_time-->
<!-- ELSE update_time-->
<!-- END AS updateTime-->
<select
id=
"getOneSupplier"
resultType=
"Map"
>
SELECT id, name, code, short_name AS shortName, contacts, phone, update_user,state
FROM base_supplier
WHERE code = #{code}
<if
test=
"SelectName != null and SelectName != ''"
>
AND name LIKE CONCAT('%', #{SelectName}, '%')
</if>
<if
test=
"SelectCode != null and SelectCode != ''"
>
AND code LIKE CONCAT('%', #{SelectCode}, '%')
</if>
</select>
<update
id=
"deleteSupplier"
>
update base_supplier w
set delete_flag = 1
where w.id =#{id}
</update>
<update
id=
"updateSupplier"
>
update base_supplier p
set name=#{name},code=#{code},short_name=#{shortName},contacts=#{contacts},phone=#{phone},
update_time=#{updateTime},update_user=#{updateUser}
where p.id =#{id}
</update>
<select
id=
"getAllSupplierId"
resultType=
"String"
>
select id
from base_supplier w
</select>
<update
id=
"changeSupplierState"
>
update base_supplier p
set state = #{state}
where p.id =#{id}
</update>
<select
id=
"getAllSupplier"
resultType=
"Map"
>
SELECT id, name, code, short_name AS shortName, contacts, phone, update_time as updateTime,state
FROM base_supplier
<if
test=
"name != '' or shortName != ''"
>
WHERE
</if>
<if
test=
"name != null and name != ''"
>
name LIKE CONCAT('%', #{name}, '%')
</if>
<if
test=
"shortName != null and shortName != ''"
>
<if
test=
"name != null and name != ''"
>
AND
</if>
short_name LIKE CONCAT('%', #{shortName}, '%')
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论