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
2b9fae8e
Commit
2b9fae8e
authored
Sep 11, 2023
by
李小惠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改前端所需的参数以及接口,装备移交
parent
b530b5a4
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
443 行增加
和
47 行删除
+443
-47
ApplicationReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/ApplicationReq.java
+75
-0
OrderMainReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/OrderMainReq.java
+5
-1
PolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
+2
-1
QuerySupplierReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QuerySupplierReq.java
+2
-0
UpdatePolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdatePolicemanReq.java
+2
-1
UpdateWarehouseReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateWarehouseReq.java
+1
-0
ApplicationController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/ApplicationController.java
+46
-0
EquipmentTypeController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/EquipmentTypeController.java
+0
-12
OrderController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/OrderController.java
+3
-3
Application.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Application.java
+85
-0
OrderDetail.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/OrderDetail.java
+1
-1
Policeman.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Policeman.java
+1
-1
ApplicationMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/ApplicationMapper.java
+18
-0
ApplicationService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/ApplicationService.java
+20
-0
ApplicationServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/ApplicationServiceImpl.java
+72
-0
OrderMainServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/OrderMainServiceImpl.java
+61
-18
PolicemanServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
+16
-8
SupplierServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/SupplierServiceImpl.java
+4
-1
DateTimeUtil.java
jyzb-biz/src/main/java/com/junmp/jyzb/utils/DateTimeUtil.java
+2
-0
ApplicationMapper.xml
jyzb-biz/src/main/resources/mapper/ApplicationMapper.xml
+27
-0
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/ApplicationReq.java
0 → 100644
View file @
2b9fae8e
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
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
ApplicationReq
extends
BaseRequest
{
/**
* 应用id
*/
private
String
id
;
/**
* 应用代码
*/
@TableField
(
"app_code"
)
private
String
appCode
;
/**
* 版本号
*/
private
String
version
;
/**
* 应用名称
*/
@NotBlank
(
message
=
"应用名称不能为空"
,
groups
=
{
add
.
class
})
private
String
name
;
/**
* 类型(0内部软件管理,1外部软件管理,2插件/环境安装包)
*/
@NotNull
(
message
=
"应用类型不能为空"
,
groups
=
{
add
.
class
})
private
Integer
type
;
/**
* 应用地址
*/
private
String
address
;
/**
* 备注
*/
private
String
note
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建人员
*/
private
String
createUser
;
/**
* 更新人员
*/
private
String
updateUser
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/OrderMainReq.java
View file @
2b9fae8e
...
@@ -50,7 +50,7 @@ public class OrderMainReq extends BaseRequest {
...
@@ -50,7 +50,7 @@ public class OrderMainReq extends BaseRequest {
private
Integer
manualState
;
private
Integer
manualState
;
private
Integer
orderState
;
private
String
orderState
;
private
String
attachmentLocation
;
private
String
attachmentLocation
;
...
@@ -74,4 +74,8 @@ public class OrderMainReq extends BaseRequest {
...
@@ -74,4 +74,8 @@ public class OrderMainReq extends BaseRequest {
private
String
createUser
;
private
String
createUser
;
private
String
updateUser
;
private
String
updateUser
;
//开始时间
private
String
startTime
;
//结束时间
private
String
endTime
;
}
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
View file @
2b9fae8e
...
@@ -33,7 +33,8 @@ public class PolicemanReq extends BaseRequest {
...
@@ -33,7 +33,8 @@ public class PolicemanReq extends BaseRequest {
private
String
faceInfo
;
private
String
faceInfo
;
private
Boolean
isCreatedAccount
;
//1已生成,0未生成
private
Integer
isCreatedAccount
;
private
String
doorCode
;
private
String
doorCode
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/QuerySupplierReq.java
View file @
2b9fae8e
...
@@ -20,4 +20,6 @@ public class QuerySupplierReq extends BaseRequest {
...
@@ -20,4 +20,6 @@ public class QuerySupplierReq extends BaseRequest {
private
String
shortName
;
private
String
shortName
;
private
Integer
state
;
private
Integer
state
;
//联系人
private
String
contacts
;
}
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdatePolicemanReq.java
View file @
2b9fae8e
...
@@ -34,7 +34,8 @@ public class UpdatePolicemanReq extends BaseRequest {
...
@@ -34,7 +34,8 @@ public class UpdatePolicemanReq extends BaseRequest {
@NotBlank
(
message
=
"人脸信息不能为空"
,
groups
=
{
detail
.
class
})
@NotBlank
(
message
=
"人脸信息不能为空"
,
groups
=
{
detail
.
class
})
private
String
faceInfo
;
private
String
faceInfo
;
private
Boolean
isCreatedAccount
;
//是否同步生成账号 1已生成,0未生成
private
Integer
isCreatedAccount
;
private
String
doorCode
;
private
String
doorCode
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateWarehouseReq.java
View file @
2b9fae8e
...
@@ -24,6 +24,7 @@ public class UpdateWarehouseReq extends BaseRequest {
...
@@ -24,6 +24,7 @@ public class UpdateWarehouseReq extends BaseRequest {
@NotBlank
(
message
=
"联系方式不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
@NotBlank
(
message
=
"联系方式不能为空"
,
groups
=
{
add
.
class
,
edit
.
class
})
private
String
phone
;
private
String
phone
;
//视频地址
private
String
video
;
private
String
video
;
private
Date
createTime
;
private
Date
createTime
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/ApplicationController.java
0 → 100644
View file @
2b9fae8e
package
com
.
junmp
.
jyzb
.
controller
;
import
com.junmp.jyzb.api.bean.query.ApplicationReq
;
import
com.junmp.jyzb.entity.Application
;
import
com.junmp.jyzb.service.ApplicationService
;
import
com.junmp.v2.common.bean.request.ValidationApi
;
import
com.junmp.v2.common.bean.response.ApiRes
;
import
com.junmp.v2.db.api.page.PageResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* 应用管理模块
*/
@RestController
@Slf4j
@RequestMapping
(
"/SoftUpdate"
)
@Api
(
tags
=
"应用管理模块"
)
public
class
ApplicationController
{
@Resource
private
ApplicationService
applicationService
;
//获取应用信息的分页
@PostMapping
(
"/GetAllUpdateCfg"
)
@ApiOperation
(
"获取应用信息的分页"
)
public
ApiRes
<
PageResult
<
Application
>>
GetAllUpdateCfg
(
@RequestBody
ApplicationReq
req
){
return
ApiRes
.
success
(
applicationService
.
GetAllUpdateCfg
(
req
));
}
//新增或者修改应用信息
@PostMapping
(
"/AddOrUpdateCfg"
)
@ApiOperation
(
"新增应用信息"
)
public
ApiRes
<
String
>
AddOrUpdateCfg
(
@RequestBody
@Validated
(
ValidationApi
.
add
.
class
)
ApplicationReq
req
){
return
ApiRes
.
success
(
applicationService
.
AddOrUpdateCfg
(
req
));
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/EquipmentTypeController.java
View file @
2b9fae8e
...
@@ -82,18 +82,6 @@ public class EquipmentTypeController {
...
@@ -82,18 +82,6 @@ public class EquipmentTypeController {
return
returnMsg
;
return
returnMsg
;
}
}
//库存阈值的设置
// @PostMapping("/SetThreshold")
// @ApiOperation("库存阈值的设置")
//库存阈值的修改
// @PostMapping("/SetThreshold")
// @ApiOperation("库存阈值的设置")
//库存阈值的查看
// @PostMapping("/SetThreshold")
// @ApiOperation("库存阈值的设置")
//库存阈值的删除
// @PostMapping("/SetThreshold")
// @ApiOperation("库存阈值的设置")
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/controller/OrderController.java
View file @
2b9fae8e
...
@@ -47,9 +47,9 @@ public class OrderController {
...
@@ -47,9 +47,9 @@ public class OrderController {
}
}
//装备移交
//装备移交
@PostMapping
(
"/EquipmentHandover"
)
//
@PostMapping("/EquipmentHandover")
@ApiOperation
(
"/装备移交"
)
//
@ApiOperation("/装备移交")
public
ApiRes
<
String
>
//
public ApiRes<String>
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Application.java
0 → 100644
View file @
2b9fae8e
package
com
.
junmp
.
jyzb
.
entity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.junmp.v2.common.bean.request.BaseRequest
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
/**
*
* @TableName sys_application
*/
@TableName
(
value
=
"sys_application"
)
@Data
public
class
Application
implements
Serializable
{
/**
* 应用id
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_UUID
)
private
String
id
;
/**
* 应用代码
*/
@TableField
(
"app_code"
)
private
String
appCode
;
/**
* 版本号
*/
private
String
version
;
/**
* 应用名称
*/
private
String
name
;
/**
* 类型(0内部软件管理,1外部软件管理,2插件/环境安装包)
*/
private
Integer
type
;
/**
* 应用地址
*/
private
String
address
;
/**
* 备注
*/
private
String
note
;
/**
* 创建时间
*/
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
Date
createTime
;
/**
* 更新时间
*/
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
UPDATE
)
private
Date
updateTime
;
/**
* 创建人员
*/
private
String
createUser
;
/**
* 更新人员
*/
private
String
updateUser
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/entity/OrderDetail.java
View file @
2b9fae8e
...
@@ -32,7 +32,7 @@ import java.util.Date;
...
@@ -32,7 +32,7 @@ import java.util.Date;
private
String
typeName
;
private
String
typeName
;
@TableField
(
"equipment_size"
)
@TableField
(
"equipment_size"
)
private
Lo
ng
sizeId
;
private
Stri
ng
sizeId
;
@TableField
(
"equipment_size_name"
)
@TableField
(
"equipment_size_name"
)
private
String
sizeName
;
private
String
sizeName
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Policeman.java
View file @
2b9fae8e
...
@@ -45,7 +45,7 @@ public class Policeman implements Serializable {
...
@@ -45,7 +45,7 @@ public class Policeman implements Serializable {
private
String
faceInfo
;
private
String
faceInfo
;
@TableField
(
value
=
"isCreatedAccount"
)
@TableField
(
value
=
"isCreatedAccount"
)
private
Boolean
isCreatedAccount
;
private
Integer
isCreatedAccount
;
@TableField
(
value
=
"door_code"
)
@TableField
(
value
=
"door_code"
)
private
String
doorCode
;
private
String
doorCode
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/ApplicationMapper.java
0 → 100644
View file @
2b9fae8e
package
com
.
junmp
.
jyzb
.
mapper
;
import
com.junmp.jyzb.entity.Application
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author lxh专属坐骑
* @description 针对表【sys_application】的数据库操作Mapper
* @createDate 2023-09-11 14:59:13
* @Entity com.junmp.jyzb.entity.Application
*/
public
interface
ApplicationMapper
extends
BaseMapper
<
Application
>
{
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/ApplicationService.java
0 → 100644
View file @
2b9fae8e
package
com
.
junmp
.
jyzb
.
service
;
import
com.junmp.jyzb.api.bean.query.ApplicationReq
;
import
com.junmp.jyzb.entity.Application
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.junmp.v2.db.api.page.PageResult
;
/**
* @author lxh专属坐骑
* @description 针对表【sys_application】的数据库操作Service
* @createDate 2023-09-11 14:59:13
*/
public
interface
ApplicationService
extends
IService
<
Application
>
{
//获取分页应用信息
PageResult
<
Application
>
GetAllUpdateCfg
(
ApplicationReq
req
);
//新增应用信息
String
AddOrUpdateCfg
(
ApplicationReq
req
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/ApplicationServiceImpl.java
0 → 100644
View file @
2b9fae8e
package
com
.
junmp
.
jyzb
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.api.bean.query.ApplicationReq
;
import
com.junmp.jyzb.api.exception.enums.CabinetExceptionEnum
;
import
com.junmp.jyzb.entity.Application
;
import
com.junmp.jyzb.service.ApplicationService
;
import
com.junmp.jyzb.mapper.ApplicationMapper
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.db.api.factory.PageResultFactory
;
import
com.junmp.v2.db.api.page.PageResult
;
import
org.springframework.stereotype.Service
;
/**
* @author lxh专属坐骑
* @description 针对表【sys_application】的数据库操作Service实现
* @createDate 2023-09-11 14:59:13
*/
@Service
public
class
ApplicationServiceImpl
extends
ServiceImpl
<
ApplicationMapper
,
Application
>
implements
ApplicationService
{
//获取应用的分页信息
@Override
public
PageResult
<
Application
>
GetAllUpdateCfg
(
ApplicationReq
req
)
{
LambdaQueryWrapper
<
Application
>
wrapper
=
createWrapper
(
req
);
Page
<
Application
>
page
=
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
wrapper
);
return
PageResultFactory
.
createPageResult
(
page
);
}
//新增应用信息
@Override
public
String
AddOrUpdateCfg
(
ApplicationReq
req
)
{
Application
application
=
new
Application
();
BeanPlusUtil
.
copyProperties
(
req
,
application
);
//判断id是否传递,如果传递则默认他是修改,根据数据库对比id,判断是否id传递错误;如果不传递默认新增
if
(
req
.
getId
()==
null
||
req
.
getId
().
trim
().
isEmpty
()){
save
(
application
);
return
application
.
getId
();
}
else
{
Application
app
=
getById
(
req
);
if
(
ObjectUtil
.
isNull
(
app
)){
throw
new
ServiceException
(
CabinetExceptionEnum
.
PARAMETER_ERROR
);
}
updateById
(
application
);
return
application
.
getId
();
}
}
private
LambdaQueryWrapper
<
Application
>
createWrapper
(
ApplicationReq
req
)
{
LambdaQueryWrapper
<
Application
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
ObjectUtil
.
isEmpty
(
req
))
{
return
wrapper
;
}
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getName
()),
Application:
:
getName
,
req
.
getName
());
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getType
()),
Application:
:
getType
,
req
.
getType
());
wrapper
.
orderByDesc
(
Application:
:
getCreateTime
);
return
wrapper
;
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/OrderMainServiceImpl.java
View file @
2b9fae8e
...
@@ -19,6 +19,7 @@ import com.junmp.jyzb.service.OrderDetailService;
...
@@ -19,6 +19,7 @@ import com.junmp.jyzb.service.OrderDetailService;
import
com.junmp.jyzb.service.OrderNumService
;
import
com.junmp.jyzb.service.OrderNumService
;
import
com.junmp.jyzb.service.OrderMainService
;
import
com.junmp.jyzb.service.OrderMainService
;
import
com.junmp.jyzb.service.PubOrgService
;
import
com.junmp.jyzb.service.PubOrgService
;
import
com.junmp.jyzb.utils.DateTimeUtil
;
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
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.db.api.factory.PageFactory
;
...
@@ -85,12 +86,14 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -85,12 +86,14 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
//将数量和价格进行累加
//将数量和价格进行累加
sumNum
+=
detail
.
getPlanNum
();
sumNum
+=
detail
.
getPlanNum
();
priceTotal
=
priceTotal
.
add
(
BigDecimal
.
valueOf
(
detail
.
getPlanNum
()).
multiply
(
detail
.
getPrice
()))
;
priceTotal
=
priceTotal
.
add
(
BigDecimal
.
valueOf
(
detail
.
getPlanNum
()).
multiply
(
detail
.
getPrice
()))
;
detail
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
}
}
orderDetailService
.
saveBatch
(
detailList
);
orderDetailService
.
saveBatch
(
detailList
);
//设置总价格和总数量
//设置总价格和总数量
order
.
setPrice
(
priceTotal
);
order
.
setPrice
(
priceTotal
);
order
.
setInventoryQuantity
(
sumNum
);
order
.
setInventoryQuantity
(
sumNum
);
order
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
//保存
//保存
this
.
save
(
order
);
this
.
save
(
order
);
list
.
add
(
order
.
getId
());
list
.
add
(
order
.
getId
());
...
@@ -220,6 +223,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -220,6 +223,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
.
add
(
detailListReq
.
getPrice
().
multiply
(
BigDecimal
.
valueOf
(
detailListReq
.
getPlanNum
()))));
.
add
(
detailListReq
.
getPrice
().
multiply
(
BigDecimal
.
valueOf
(
detailListReq
.
getPlanNum
()))));
order
.
setInventoryQuantity
(
order
.
getInventoryQuantity
()
-
one
.
getPlanNum
()+
detailListReq
.
getPlanNum
());
order
.
setInventoryQuantity
(
order
.
getInventoryQuantity
()
-
one
.
getPlanNum
()+
detailListReq
.
getPlanNum
());
}
}
one
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
updateList
.
add
(
one
);
updateList
.
add
(
one
);
}
else
{
}
else
{
//否则判断id是否为空或者错误,如果为空则添加,不为空则抛出异常
//否则判断id是否为空或者错误,如果为空则添加,不为空则抛出异常
...
@@ -231,6 +235,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -231,6 +235,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
//将数量和价格进行相加处理
//将数量和价格进行相加处理
order
.
setPrice
(
order
.
getPrice
().
add
(
detailListReq
.
getPrice
().
multiply
(
BigDecimal
.
valueOf
(
detailListReq
.
getPlanNum
()))));
order
.
setPrice
(
order
.
getPrice
().
add
(
detailListReq
.
getPrice
().
multiply
(
BigDecimal
.
valueOf
(
detailListReq
.
getPlanNum
()))));
order
.
setInventoryQuantity
(
order
.
getInventoryQuantity
()
+
detailListReq
.
getPlanNum
());
order
.
setInventoryQuantity
(
order
.
getInventoryQuantity
()
+
detailListReq
.
getPlanNum
());
detail
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
addList
.
add
(
detail
);
addList
.
add
(
detail
);
}
else
{
}
else
{
throw
new
ServiceException
(
CabinetExceptionEnum
.
PARAMETER_ERROR
);
throw
new
ServiceException
(
CabinetExceptionEnum
.
PARAMETER_ERROR
);
...
@@ -241,8 +246,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -241,8 +246,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
orderDetailService
.
updateBatchById
(
updateList
);
orderDetailService
.
updateBatchById
(
updateList
);
orderDetailService
.
saveBatch
(
addList
);
orderDetailService
.
saveBatch
(
addList
);
BeanPlusUtil
.
copyProperties
(
req
,
order
);
BeanPlusUtil
.
copyProperties
(
req
,
order
);
this
.
updateById
(
order
);
return
this
.
updateById
(
order
);
return
true
;
}
}
public
boolean
hasCommonElements
(
List
<?>
list1
,
List
<?>
list2
)
{
public
boolean
hasCommonElements
(
List
<?>
list1
,
List
<?>
list2
)
{
for
(
Object
item1
:
list1
)
{
for
(
Object
item1
:
list1
)
{
...
@@ -253,8 +257,6 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -253,8 +257,6 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
return
false
;
// 没有相同值
return
false
;
// 没有相同值
}
}
//查询任务列表(根据组织机构id)
//查询任务列表(根据组织机构id)
@Override
@Override
public
PageResult
<
OrderMainDto
>
getOrderPage
(
OrderMainReq
req
)
{
public
PageResult
<
OrderMainDto
>
getOrderPage
(
OrderMainReq
req
)
{
...
@@ -265,22 +267,16 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -265,22 +267,16 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
LambdaQueryWrapper
<
OrderMain
>
wrapper
=
createWrapper
(
req
);
LambdaQueryWrapper
<
OrderMain
>
wrapper
=
createWrapper
(
req
);
if
(
req
.
getOrderType
()
!=
null
&&
req
.
getOrderType
().
equals
(
"in"
)){
//入库单
if
(
req
.
getOrderType
()
!=
null
&&
req
.
getOrderType
().
equals
(
"in"
)){
//入库单
LambdaQueryWrapper
<
OrderMain
>
eq
=
wrapper
.
eq
(
OrderMain:
:
getOrderType
,
req
.
getOrderType
())
LambdaQueryWrapper
<
OrderMain
>
eq
=
wrapper
.
eq
(
OrderMain:
:
getOrderType
,
req
.
getOrderType
())
.
eq
(
OrderMain:
:
getEndOrgId
,
req
.
getOrgId
());
.
eq
(
OrderMain:
:
getEndOrgId
,
req
.
getOrgId
())
// .eq()
// .eq()
// .eq()
.
orderByDesc
(
OrderMain:
:
getCreateTime
);
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
eq
);
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
eq
);
}
else
if
(
req
.
getOrderType
()
!=
null
&&
req
.
getOrderType
().
equals
(
"out"
))
{
//出库单
}
if
(
req
.
getOrderType
()
!=
null
&&
req
.
getOrderType
().
equals
(
"out"
))
{
//出库单
LambdaQueryWrapper
<
OrderMain
>
eq
=
wrapper
.
eq
(
OrderMain:
:
getOrderType
,
req
.
getOrderType
()).
eq
(
OrderMain:
:
getStartOrgId
,
req
.
getOrgId
());
LambdaQueryWrapper
<
OrderMain
>
eq
=
wrapper
.
eq
(
OrderMain:
:
getOrderType
,
req
.
getOrderType
()).
eq
(
OrderMain:
:
getStartOrgId
,
req
.
getOrgId
());
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
eq
);
page
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
eq
);
}
else
{
//查询全部
Page
<
OrderMain
>
page1
=
new
Page
<>();
Page
<
OrderMain
>
page2
=
new
Page
<>();
LambdaQueryWrapper
<
OrderMain
>
eq1
=
wrapper
.
eq
(
OrderMain:
:
getEndOrgId
,
req
.
getOrgId
());
page1
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
eq1
);
LambdaQueryWrapper
<
OrderMain
>
eq2
=
wrapper
.
eq
(
OrderMain:
:
getStartOrgId
,
req
.
getOrgId
());
page2
=
this
.
page
(
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
()),
eq2
);
List
<
OrderMain
>
list
=
new
ArrayList
<>();
list
.
addAll
(
page1
.
getRecords
());
list
.
addAll
(
page2
.
getRecords
());
page
.
setRecords
(
list
);
}
}
List
<
OrderMainDto
>
orderMainDtoList
=
new
ArrayList
<>();
List
<
OrderMainDto
>
orderMainDtoList
=
new
ArrayList
<>();
//遍历page,(如果出入库的组织机构为同一个的时候需要进行去重处理,不然会存在两条重复的数据)
//遍历page,(如果出入库的组织机构为同一个的时候需要进行去重处理,不然会存在两条重复的数据)
...
@@ -297,6 +293,48 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -297,6 +293,48 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
return
PageResultFactory
.
createPageResult
(
page1
);
return
PageResultFactory
.
createPageResult
(
page1
);
}
}
// //查询任务列表(根据组织机构id)
// @Override
// public PageResult<OrderMainDto> getOrderPage(OrderMainReq req) {
// //判断组织机构是否存在
// pubOrgService.PubOrgExist(req.getOrgId());
// //判断是出库单还是入库单,选择的查询条件也不相同
// Page<OrderMain> page=new Page<>();
// LambdaQueryWrapper<OrderMain> wrapper = createWrapper(req);
// if (req.getOrderType() != null && req.getOrderType().equals("in")){//入库单
// LambdaQueryWrapper<OrderMain> eq = wrapper.eq(OrderMain::getOrderType, req.getOrderType())
// .eq(OrderMain::getEndOrgId, req.getOrgId());
// page=this.page(PageFactory.getDefaultPage(req.getPageNo(),req.getPageSize()),eq);
// } else if (req.getOrderType() != null && req.getOrderType().equals("out")) {//出库单
// LambdaQueryWrapper<OrderMain> eq = wrapper.eq(OrderMain::getOrderType, req.getOrderType()).eq(OrderMain::getStartOrgId, req.getOrgId());
// page=this.page(PageFactory.getDefaultPage(req.getPageNo(),req.getPageSize()),eq);
// }else {//查询全部
// Page<OrderMain> page1=new Page<>();
// Page<OrderMain> page2=new Page<>();
// LambdaQueryWrapper<OrderMain> eq1 = wrapper.eq(OrderMain::getEndOrgId, req.getOrgId());
// page1=this.page(PageFactory.getDefaultPage(req.getPageNo(),req.getPageSize()),eq1);
// LambdaQueryWrapper<OrderMain> eq2 = wrapper.eq(OrderMain::getStartOrgId, req.getOrgId());
// page2=this.page(PageFactory.getDefaultPage(req.getPageNo(),req.getPageSize()),eq2);
// List<OrderMain> list = new ArrayList<>();
// list.addAll(page1.getRecords());
// list.addAll(page2.getRecords());
// page.setRecords(list);
// }
// List<OrderMainDto> orderMainDtoList=new ArrayList<>();
// //遍历page,(如果出入库的组织机构为同一个的时候需要进行去重处理,不然会存在两条重复的数据)
// for (OrderMain orderMain : page.getRecords()){
// OrderMainDto orderMainDto = new OrderMainDto();
// BeanPlusUtil.copyProperties(orderMain,orderMainDto);
// if (!orderMainDtoList.contains(orderMainDto)){
// orderMainDtoList.add(orderMainDto);
// }
// }
// Page<OrderMainDto> page1 = PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize());
// page1.setTotal(orderMainDtoList.size());
// page1.setRecords(orderMainDtoList);
// return PageResultFactory.createPageResult(page1);
// }
//根据任务单id查看业务明细
//根据任务单id查看业务明细
@Override
@Override
public
OrderDto
GetDetailById
(
OrderMainReq
req
)
{
public
OrderDto
GetDetailById
(
OrderMainReq
req
)
{
...
@@ -436,9 +474,14 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -436,9 +474,14 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
if
(
ObjectUtil
.
isEmpty
(
req
))
{
if
(
ObjectUtil
.
isEmpty
(
req
))
{
return
wrapper
;
return
wrapper
;
}
}
//单据状态 ready待入/出库,finished已入/出库,working入/出库中
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getOrderState
()),
OrderMain:
:
getOrderState
,
req
.
getOrderState
());
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getOrderState
()),
OrderMain:
:
getOrderState
,
req
.
getOrderState
());
//审核状态:none,未接入审核流,working审批中,finished已完成
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getExamineState
()),
OrderMain:
:
getExamineState
,
req
.
getExamineState
());
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getExamineState
()),
OrderMain:
:
getExamineState
,
req
.
getExamineState
());
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getManualState
()),
OrderMain:
:
getManualState
,
req
.
getManualState
());
//查询出指定时间内的单据
// wrapper.ge(ObjectUtil.isNotEmpty(req.getStartTime()),OrderMain::getCreateTime,)
//时间降序
wrapper
.
orderByDesc
(
OrderMain:
:
getCreateTime
);
return
wrapper
;
return
wrapper
;
}
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
View file @
2b9fae8e
...
@@ -80,6 +80,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
...
@@ -80,6 +80,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
* @return
* @return
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
AddPoliceman
(
UpdatePolicemanReq
req
)
{
public
String
AddPoliceman
(
UpdatePolicemanReq
req
)
{
//查询传入的组织机构id是否存在
//查询传入的组织机构id是否存在
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
...
@@ -95,8 +96,14 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
...
@@ -95,8 +96,14 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
Policeman
policeman
=
new
Policeman
();
Policeman
policeman
=
new
Policeman
();
BeanPlusUtil
.
copyProperties
(
req
,
policeman
);
BeanPlusUtil
.
copyProperties
(
req
,
policeman
);
policeman
.
setState
(
1
);
policeman
.
setState
(
1
);
policeman
.
setIsCreatedAccount
(
false
);
save
(
policeman
);
save
(
policeman
);
//判断是否需要同步生成账号,如果为true则生成账号绑定
if
(
req
.
getIsCreatedAccount
()==
1
){
PolicemanReq
policemanReq
=
new
PolicemanReq
();
BeanPlusUtil
.
copyProperties
(
req
,
policemanReq
);
policemanReq
.
setAccount
(
req
.
getPoliceCode
());
PoliceBindUser
(
policemanReq
);
}
return
policeman
.
getId
();
return
policeman
.
getId
();
}
}
...
@@ -459,10 +466,10 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
...
@@ -459,10 +466,10 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
@Override
@Override
public
boolean
PoliceBindUser
(
PolicemanReq
req
)
{
public
boolean
PoliceBindUser
(
PolicemanReq
req
)
{
//判断警员是否存在并且判断该警员是否已经绑定账号,如果绑定则抛出异常
//判断警员是否存在并且判断该警员是否已经绑定账号,如果绑定则抛出异常
Policeman
policeman
=
PoliceExist
(
req
.
getId
());
//
Policeman policeman = PoliceExist(req.getId());
if
(
ObjectUtil
.
isNotNull
(
policeman
.
getUserId
())){
//
if (ObjectUtil.isNotNull(policeman.getUserId())){
throw
new
ServiceException
(
PolicemanExceptionEnum
.
POLICEUSER_IS_EXISTS
);
//
throw new ServiceException(PolicemanExceptionEnum.POLICEUSER_IS_EXISTS);
}
//
}
SysUser
user
=
new
SysUser
();
SysUser
user
=
new
SysUser
();
BeanPlusUtil
.
copyProperties
(
req
,
user
);
BeanPlusUtil
.
copyProperties
(
req
,
user
);
//判断数据库中是否已经存在账号,如果存在则抛出异常提示账号已存在
//判断数据库中是否已经存在账号,如果存在则抛出异常提示账号已存在
...
@@ -473,10 +480,10 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
...
@@ -473,10 +480,10 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
SysUser
one
=
sysUserService
.
getOne
(
new
LambdaQueryWrapper
<
SysUser
>()
SysUser
one
=
sysUserService
.
getOne
(
new
LambdaQueryWrapper
<
SysUser
>()
.
eq
(
SysUser:
:
getAccount
,
user
.
getAccount
())
.
eq
(
SysUser:
:
getAccount
,
user
.
getAccount
())
.
eq
(
SysUser:
:
getPassword
,
user
.
getPassword
()));
.
eq
(
SysUser:
:
getPassword
,
user
.
getPassword
()));
if
(
ObjectUtil
.
isNotNull
(
one
)){
if
(
ObjectUtil
.
isNotNull
(
one
)){
throw
new
ServiceException
(
UserExceptionEnum
.
USER_IS_EXIST
);
throw
new
ServiceException
(
UserExceptionEnum
.
USER_IS_EXIST
);
}
}
//存储到数据库
//存储到数据库
//判断传入的sex是什么,需要做处理
//判断传入的sex是什么,需要做处理
if
(
req
.
getSex
().
equals
(
"男"
))
{
if
(
req
.
getSex
().
equals
(
"男"
))
{
...
@@ -492,8 +499,9 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
...
@@ -492,8 +499,9 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
userOrgReq
.
setOrgId
(
req
.
getOrgId
());
userOrgReq
.
setOrgId
(
req
.
getOrgId
());
this
.
sysUserOrgService
.
add
(
userOrgReq
);
this
.
sysUserOrgService
.
add
(
userOrgReq
);
//通过警员id将查询到的警员信息进行修改设置
//通过警员id将查询到的警员信息进行修改设置
Policeman
policeman
=
new
Policeman
();
policeman
.
setUserId
(
user
.
getUserId
());
policeman
.
setUserId
(
user
.
getUserId
());
policeman
.
setIsCreatedAccount
(
true
);
policeman
.
setIsCreatedAccount
(
1
);
policeman
.
setPassword
(
encrypt
);
policeman
.
setPassword
(
encrypt
);
return
updateById
(
policeman
);
return
updateById
(
policeman
);
}
}
...
@@ -529,7 +537,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
...
@@ -529,7 +537,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
//如果查询不到,表示该账号不是警员的,直接删除就行,不需要做任何操作
//如果查询不到,表示该账号不是警员的,直接删除就行,不需要做任何操作
return
true
;
return
true
;
}
}
police
.
setIsCreatedAccount
(
false
);
police
.
setIsCreatedAccount
(
0
);
police
.
setUserId
(
null
);
police
.
setUserId
(
null
);
police
.
setPassword
(
null
);
police
.
setPassword
(
null
);
return
updateById
(
police
);
return
updateById
(
police
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/SupplierServiceImpl.java
View file @
2b9fae8e
...
@@ -143,13 +143,16 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
...
@@ -143,13 +143,16 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
if
(
ObjectUtil
.
isEmpty
(
req
))
{
if
(
ObjectUtil
.
isEmpty
(
req
))
{
return
wrapper
;
return
wrapper
;
}
}
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getCode
()),
Supplier:
:
getCode
,
req
.
getCode
());
//根据供应商短码查询查询
//根据供应商短码查询查询
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getCode
()),
Supplier:
:
getCode
,
req
.
getCode
());
//供应商ID
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
Supplier:
:
getId
,
req
.
getId
());
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getId
()),
Supplier:
:
getId
,
req
.
getId
());
//供应商名称模糊查询
//供应商名称模糊查询
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getName
()),
Supplier:
:
getName
,
req
.
getName
());
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getName
()),
Supplier:
:
getName
,
req
.
getName
());
//供应商名称模糊查询
//供应商名称模糊查询
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getShortName
()),
Supplier:
:
getShortName
,
req
.
getShortName
());
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getShortName
()),
Supplier:
:
getShortName
,
req
.
getShortName
());
//contacts联系人
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getContacts
()),
Supplier:
:
getContacts
,
req
.
getContacts
());
//根据创建时间降序
//根据创建时间降序
wrapper
.
orderByDesc
(
Supplier:
:
getCreateTime
);
wrapper
.
orderByDesc
(
Supplier:
:
getCreateTime
);
return
wrapper
;
return
wrapper
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/utils/DateTimeUtil.java
View file @
2b9fae8e
...
@@ -30,4 +30,5 @@ public class DateTimeUtil {
...
@@ -30,4 +30,5 @@ public class DateTimeUtil {
});
});
return
allPoliceman
;
return
allPoliceman
;
}
}
}
}
\ No newline at end of file
jyzb-biz/src/main/resources/mapper/ApplicationMapper.xml
0 → 100644
View file @
2b9fae8e
<?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=
"com.junmp.jyzb.mapper.ApplicationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.junmp.jyzb.entity.Application"
>
<id
property=
"id"
column=
"id"
jdbcType=
"VARCHAR"
/>
<result
property=
"appCode"
column=
"app_code"
jdbcType=
"VARCHAR"
/>
<result
property=
"version"
column=
"version"
jdbcType=
"VARCHAR"
/>
<result
property=
"name"
column=
"name"
jdbcType=
"VARCHAR"
/>
<result
property=
"type"
column=
"type"
jdbcType=
"INTEGER"
/>
<result
property=
"address"
column=
"address"
jdbcType=
"VARCHAR"
/>
<result
property=
"note"
column=
"note"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createUser"
column=
"create_user"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateUser"
column=
"update_user"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,app_code,version,
name,type,address,
note,create_time,update_time,
create_user,update_user
</sql>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论