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
03f32cbb
Commit
03f32cbb
authored
Dec 28, 2023
by
李小惠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改type和size的名称时同步修改summary以及统计报表涉及的表,添加快选意见的查询条件
parent
144f961f
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
234 行增加
和
38 行删除
+234
-38
CabinetLogsRecordReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InAndOutRecordReq/CabinetLogsRecordReq.java
+3
-0
EquipmentSumreq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InAndOutRecordReq/EquipmentSumreq.java
+13
-0
SummaryLogReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InAndOutRecordReq/SummaryLogReq.java
+5
-0
PolicemanReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
+3
-0
UpdateEquipmentSizeReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateEquipmentSizeReq.java
+1
-1
UpdateOrderDetailReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateOrderDetailReq.java
+1
-0
EquipmentCountSummaryMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/EquipmentCountSummaryMapper.java
+4
-0
PolicemanMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/PolicemanMapper.java
+2
-2
PriceSumSummaryMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/PriceSumSummaryMapper.java
+4
-0
EquipmentSizeServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentSizeServiceImpl.java
+43
-2
EquipmentTypeServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentTypeServiceImpl.java
+18
-0
OrderMainServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/OrderMainServiceImpl.java
+25
-17
PolicemanServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
+3
-3
EquipmentCountSummaryMapper.xml
jyzb-biz/src/main/resources/mapper/EquipmentCountSummaryMapper.xml
+10
-0
PolicemanMapper.xml
jyzb-biz/src/main/resources/mapper/PolicemanMapper.xml
+16
-10
PriceSumSummaryMapper.xml
jyzb-biz/src/main/resources/mapper/PriceSumSummaryMapper.xml
+11
-1
QuickSuggestionsMapper.java
jyzb-process/src/main/java/com/junmp/junmpProcess/mapper/QuickSuggestionsMapper.java
+5
-0
FlowTaskServiceImpl.java
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/FlowTaskServiceImpl.java
+51
-0
QuickSuggestionsServiceImpl.java
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/QuickSuggestionsServiceImpl.java
+1
-1
QuickSuggestionsMapper.xml
jyzb-process/src/main/resources/mapper/QuickSuggestionsMapper.xml
+15
-1
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InAndOutRecordReq/CabinetLogsRecordReq.java
View file @
03f32cbb
...
...
@@ -3,6 +3,7 @@ package com.junmp.jyzb.api.bean.query.InAndOutRecordReq;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
CabinetLogsRecordReq
{
...
...
@@ -15,6 +16,8 @@ public class CabinetLogsRecordReq {
private
String
picUrl
;
private
Date
createTime
;
private
String
equipmentList
;
private
List
<
SummaryLogReq
>
outInLogList
;
private
List
<
EquipmentSumreq
>
equipmentSum
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InAndOutRecordReq/EquipmentSumreq.java
0 → 100644
View file @
03f32cbb
package
com
.
junmp
.
jyzb
.
api
.
bean
.
query
.
InAndOutRecordReq
;
import
lombok.Data
;
@Data
public
class
EquipmentSumreq
{
private
Integer
outNum
;
private
Integer
inNum
;
private
String
sizeId
;
private
String
sizeName
;
private
String
typpeId
;
private
String
typeName
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InAndOutRecordReq/SummaryLogReq.java
View file @
03f32cbb
...
...
@@ -20,7 +20,10 @@ public class SummaryLogReq {
private
Date
useTime
;
private
String
picture
;
private
String
equipmentList
;
//本地主机使用:汇总数量
private
Integer
number
;
//单警柜使用:汇总数量
private
Integer
num
;
//业务类型
private
String
bussinessType
;
//设备标识
...
...
@@ -34,4 +37,6 @@ public class SummaryLogReq {
private
Integer
locationType
;
private
List
<
DetailLogReq
>
logDetailList
;
private
List
<
LogSummarySecondReq
>
sumInfoList
;
private
List
<
String
>
epcList
;
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/PolicemanReq.java
View file @
03f32cbb
...
...
@@ -70,5 +70,7 @@ public class PolicemanReq extends BaseRequest {
private
List
<
String
>
roleCodeList
;
private
Long
userId
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateEquipmentSizeReq.java
View file @
03f32cbb
...
...
@@ -16,7 +16,7 @@ public class UpdateEquipmentSizeReq {
private
String
id
;
@NotBlank
(
message
=
"装备类型id不能为空"
,
groups
=
{
ValidationApi
.
edit
.
class
,
ValidationApi
.
add
.
class
})
private
String
typeId
;
@NotBlank
(
message
=
"编码不能为空"
,
groups
=
{
ValidationApi
.
edit
.
class
,
ValidationApi
.
add
.
class
})
private
String
code
;
@NotBlank
(
message
=
"名称不能为空"
,
groups
=
{
ValidationApi
.
edit
.
class
,
ValidationApi
.
add
.
class
})
private
String
name
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/req/UpdateOrderDetailReq.java
View file @
03f32cbb
...
...
@@ -82,5 +82,6 @@ public class UpdateOrderDetailReq implements Serializable {
private
Integer
maintenancePeriod
;
private
String
remark
;
private
Long
orgId
;
}
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/EquipmentCountSummaryMapper.java
View file @
03f32cbb
...
...
@@ -43,6 +43,10 @@ public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSu
void
deleteAll
(
@Param
(
"orgId"
)
Long
orgId
);
List
<
TjOrgCountDto
>
TjOrgCountByType
(
@Param
(
"req"
)
TjOrgCountReq
req
);
void
setSizeName
(
@Param
(
"sizeId"
)
String
id
,
@Param
(
"sizeName"
)
String
name
);
void
setTypeName
(
@Param
(
"typeId"
)
String
id
,
@Param
(
"typeName"
)
String
name
);
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/PolicemanMapper.java
View file @
03f32cbb
...
...
@@ -49,7 +49,7 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
List
<
PolicemanDto
>
selectUserBypoliceIds
(
@Param
(
"orgId"
)
Long
orgId
,
@Param
(
"account"
)
String
account
,
@Param
(
"name"
)
String
name
,
@Param
(
"policeCode"
)
String
policeCode
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"userId"
)
Long
userId
,
@Param
(
"phone"
)
String
phone
,
@Param
(
"flag"
)
String
flag
,
@Param
(
"pageNo"
)
Long
pageNo
,
@Param
(
"pageSize"
)
Long
pageSize
,
@Param
(
"column"
)
String
column
,
@Param
(
"order"
)
String
order
,
...
...
@@ -57,7 +57,7 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
long
count
(
@Param
(
"orgId"
)
Long
orgId
,
@Param
(
"account"
)
String
account
,
@Param
(
"name"
)
String
name
,
@Param
(
"policeCode"
)
String
policeCode
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"userId"
)
Long
userId
,
@Param
(
"phone"
)
String
phone
,
@Param
(
"flag"
)
String
flag
,
@Param
(
"roleCodeList"
)
List
<
String
>
roleCodeList
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/PriceSumSummaryMapper.java
View file @
03f32cbb
...
...
@@ -47,4 +47,8 @@ public interface PriceSumSummaryMapper extends BaseMapper<PriceSumSummary> {
FinalTjOrgPriceDto
TjOrgPriceSum
(
@Param
(
"orgId"
)
Long
orgId
,
@Param
(
"year"
)
Integer
year
,
@Param
(
"typeIdsList"
)
List
<
String
>
typeIdsList
,
@Param
(
"sizeNameList"
)
List
<
String
>
sizeNameList
);
void
setSizeName
(
@Param
(
"sizeId"
)
String
id
,
@Param
(
"sizeName"
)
String
name
);
void
setTypeName
(
@Param
(
"typeId"
)
String
id
,
@Param
(
"typeName"
)
String
name
);
}
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentSizeServiceImpl.java
View file @
03f32cbb
...
...
@@ -2,6 +2,7 @@ package com.junmp.jyzb.service.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.Repository.SizeRepository
;
...
...
@@ -14,10 +15,15 @@ import com.junmp.jyzb.api.exception.enums.EquipmentExceptionEnum;
import
com.junmp.jyzb.api.exception.enums.ProductExceptionEnum
;
import
com.junmp.jyzb.entity.EquipmentSize
;
import
com.junmp.jyzb.entity.EquipmentType
;
import
com.junmp.jyzb.entity.InventorySummary
;
import
com.junmp.jyzb.mapper.EquipmentCountSummaryMapper
;
import
com.junmp.jyzb.mapper.EquipmentTypeMapper
;
import
com.junmp.jyzb.mapper.PriceSumSummaryMapper
;
import
com.junmp.jyzb.service.EquipmentSizeService
;
import
com.junmp.jyzb.service.EquipmentTypeService
;
import
com.junmp.jyzb.service.InventorySummaryService
;
import
com.junmp.jyzb.utils.DateTimeUtil
;
import
com.junmp.jyzb.utils.RabbitMQSendMsg
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.db.api.factory.PageFactory
;
...
...
@@ -27,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
com.junmp.jyzb.mapper.EquipmentSizeMapper
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -46,6 +53,18 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
@Autowired
private
SizeRepository
sizeRepository
;
@Resource
private
InventorySummaryService
inventorySummaryService
;
@Resource
private
EquipmentCountSummaryMapper
equipmentCountSummaryMapper
;
@Resource
private
PriceSumSummaryMapper
priceSumSummaryMapper
;
@Autowired
private
RabbitMQSendMsg
MQ
;
@Override
public
Object
addEs
()
{
QueryEquipmentTypeReq
req
=
new
QueryEquipmentTypeReq
();
...
...
@@ -62,15 +81,24 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
}
//判断同一个typeId下面是否有相同的name,如果有则添加失败
List
<
EquipmentSize
>
list
=
list
(
new
LambdaQueryWrapper
<
EquipmentSize
>()
.
eq
(
EquipmentSize:
:
getName
,
req
.
getName
())
.
eq
(
EquipmentSize:
:
getTypeId
,
req
.
getTypeId
()));
.
eq
(
EquipmentSize:
:
getTypeId
,
req
.
getTypeId
())
.
orderByDesc
(
EquipmentSize:
:
getCode
));
String
code
=
"0"
;
if
(
list
.
size
()>
0
){
int
i
=
Integer
.
parseInt
(
list
.
get
(
0
).
getCode
());
code
=
String
.
valueOf
(
i
+
1
);
for
(
EquipmentSize
size:
list
)
{
if
(
size
.
getName
().
equals
(
req
.
getName
())){
throw
new
ServiceException
(
EquipmentExceptionEnum
.
EQUIPMENT_NAME_CODE_EXIST
);
}
}
}
EquipmentSize
size
=
new
EquipmentSize
();
String
sizeID
=
UUID
.
randomUUID
().
toString
();
BeanPlusUtil
.
copyProperties
(
req
,
size
);
size
.
setId
(
sizeID
);
size
.
setCode
(
code
);
size
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
size
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
this
.
save
(
size
);
...
...
@@ -91,6 +119,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
updateSize
(
UpdateEquipmentSizeReq
req
)
{
//判断输入的typeId是否存在,如果不存在抛出异常
EquipmentType
one
=
equipmentTypeService
.
getById
(
req
.
getTypeId
());
...
...
@@ -98,9 +127,21 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
throw
new
ServiceException
(
EquipmentExceptionEnum
.
EQUIPMENT_TYPE_NOT_EXIST
);
}
EquipmentSize
size
=
this
.
querySize
(
req
);
//判断两者的名称是否一致,如果一致,则直接改动summary表中的数据以及所有涉及到名称的装备数据表
if
(!
size
.
getName
().
equals
(
req
.
getName
())){
inventorySummaryService
.
update
(
new
LambdaUpdateWrapper
<
InventorySummary
>()
.
set
(
InventorySummary:
:
getSizeName
,
req
.
getName
())
.
eq
(
InventorySummary:
:
getSizeId
,
req
.
getId
()));
priceSumSummaryMapper
.
setSizeName
(
req
.
getId
(),
req
.
getName
());
equipmentCountSummaryMapper
.
setSizeName
(
req
.
getId
(),
req
.
getName
());
}
BeanPlusUtil
.
copyProperties
(
req
,
size
);
size
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
sizeRepository
.
save
(
size
);
//推送消息通知
// MQ.SendMsg();
return
this
.
updateById
(
size
);
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/EquipmentTypeServiceImpl.java
View file @
03f32cbb
...
...
@@ -2,6 +2,7 @@ package com.junmp.jyzb.service.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.junmp.jyzb.Repository.TypeRepository
;
import
com.junmp.jyzb.api.bean.dto.ESTypeDto
;
...
...
@@ -13,7 +14,10 @@ import com.junmp.jyzb.api.bean.req.UpdateEquipmentTypeReq;
import
com.junmp.jyzb.api.exception.JYZBAppException
;
import
com.junmp.jyzb.api.exception.enums.EquipmentExceptionEnum
;
import
com.junmp.jyzb.entity.*
;
import
com.junmp.jyzb.mapper.EquipmentCountSummaryMapper
;
import
com.junmp.jyzb.mapper.PriceSumSummaryMapper
;
import
com.junmp.jyzb.service.EquipmentTypeService
;
import
com.junmp.jyzb.service.InventorySummaryService
;
import
com.junmp.jyzb.service.SupplierService
;
import
com.junmp.jyzb.service.SupplierTypeService
;
import
com.junmp.jyzb.utils.*
;
...
...
@@ -45,6 +49,12 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
private
SupplierService
supplierService
;
@Resource
private
SupplierTypeService
supplierTypeService
;
@Resource
private
InventorySummaryService
inventorySummaryService
;
@Resource
private
PriceSumSummaryMapper
priceSumSummaryMapper
;
@Resource
private
EquipmentCountSummaryMapper
equipmentCountSummaryMapper
;
private
static
final
String
REDIS_TYPE
=
"Type_"
;
private
List
<
EquipmentTypeDto
>
typeDto
;
private
ArrayList
<
String
>
ids
;
...
...
@@ -144,6 +154,14 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
List
<
String
>
chekResult
=
supplierService
.
CheckSupplierList
(
req
.
getSupplierList
());
if
(
chekResult
.
size
()
==
0
)
{
// 先增加code码
//判断两者的名称是否一致,如果一致,则直接改动summary表中的数据
if
(!
type
.
getName
().
equals
(
req
.
getName
())){
inventorySummaryService
.
update
(
new
LambdaUpdateWrapper
<
InventorySummary
>()
.
set
(
InventorySummary:
:
getTypeName
,
req
.
getName
())
.
eq
(
InventorySummary:
:
getTypeId
,
req
.
getId
()));
priceSumSummaryMapper
.
setTypeName
(
req
.
getId
(),
req
.
getName
());
equipmentCountSummaryMapper
.
setTypeName
(
req
.
getId
(),
req
.
getName
());
}
BeanPlusUtil
.
copyProperties
(
req
,
type
);
// 获取当前type对应的所有关联的供应商
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/OrderMainServiceImpl.java
View file @
03f32cbb
...
...
@@ -144,7 +144,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
public
List
<
String
>
AddOrder
(
UpdateOrderReq
req
)
{
//判断该单子是否是销毁出库单,如果是,则直接查询然后相应的库存进行修改,如果库存不足的情况下直接抛出异常提示
if
(
req
.
getBussinessType
().
equals
(
"destruction"
)
&&
ObjectUtil
.
isNotEmpty
(
req
.
getProcessDefinitionId
())){
Boolean
aBoolean
=
addOrRevokeAgentDestructionNum
(
req
,
true
);
Boolean
aBoolean
=
addOrRevokeAgentDestructionNum
(
req
);
}
//修改单据使用次数状态,判断数据库是否有该单据,如果有,那么就判断当前单号是否一致,如果不一致,修改单据使用次数
Long
orgId
=
0L
;
...
...
@@ -321,7 +321,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
return
list
;
}
public
boolean
addOrRevokeAgentDestructionNum
(
UpdateOrderReq
req
,
boolean
flag
){
public
boolean
addOrRevokeAgentDestructionNum
(
UpdateOrderReq
req
){
List
<
UpdateOrderDetailReq
>
list
=
req
.
getDetailList
();
List
<
Object
[]>
searchItem
=
new
ArrayList
<>();
for
(
UpdateOrderDetailReq
detialReq:
list
)
{
...
...
@@ -347,12 +347,14 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
else
{
is
.
setDestructionNumber
(
is
.
getDestructionNumber
()+
detialReq
.
getPlanNum
());
is
.
setNumber
(
is
.
getNumber
()
-
detialReq
.
getPlanNum
());
}
is
.
setStockNumber
(
is
.
getStockNumber
()
-
detialReq
.
getPlanNum
());
is
.
setPrice
(
is
.
getUnitPrice
().
multiply
(
BigDecimal
.
valueOf
(
is
.
getNumber
())));
is
.
setDestructionPrice
(
is
.
getUnitPrice
().
multiply
(
BigDecimal
.
valueOf
(
is
.
getDestructionNumber
())));
}
break
;
}
}
}
if
(!
msg
.
trim
().
isEmpty
()){
...
...
@@ -372,7 +374,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
startProcessInstanceDTO
.
setInvList
(
req
.
getInvList
());
startProcessInstanceDTO
.
setOutInState
(
req
.
getOrderType
());
startProcessInstanceDTO
.
setType
(
"orderDto"
);
startProcessInstanceDTO
.
setBussinessType
(
req
.
getBussinessType
());
if
(
req
.
getOrderType
().
equals
(
"in"
)){
//发物单位和收物单位
switch
(
req
.
getBussinessType
()){
...
...
@@ -924,15 +926,15 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
//如果是领用,警员绑定装备
boolean
e
=
true
;
if
(
req
.
getBussinessType
().
equals
(
"use"
)){
e
=
policeBindEqs
(
req
,
reqList
,
orgId
);
}
//如果是归还入库,将警员下面的装备进行处理
//
if (req.getBussinessType().equals("use")){
//
//
e = policeBindEqs(req, reqList, orgId);
//
}
//
//如果是归还入库,将警员下面的装备进行处理
boolean
f
=
true
;
if
(
req
.
getBussinessType
().
equals
(
"return"
)){
f
=
policeUnBindEqs
(
req
,
reqList
,
orgId
);
}
//
if (req.getBussinessType().equals("return")){
//
f = policeUnBindEqs(req, reqList, orgId);
//
}
//记账结束之后往消息队列中推送一条消息
String
exchangeName
=
"orderExchange"
;
...
...
@@ -1109,10 +1111,16 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
else
{
switch
(
req
.
getBussinessType
()){
case
"destruction"
:
is
.
setPrice
(
is
.
getPrice
().
subtract
(
BigDecimal
.
valueOf
(
upReq
.
getModifyQuantity
()).
multiply
(
upReq
.
getPrice
())));
//我先把库存数量加回来,然后根据实际出库数量进行删减
is
.
setDestructionNumber
(
is
.
getDestructionNumber
()
-
upReq
.
getPlanNum
());
is
.
setNumber
(
is
.
getNumber
()
+
upReq
.
getPlanNum
());
is
.
setStockNumber
(
is
.
getStockNumber
()
+
upReq
.
getPlanNum
());
is
.
setNumber
(
is
.
getNumber
()-
upReq
.
getModifyQuantity
());
is
.
setPrice
(
is
.
getUnitPrice
().
multiply
(
BigDecimal
.
valueOf
(
is
.
getNumber
())));
is
.
setStockNumber
(
is
.
getStockNumber
()-
upReq
.
getModifyQuantity
());
is
.
setDestructionNumber
(
is
.
getDestructionNumber
()+
upReq
.
getModifyQuantity
());
is
.
setDestructionNumberPrice
(
is
.
getUnitPrice
().
multiply
(
BigDecimal
.
valueOf
(
is
.
getDestructionNumber
())));
break
;
case
"allocate"
:
is
.
setNumber
(
is
.
getNumber
()-
upReq
.
getModifyQuantity
());
...
...
@@ -1146,9 +1154,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
is
.
setStockNumber
(
is
.
getStockNumber
()-
upReq
.
getModifyQuantity
());
is
.
setPrice
(
is
.
getPrice
().
subtract
(
BigDecimal
.
valueOf
(
upReq
.
getModifyQuantity
()).
multiply
(
upReq
.
getPrice
()))
);
break
;
case
"quick"
:
break
;
//
case "quick":
//
//
break;
}
}
updateList
.
add
(
is
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PolicemanServiceImpl.java
View file @
03f32cbb
...
...
@@ -506,7 +506,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
}
List
<
PolicemanDto
>
policemanDtos
=
policemanMapper
.
selectUserBypoliceIds
(
req
.
getOrgId
(),
req
.
getAccount
(),
req
.
getName
(),
req
.
getPoliceCode
(),
req
.
getState
(),
req
.
getPhone
(),
req
.
getFlag
(),(
req
.
getPageNo
()-
1
)*
req
.
getPageSize
()
req
.
getState
(),
req
.
get
UserId
(),
req
.
get
Phone
(),
req
.
getFlag
(),(
req
.
getPageNo
()-
1
)*
req
.
getPageSize
()
,
req
.
getPageSize
(),
req
.
getColumn
(),
req
.
getOrder
(),
req
.
getRoleCodeList
());
return
policemanDtos
;
}
...
...
@@ -533,10 +533,10 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
req
.
setPageNo
(
1L
);
req
.
setPageSize
(
10L
);
}
long
size
=
policemanMapper
.
count
(
req
.
getOrgId
(),
req
.
getAccount
(),
req
.
getName
(),
req
.
getPoliceCode
(),
req
.
getState
(),
req
.
getPhone
(),
req
.
getFlag
(),
req
.
getRoleCodeList
());
long
size
=
policemanMapper
.
count
(
req
.
getOrgId
(),
req
.
getAccount
(),
req
.
getName
(),
req
.
getPoliceCode
(),
req
.
getState
(),
req
.
get
UserId
(),
req
.
get
Phone
(),
req
.
getFlag
(),
req
.
getRoleCodeList
());
List
<
PolicemanDto
>
policemanDtos
=
policemanMapper
.
selectUserBypoliceIds
(
req
.
getOrgId
(),
req
.
getAccount
(),
req
.
getName
(),
req
.
getPoliceCode
(),
req
.
getState
(),
req
.
getPhone
(),
req
.
getFlag
(),(
req
.
getPageNo
()-
1
)*
req
.
getPageSize
()
req
.
getState
(),
req
.
get
UserId
(),
req
.
get
Phone
(),
req
.
getFlag
(),(
req
.
getPageNo
()-
1
)*
req
.
getPageSize
()
,
req
.
getPageSize
(),
req
.
getColumn
(),
req
.
getOrder
(),
req
.
getRoleCodeList
());
//判断是否需要添加空数据
if
(
req
.
getIsCreateNullDate
()==
null
||
req
.
getIsCreateNullDate
()){
...
...
jyzb-biz/src/main/resources/mapper/EquipmentCountSummaryMapper.xml
View file @
03f32cbb
...
...
@@ -35,6 +35,16 @@
type_id,type_name,number,
update_time
</sql>
<update
id=
"setSizeName"
>
update vie_price_sum_summary
set size_name=#{sizeName}
where size_id ={sizeId}
</update>
<update
id=
"setTypeName"
>
update vie_price_sum_summary
set type_name=#{typeName}
where type_id ={typeId}
</update>
<delete
id=
"deleteAll"
>
delete from vie_equipment_count_summary where
<if
test=
"orgId!=null and orgId != ''"
>
...
...
jyzb-biz/src/main/resources/mapper/PolicemanMapper.xml
View file @
03f32cbb
...
...
@@ -272,19 +272,22 @@ WHERE o.org_id IN
</if>
where 1=1
<if
test=
"account!=null and account!=''"
>
and
su
.account like CONCAT('%', #{account}, '%')
and
a
.account like CONCAT('%', #{account}, '%')
</if>
<if
test=
"policeCode!=null and policeCode!=''"
>
and
p
.police_code like CONCAT('%', #{policeCode}, '%')
and
a
.police_code like CONCAT('%', #{policeCode}, '%')
</if>
<if
test=
"name!=null and name!=''"
>
and
p
.name like CONCAT('%', #{name}, '%')
and
a
.name like CONCAT('%', #{name}, '%')
</if>
<if
test=
"phone!=null and phone!=''"
>
and
p
.phone like CONCAT('%', #{phone}, '%')
and
a
.phone like CONCAT('%', #{phone}, '%')
</if>
<if
test=
"state!=null and state!=''"
>
and su.status_flag=#{state}
and a.state=#{state}
</if>
<if
test=
"userId != null and userId!= ''"
>
and a.user_id =#{userId}
</if>
GROUP BY a.user_id, a.account, a.org_id, a.nick_name
) as b
...
...
@@ -323,19 +326,22 @@ WHERE o.org_id IN
</if>
where 1=1
<if
test=
"account!=null and account!=''"
>
and
su
.account like CONCAT('%', #{account}, '%')
and
a
.account like CONCAT('%', #{account}, '%')
</if>
<if
test=
"policeCode!=null and policeCode!=''"
>
and
p
.police_code like CONCAT('%', #{policeCode}, '%')
and
a
.police_code like CONCAT('%', #{policeCode}, '%')
</if>
<if
test=
"name!=null and name!=''"
>
and
p
.name like CONCAT('%', #{name}, '%')
and
a
.name like CONCAT('%', #{name}, '%')
</if>
<if
test=
"phone!=null and phone!=''"
>
and
p
.phone like CONCAT('%', #{phone}, '%')
and
a
.phone like CONCAT('%', #{phone}, '%')
</if>
<if
test=
"state!=null and state!=''"
>
and su.status_flag=#{state}
and a.state=#{state}
</if>
<if
test=
"userId != null and userId!= ''"
>
and a.user_id =#{userId}
</if>
GROUP BY a.user_id, a.account, a.org_id, a.nick_name
) as b
...
...
jyzb-biz/src/main/resources/mapper/PriceSumSummaryMapper.xml
View file @
03f32cbb
<?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.PriceSumSummaryMapper"
>
<update
id=
"setSizeName"
>
update vie_equipment_count_summary
set size_name=#{sizeName}
where size_id ={sizeId}
</update>
<update
id=
"setTypeName"
>
update vie_equipment_count_summary
set type_name=#{typeName}
where type_id ={typeId}
</update>
<!-- <update parameterType="java.lang.String" id="PriceNumCacu">-->
<!-- <update parameterType="java.lang.String" id="PriceNumCacu">-->
<!-- UPDATE vie_price_sum_summary-->
<!-- SET-->
<!-- add_price = CASE-->
...
...
jyzb-process/src/main/java/com/junmp/junmpProcess/mapper/QuickSuggestionsMapper.java
View file @
03f32cbb
...
...
@@ -4,6 +4,7 @@ import com.junmp.junmpProcess.entity.QuickSuggestions;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.junmp.jyzb.api.bean.req.InventorySummaryReq
;
import
com.junmp.jyzb.api.bean.req.UpdateBusFormReq
;
import
com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -27,6 +28,10 @@ public interface QuickSuggestionsMapper extends BaseMapper<QuickSuggestions> {
List
<
InventorySummaryReq
>
selectSumByItems
(
@Param
(
"list"
)
List
<
Object
[]>
searchItem
);
void
updateInventorySum
(
@Param
(
"list"
)
List
<
InventorySummaryReq
>
inventorySummaryList
);
List
<
UpdateOrderDetailReq
>
getOrderMainDetail
(
@Param
(
"processId"
)
String
processInstanceId
);
boolean
updateDesNum
(
@Param
(
"list"
)
List
<
InventorySummaryReq
>
inventorySummaryList
);
}
...
...
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/FlowTaskServiceImpl.java
View file @
03f32cbb
...
...
@@ -35,6 +35,10 @@ import com.junmp.jyzb.api.bean.dto.PolicemanDto;
import
com.junmp.jyzb.api.bean.query.BussinessOrderDetialReq
;
import
com.junmp.jyzb.api.bean.req.InventorySummaryReq
;
import
com.junmp.jyzb.api.bean.req.UpdateBusFormReq
;
import
com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq
;
import
com.junmp.jyzb.api.bean.req.UpdateOrderReq
;
import
com.junmp.jyzb.api.exception.JYZBAppException
;
import
com.junmp.jyzb.api.exception.enums.InventoryExceptionEnum
;
import
com.junmp.v2.auth.api.bean.login.LoginUser
;
import
com.junmp.v2.auth.api.context.LoginContext
;
import
com.junmp.v2.common.bean.response.ApiRes
;
...
...
@@ -80,6 +84,7 @@ import springfox.documentation.spring.web.json.Json;
import
javax.annotation.Resource
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.nio.ByteBuffer
;
import
java.nio.CharBuffer
;
import
java.nio.charset.Charset
;
...
...
@@ -312,6 +317,11 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
case
"workOrder"
:
case
"quickOrder"
:
//更新出入库单
//将销毁数加回来
if
(
bussinessType
.
equals
(
"destruction"
)){
List
<
UpdateOrderDetailReq
>
list
=
quickSuggestionsMapper
.
getOrderMainDetail
(
task
.
getProcessInstanceId
());
boolean
b
=
addOrRevokeAgentDestructionNum
(
list
);
}
quickSuggestionsMapper
.
updateOrderMain
(
task
.
getProcessInstanceId
());
break
;
case
"bussinessOrder"
:
...
...
@@ -1070,4 +1080,45 @@ return null;
// }
}
public
boolean
addOrRevokeAgentDestructionNum
(
List
<
UpdateOrderDetailReq
>
list
){
List
<
Object
[]>
searchItem
=
new
ArrayList
<>();
for
(
UpdateOrderDetailReq
detialReq:
list
)
{
//我先去数据库查询summary表中的数据
Object
[]
item
=
new
Object
[]{
detialReq
.
getOrgId
(),
detialReq
.
getWarehouseId
(),
detialReq
.
getTypeId
(),
detialReq
.
getSizeId
(),
detialReq
.
getPrice
()};
searchItem
.
add
(
item
);
}
List
<
InventorySummaryReq
>
inventorySummaryList
=
quickSuggestionsMapper
.
selectSumByItems
(
searchItem
);
String
msg
=
""
;
for
(
UpdateOrderDetailReq
detialReq:
list
)
{
for
(
InventorySummaryReq
is:
inventorySummaryList
)
{
if
(
detialReq
.
getWarehouseId
().
equals
(
is
.
getLocationId
())
&&
detialReq
.
getTypeId
().
equals
(
is
.
getTypeId
())
&&
detialReq
.
getSizeId
().
equals
(
is
.
getSizeId
())
&&
detialReq
.
getPrice
().
compareTo
(
is
.
getUnitPrice
())==
0
){
if
(
ObjectUtil
.
isNull
(
is
.
getDestructionNumber
())){
is
.
setDestructionNumber
(
0
);
}
if
(
is
.
getNumber
()-
detialReq
.
getPlanNum
()<
0
){
// is.setDestructionNumber(is.getDestructionNumber()+is.getNumber());
// is.setNumber(0);
msg
=
msg
+
"装备:"
+
detialReq
.
getTypeName
()+
"号型:"
+
detialReq
.
getSizeName
()+
"装备销毁数小于库存数,库存数为:"
+
is
.
getNumber
()+
"\n"
;
}
else
{
is
.
setDestructionNumber
(
is
.
getDestructionNumber
()
-
detialReq
.
getPlanNum
());
is
.
setNumber
(
is
.
getNumber
()
+
detialReq
.
getPlanNum
());
is
.
setStockNumber
(
is
.
getStockNumber
()
+
detialReq
.
getPlanNum
());
is
.
setPrice
(
is
.
getUnitPrice
().
multiply
(
BigDecimal
.
valueOf
(
is
.
getNumber
())));
is
.
setDestructionNumberPrice
(
is
.
getUnitPrice
().
multiply
(
BigDecimal
.
valueOf
(
is
.
getDestructionNumber
())));
}
break
;
}
}
}
if
(!
msg
.
trim
().
isEmpty
()){
throw
new
JYZBAppException
(
InventoryExceptionEnum
.
EQUIPMENT_NOT_EXIST
,
msg
);
}
return
quickSuggestionsMapper
.
updateDesNum
(
inventorySummaryList
);
}
}
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/QuickSuggestionsServiceImpl.java
View file @
03f32cbb
...
...
@@ -49,7 +49,7 @@ public class QuickSuggestionsServiceImpl extends ServiceImpl<QuickSuggestionsMap
@Override
public
List
<
QuickSuggestionsDto
>
showQuickSuggestions
(
QueryQuickSuggestionsReq
req
)
{
List
<
QuickSuggestions
>
list
=
list
(
new
LambdaQueryWrapper
<
QuickSuggestions
>()
.
eq
(
QuickSuggestions:
:
getUserId
,
req
.
getUserId
()));
.
eq
(
QuickSuggestions:
:
getUserId
,
req
.
getUserId
())
.
eq
(
QuickSuggestions:
:
getUseType
,
req
.
getUseType
())
);
List
<
QuickSuggestionsDto
>
collect
=
list
.
stream
().
map
(
quickSuggestions
->
{
QuickSuggestionsDto
quickSuggestionsDto
=
new
QuickSuggestionsDto
();
BeanPlusUtil
.
copyProperties
(
quickSuggestions
,
quickSuggestionsDto
);
...
...
jyzb-process/src/main/resources/mapper/QuickSuggestionsMapper.xml
View file @
03f32cbb
...
...
@@ -30,10 +30,17 @@
</update>
<update
id=
"updateInventorySum"
>
<foreach
collection=
"list"
item=
"item"
open=
"("
separator=
","
close=
")"
>
update base_inventory_summary
is
set agent_broken_num={item.agentBrokenNum} where id=#{item.id}
update base_inventory_summary
`is`
set agent_broken_num={item.agentBrokenNum} where id=#{item.id}
</foreach>
</update>
<update
id=
"updateDesNum"
>
<foreach
collection=
"list"
item=
"item"
open=
"("
separator=
","
close=
")"
>
update base_inventory_summary `is` set destruction_number={item.destructionNumber},
set number=#{item.number},set price=#{item.price}
where id=#{item.id}
</foreach>
</update>
<select
id=
"getBusForm"
resultType=
"com.junmp.jyzb.api.bean.req.UpdateBusFormReq"
parameterType=
"java.lang.String"
>
select * from bussiness_bus_form om where om.process_id =#{processId}
...
...
@@ -50,6 +57,13 @@
)
</foreach>
</select>
<select
id=
"getOrderMainDetail"
resultType=
"com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq"
parameterType=
"java.lang.String"
>
select om.start_org_id as org_id,od.*
FROM bussiness_order_main om
JOIN bussiness_order_detail od on om.id=od.order_id
where om.process_id=#{processId}
</select>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论