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
3fd65719
Commit
3fd65719
authored
Mar 12, 2024
by
李小惠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整库存管理接口
parent
c6cfbf1f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
222 行增加
和
134 行删除
+222
-134
FinalTjOrgCountDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/TjDto/FinalTjOrgCountDto.java
+2
-0
InventoryReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InventoryReq.java
+4
-1
TjOrgCountReq.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/TjReq/TjOrgCountReq.java
+1
-1
InventoryExceptionEnum.java
jyzb-api/src/main/java/com/junmp/jyzb/api/exception/enums/InventoryExceptionEnum.java
+1
-1
TemperatureRedisCache.java
jyzb-biz/src/main/java/com/junmp/jyzb/cache/TemperatureRedisCache.java
+1
-1
Inventory.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Inventory.java
+1
-0
WarehouseInventory.java
jyzb-biz/src/main/java/com/junmp/jyzb/entity/WarehouseInventory.java
+1
-1
GlobalEndListener.java
jyzb-biz/src/main/java/com/junmp/jyzb/listener/GlobalEndListener.java
+1
-1
InventoryMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventoryMapper.java
+2
-0
InventorySummaryMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventorySummaryMapper.java
+3
-0
WarehouseInventoryMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/WarehouseInventoryMapper.java
+6
-0
InventorySummaryService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/InventorySummaryService.java
+1
-1
InventoryServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventoryServiceImpl.java
+54
-33
InventorySummaryServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventorySummaryServiceImpl.java
+2
-17
OrderMainServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/OrderMainServiceImpl.java
+3
-0
PublicServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PublicServiceImpl.java
+15
-18
TjServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/TjServiceImpl.java
+18
-5
EquipmentCountSummaryMapper.xml
jyzb-biz/src/main/resources/mapper/EquipmentCountSummaryMapper.xml
+0
-0
InventoryMapper.xml
jyzb-biz/src/main/resources/mapper/InventoryMapper.xml
+57
-35
InventorySummaryMapper.xml
jyzb-biz/src/main/resources/mapper/InventorySummaryMapper.xml
+26
-10
WarehouseInventoryMapper.xml
jyzb-biz/src/main/resources/mapper/WarehouseInventoryMapper.xml
+14
-0
application-local.yml
jyzb-boot/src/main/resources/application-local.yml
+3
-3
application-prod.yml
jyzb-boot/src/main/resources/application-prod.yml
+3
-3
application.yml
jyzb-boot/src/main/resources/application.yml
+2
-2
FlowTaskServiceImpl.java
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/FlowTaskServiceImpl.java
+1
-1
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/TjDto/FinalTjOrgCountDto.java
View file @
3fd65719
...
@@ -22,4 +22,5 @@ public class FinalTjOrgCountDto implements Serializable {
...
@@ -22,4 +22,5 @@ public class FinalTjOrgCountDto implements Serializable {
* 装备总数
* 装备总数
*/
*/
private
Integer
number
;
private
Integer
number
;
private
Integer
brokenCount
;
}
}
\ No newline at end of file
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/InventoryReq.java
View file @
3fd65719
...
@@ -206,6 +206,9 @@ public class InventoryReq extends BaseRequest {
...
@@ -206,6 +206,9 @@ public class InventoryReq extends BaseRequest {
private
String
bussinessType
;
private
String
bussinessType
;
private
String
number
;
//导入装备时的装备总数
private
Integer
number
;
private
Integer
epcType
;
}
}
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/query/TjReq/TjOrgCountReq.java
View file @
3fd65719
...
@@ -32,7 +32,7 @@ public class TjOrgCountReq extends BaseRequest {
...
@@ -32,7 +32,7 @@ public class TjOrgCountReq extends BaseRequest {
//本级0,本级及下级1
//本级0,本级及下级1
@NotNull
(
message
=
"查询条件维度不能为空"
,
groups
=
{
edit
.
class
})
@NotNull
(
message
=
"查询条件维度不能为空"
,
groups
=
{
edit
.
class
})
private
int
levelType
;
private
Integer
levelType
;
@NotNull
(
message
=
"查询条件组织机构信息不能为空"
,
groups
=
{
edit
.
class
})
@NotNull
(
message
=
"查询条件组织机构信息不能为空"
,
groups
=
{
edit
.
class
})
private
String
findCode
;
private
String
findCode
;
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/exception/enums/InventoryExceptionEnum.java
View file @
3fd65719
...
@@ -18,7 +18,7 @@ public enum InventoryExceptionEnum implements IExceptionEnum {
...
@@ -18,7 +18,7 @@ public enum InventoryExceptionEnum implements IExceptionEnum {
ACCOUNT_ERROR
(
CommonConstant
.
DEFAULT_BIZ_ERROR_CODE
,
"人工新增物资未编辑,请先编辑物资信息"
),
ACCOUNT_ERROR
(
CommonConstant
.
DEFAULT_BIZ_ERROR_CODE
,
"人工新增物资未编辑,请先编辑物资信息"
),
INVERTORY_IS_NULL
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"导入的装备为空"
),
INVERTORY_IS_NULL
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
,
"导入的装备为空"
),
/**
/**
* 装备不存
�
* 装备不存
在
*/
*/
EQUIPMENT_NOT_EXIST
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
+
JYZBConstant
.
JYZB_EXCEPTION_STEP_CODE
+
13
,
"{}"
)
EQUIPMENT_NOT_EXIST
(
CommonConstant
.
DEFAULT_USER_ERROR_CODE
+
JYZBConstant
.
JYZB_EXCEPTION_STEP_CODE
+
13
,
"{}"
)
;
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/cache/TemperatureRedisCache.java
View file @
3fd65719
...
@@ -33,7 +33,7 @@ public class TemperatureRedisCache extends AbstractRedisCache<Object> {
...
@@ -33,7 +33,7 @@ public class TemperatureRedisCache extends AbstractRedisCache<Object> {
// String key = warehouseId;
// String key = warehouseId;
// Long size = getRedisTemplate().opsForZSet().size(key);
// Long size = getRedisTemplate().opsForZSet().size(key);
getRedisTemplate
().
opsForZSet
().
add
(
"WarehouseDev:"
+
warehouseId
,
data
,
timestamp
);
getRedisTemplate
().
opsForZSet
().
add
(
"WarehouseDev:"
+
warehouseId
,
data
,
timestamp
);
setValueWithExpiration
(
"WarehouseDev:"
+
warehouseId
,
data
,
864
00
);
setValueWithExpiration
(
"WarehouseDev:"
+
warehouseId
,
data
,
2592
00
);
put
(
warehouseId
,
data
);
put
(
warehouseId
,
data
);
}
}
public
List
<
Object
>
getDataByTimestampRange
(
String
warehouseId
,
long
startTimestamp
,
long
endTimestamp
)
{
public
List
<
Object
>
getDataByTimestampRange
(
String
warehouseId
,
long
startTimestamp
,
long
endTimestamp
)
{
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/Inventory.java
View file @
3fd65719
...
@@ -181,6 +181,7 @@ public class Inventory implements Serializable {
...
@@ -181,6 +181,7 @@ public class Inventory implements Serializable {
/**
/**
* 备注
* 备注
*/
*/
//装备导入 equipmentImport
private
String
note
;
private
String
note
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/entity/WarehouseInventory.java
View file @
3fd65719
...
@@ -68,7 +68,7 @@ public class WarehouseInventory implements Serializable {
...
@@ -68,7 +68,7 @@ public class WarehouseInventory implements Serializable {
private
String
epc
;
private
String
epc
;
/**
/**
* 0,正常,1不做提醒
* 0,正常,1不做提醒
, 2装备导入
*/
*/
@TableField
(
value
=
"flag"
)
@TableField
(
value
=
"flag"
)
private
Integer
flag
;
private
Integer
flag
;
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/listener/GlobalEndListener.java
View file @
3fd65719
...
@@ -297,7 +297,7 @@ import static com.junmp.junmpProcess.common.CommonConstants.*;
...
@@ -297,7 +297,7 @@ import static com.junmp.junmpProcess.common.CommonConstants.*;
}
}
else
else
{
{
sendReq
.
setMsgTitle
(
"您的
审批
已通过"
);
sendReq
.
setMsgTitle
(
"您的
申请
已通过"
);
sendReq
.
setMsgContent
(
"您提交的审批【"
+
mainProcess
.
getName
()+
"】已经通过"
);
sendReq
.
setMsgContent
(
"您提交的审批【"
+
mainProcess
.
getName
()+
"】已经通过"
);
}
}
sendReq
.
setPriority
(
"0"
);
sendReq
.
setPriority
(
"0"
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventoryMapper.java
View file @
3fd65719
...
@@ -111,6 +111,8 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
...
@@ -111,6 +111,8 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
@Param
(
"price"
)
BigDecimal
price
,
@Param
(
"warrantyPeriod"
)
Integer
warrantyPeriod
,
@Param
(
"price"
)
BigDecimal
price
,
@Param
(
"warrantyPeriod"
)
Integer
warrantyPeriod
,
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Date
endTime
);
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Date
endTime
);
void
updateEqsInfo
(
@Param
(
"list"
)
List
<
InventoryReq
>
addInvList
,
@Param
(
"updateTime"
)
Date
time
);
// IPage<InventoryDto> GetDetailByTerms(@Param("page") Page<Object> defaultPage, @Param("req") InventoryReq req);
// IPage<InventoryDto> GetDetailByTerms(@Param("page") Page<Object> defaultPage, @Param("req") InventoryReq req);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventorySummaryMapper.java
View file @
3fd65719
...
@@ -100,4 +100,6 @@ public interface InventorySummaryMapper extends BaseMapper<InventorySummary> {
...
@@ -100,4 +100,6 @@ public interface InventorySummaryMapper extends BaseMapper<InventorySummary> {
void
setDestoryGroupAction
();
void
setDestoryGroupAction
();
void
setWarrantyGroupAction
();
void
setWarrantyGroupAction
();
void
updateSummaryInsByOrder
(
@Param
(
"orgId"
)
Long
orgId
);
}
}
\ No newline at end of file
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/WarehouseInventoryMapper.java
View file @
3fd65719
package
com
.
junmp
.
jyzb
.
mapper
;
package
com
.
junmp
.
jyzb
.
mapper
;
import
com.junmp.jyzb.api.bean.query.InventoryReq
;
import
com.junmp.jyzb.entity.WarehouseInventory
;
import
com.junmp.jyzb.entity.WarehouseInventory
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @author lxh专属坐骑
* @author lxh专属坐骑
...
@@ -11,6 +16,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -11,6 +16,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
WarehouseInventoryMapper
extends
BaseMapper
<
WarehouseInventory
>
{
public
interface
WarehouseInventoryMapper
extends
BaseMapper
<
WarehouseInventory
>
{
void
updateWareInfo
(
@Param
(
"list"
)
List
<
InventoryReq
>
eqsList
,
@Param
(
"updateTime"
)
Date
currentDateTime
);
}
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/InventorySummaryService.java
View file @
3fd65719
...
@@ -23,7 +23,7 @@ public interface InventorySummaryService extends IService<InventorySummary> {
...
@@ -23,7 +23,7 @@ public interface InventorySummaryService extends IService<InventorySummary> {
InventorySummary
getOne
(
InventorySumReq
req
);
InventorySummary
getOne
(
InventorySumReq
req
);
//对summary表中数据进行重新计算装备信息汇总
//对summary表中数据进行重新计算装备信息汇总
Boolean
updateSummaryInsByOrder
(
Long
orgId
);
void
updateSummaryInsByOrder
(
Long
orgId
);
//处理单警柜返回单据结果
//处理单警柜返回单据结果
Boolean
cabinetInOutRecords
(
CabinetLogsRecordReq
req
);
Boolean
cabinetInOutRecords
(
CabinetLogsRecordReq
req
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventoryServiceImpl.java
View file @
3fd65719
...
@@ -26,6 +26,7 @@ import com.junmp.jyzb.entity.*;
...
@@ -26,6 +26,7 @@ import com.junmp.jyzb.entity.*;
import
com.junmp.jyzb.mapper.InventorySummaryMapper
;
import
com.junmp.jyzb.mapper.InventorySummaryMapper
;
import
com.junmp.jyzb.mapper.LogSummaryMapper
;
import
com.junmp.jyzb.mapper.LogSummaryMapper
;
import
com.junmp.jyzb.mapper.WarehouseInventoryMapper
;
import
com.junmp.jyzb.service.*
;
import
com.junmp.jyzb.service.*
;
import
com.junmp.jyzb.utils.DateTimeUtil
;
import
com.junmp.jyzb.utils.DateTimeUtil
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.exception.base.ServiceException
;
...
@@ -57,6 +58,8 @@ import java.text.SimpleDateFormat;
...
@@ -57,6 +58,8 @@ import java.text.SimpleDateFormat;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
org
.
springframework
.
amqp
.
core
.
QueueBuilder
.
MasterLocator
.
random
;
@Service
@Service
@Slf4j
@Slf4j
...
@@ -116,6 +119,11 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
...
@@ -116,6 +119,11 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
@Resource
@Resource
private
InventorySummaryMapper
inventorySummaryMapper
;
private
InventorySummaryMapper
inventorySummaryMapper
;
@Resource
private
WarehouseInventoryService
warehouseInventoryService
;
@Resource
private
WarehouseInventoryMapper
warehouseInventoryMapper
;
...
@@ -681,44 +689,57 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
...
@@ -681,44 +689,57 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
//装备导入(判断导入的数据是否存在redis中,如果不存在,则判断数据库是否存在相同的epc,如果存在提示报错,并且讲该次导入的数据存储到redis中,为下一次进行作比较)
//装备导入(判断导入的数据是否存在redis中,如果不存在,则判断数据库是否存在相同的epc,如果存在提示报错,并且讲该次导入的数据存储到redis中,为下一次进行作比较)
@Override
@Override
@Transactional
public
boolean
EqsImport
(
InventoryReq
req
)
{
public
boolean
EqsImport
(
InventoryReq
req
)
{
//将该组织机构下面已经导入的装备删除
remove
(
new
LambdaQueryWrapper
<
Inventory
>().
eq
(
Inventory:
:
getNote
,
"equipmentImport"
));
warehouseInventoryService
.
remove
(
new
LambdaQueryWrapper
<
WarehouseInventory
>().
eq
(
WarehouseInventory:
:
getFlag
,
2
));
List
<
InventoryReq
>
eqsList
=
req
.
getEqsList
();
List
<
InventoryReq
>
eqsList
=
req
.
getEqsList
();
PubOrg
pubOrg
=
new
PubOrg
();
PubOrg
pubOrg
=
pubOrgService
.
getOne
(
new
LambdaQueryWrapper
<
PubOrg
>().
eq
(
PubOrg:
:
getDName
,
eqsList
.
get
(
0
).
getOrgName
())
if
(
CollectionUtil
.
isNotEmpty
(
eqsList
)){
.
or
()
pubOrg
=
pubOrgService
.
getOne
(
new
LambdaQueryWrapper
<
PubOrg
>()
.
eq
(
PubOrg:
:
getOrgName
,
eqsList
.
get
(
0
).
getOrgName
()));
.
eq
(
PubOrg:
:
getOrgName
,
eqsList
.
get
(
0
).
getOrgName
())
//将summary表进行删除
.
or
()
inventorySummaryService
.
remove
(
new
LambdaQueryWrapper
<
InventorySummary
>().
eq
(
InventorySummary:
:
getOrgId
,
pubOrg
.
getOrgId
()));
.
eq
(
PubOrg:
:
getDName
,
eqsList
.
get
(
0
).
getOrgName
()));
List
<
Inventory
>
addInvList
=
new
ArrayList
<>();
}
else
{
List
<
WarehouseInventory
>
addWareList
=
new
ArrayList
<>();
throw
new
ServiceException
(
InventoryExceptionEnum
.
INVERTORY_IS_NULL
);
}
//创建4个对应的map去数据库进行查询
Map
<
String
,
String
>
locationMap
=
new
HashMap
<>();
Map
<
String
,
String
>
typeMap
=
new
HashMap
<>();
Map
<
String
,
String
>
sizeMap
=
new
HashMap
<>();
Map
<
String
,
String
>
supplierMap
=
new
HashMap
<>();
for
(
InventoryReq
inv:
eqsList
)
{
for
(
InventoryReq
inv:
eqsList
)
{
locationMap
.
putIfAbsent
(
inv
.
getLocationName
(),
inv
.
getLocationName
());
for
(
int
i
=
0
;
i
<
inv
.
getNumber
();
i
++)
{
typeMap
.
putIfAbsent
(
inv
.
getTypeName
(),
inv
.
getTypeName
());
//每次遍历inv,获取inv中的数量,对应创建对象并且进行添加至list从而最终插入数据库
sizeMap
.
putIfAbsent
(
inv
.
getSizeName
(),
inv
.
getSizeName
()+
"-"
+
inv
.
getTypeName
());
Random
random
=
new
Random
();
supplierMap
.
putIfAbsent
(
inv
.
getSupplierName
(),
inv
.
getSupplierName
());
String
epc
=
"000000"
+
DateTimeUtil
.
getCurrentDateTime
().
getTime
()+(
random
.
nextInt
(
999999
-
100000
+
1
)
+
100000
);
Inventory
inventory
=
new
Inventory
();
BeanPlusUtil
.
copyProperties
(
inv
,
inventory
);
inventory
.
setOrgId
(
pubOrg
.
getOrgId
());
inventory
.
setNote
(
"equipmentImport"
);
inventory
.
setCreateTime
(
DateTimeUtil
.
getCurrentDateTime
());
inventory
.
setEpc
(
epc
);
addInvList
.
add
(
inventory
);
WarehouseInventory
warehouseInventory
=
new
WarehouseInventory
();
BeanPlusUtil
.
copyProperties
(
inv
,
warehouseInventory
);
warehouseInventory
.
setOrgId
(
pubOrg
.
getOrgId
());
//2表示装备导入
warehouseInventory
.
setFlag
(
2
);
warehouseInventory
.
setEpc
(
epc
);
warehouseInventory
.
setOrgName
(
inv
.
getOrgName
());
addWareList
.
add
(
warehouseInventory
);
}
}
}
List
<
String
>
locationList
=
new
ArrayList
<>(
locationMap
.
values
());
if
(
CollectionUtil
.
isNotEmpty
(
addInvList
)){
List
<
EquipmentSize
>
sizeList
=
new
ArrayList
<>();
saveBatch
(
addInvList
);
for
(
String
item:
typeMap
.
values
())
{
String
[]
parts
=
item
.
split
(
"-"
);
String
sizeName
=
parts
[
0
].
trim
();
String
typeName
=
parts
[
1
].
trim
();
EquipmentSize
equipmentSize
=
new
EquipmentSize
();
equipmentSize
.
setName
(
sizeName
);
equipmentSize
.
setTypeName
(
typeName
);
sizeList
.
add
(
equipmentSize
);
}
}
List
<
String
>
typeList
=
new
ArrayList
<>(
sizeMap
.
values
());
if
(
CollectionUtil
.
isNotEmpty
(
addWareList
)){
List
<
String
>
supplierList
=
new
ArrayList
<>(
supplierMap
.
values
());
warehouseInventoryService
.
saveBatch
(
addWareList
);
List
<
EquipmentSize
>
equipmentSizeList
=
equipmentSizeService
.
distinctByName
(
sizeList
);
}
//直接查询五张数据表并且更新
return
false
;
inventoryMapper
.
updateEqsInfo
(
eqsList
,
DateTimeUtil
.
getCurrentDateTime
());
warehouseInventoryMapper
.
updateWareInfo
(
eqsList
,
DateTimeUtil
.
getCurrentDateTime
());
//重新计算summary表中的数据
inventorySummaryService
.
updateSummaryInsByOrder
(
pubOrg
.
getOrgId
());
//是否需要创建报表(不创建,由定时任务进行。)但是在撤回时,需要将报表进行删除
return
true
;
}
}
@Override
@Override
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventorySummaryServiceImpl.java
View file @
3fd65719
...
@@ -218,23 +218,8 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
...
@@ -218,23 +218,8 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
//对summary表中数据进行重新计算装备信息汇总
//对summary表中数据进行重新计算装备信息汇总
public
Boolean
updateSummaryInsByOrder
(
Long
orgId
){
public
void
updateSummaryInsByOrder
(
Long
orgId
){
//查询字典表中的临近报废天数
inventorySummaryMapper
.
updateSummaryInsByOrder
(
orgId
);
SysDictItem
sysDictItem
=
sysDictItemService
.
getOne
(
new
LambdaQueryWrapper
<
SysDictItem
>()
.
eq
(
SysDictItem:
:
getItemText
,
"brokenNumber"
));
//如果配置找不到,那就默认设置为15天为临近报废(如果装备的质保期小于15天了,就是为临近报废)
Integer
brokenNumberDays
;
if
(
ObjectUtil
.
isNotNull
(
sysDictItem
)){
brokenNumberDays
=
15
;
}
else
{
brokenNumberDays
=
Integer
.
parseInt
(
sysDictItem
.
getItemValue
());
}
//查询出组织机构下的所有仓库信息,并且将表中的仓库信息数据进行删除
List
<
WarehouseDto
>
allWarehouse
=
warehouseService
.
getAllWarehouse
(
orgId
,-
1
);
boolean
a
=
inventorySummaryMapper
.
deleteByWarehouse
(
allWarehouse
);
//根据仓库id重新计算汇总信息
boolean
sumByWarehouse
=
inventorySummaryMapper
.
getSumByWarehouse
(
allWarehouse
,
brokenNumberDays
);
return
(
a
&&
sumByWarehouse
);
}
}
//单警柜返回数据
//单警柜返回数据
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/OrderMainServiceImpl.java
View file @
3fd65719
...
@@ -1160,6 +1160,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
...
@@ -1160,6 +1160,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
if
(
CollectionUtil
.
isNotEmpty
(
updateInvList
)){
if
(
CollectionUtil
.
isNotEmpty
(
updateInvList
)){
//更新数据库中实体类的状态
//更新数据库中实体类的状态
LambdaUpdateWrapper
<
Inventory
>
wp1
=
Wrappers
.<
Inventory
>
lambdaUpdate
();
LambdaUpdateWrapper
<
Inventory
>
wp1
=
Wrappers
.<
Inventory
>
lambdaUpdate
();
if
(
orderMain
.
getBussinessType
().
equals
(
"destruction"
)){
req
.
setBussinessType
(
"destory"
);
}
wp1
.
set
(
Inventory:
:
getState
,
req
.
getBussinessType
())
wp1
.
set
(
Inventory:
:
getState
,
req
.
getBussinessType
())
.
set
(
Inventory:
:
getLocationState
,
req
.
getOrderType
());
.
set
(
Inventory:
:
getLocationState
,
req
.
getOrderType
());
LambdaUpdateWrapper
<
WarehouseInventory
>
wp2
=
Wrappers
.<
WarehouseInventory
>
lambdaUpdate
();
LambdaUpdateWrapper
<
WarehouseInventory
>
wp2
=
Wrappers
.<
WarehouseInventory
>
lambdaUpdate
();
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/PublicServiceImpl.java
View file @
3fd65719
...
@@ -97,28 +97,25 @@ public class PublicServiceImpl implements PublicService {
...
@@ -97,28 +97,25 @@ public class PublicServiceImpl implements PublicService {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
updateMessage
(
MessageReq
req
)
{
public
boolean
updateMessage
(
MessageReq
req
)
{
SysMessage
message
=
sysMessageService
.
getById
(
req
.
getMsgIdList
().
get
(
0
));
SysMessage
message
=
sysMessageService
.
getById
(
req
.
getMsgIdList
().
get
(
0
));
Long
bizId
=
message
.
getBizId
();
req
.
setBizId
(
message
.
getBizId
());
messageApi
.
updateMsgReadFlag
(
req
);
//将该条消息全设置为已读并且更新再推送一条消息
//将该条消息全设置为已读并且更新再推送一条消息
List
<
SysMessage
>
list
=
sysMessageService
.
list
(
new
LambdaQueryWrapper
<
SysMessage
>().
eq
(
SysMessage:
:
getBizId
,
bizId
));
List
<
SysMessage
>
list
=
sysMessageService
.
list
(
new
LambdaQueryWrapper
<
SysMessage
>().
eq
(
SysMessage:
:
getBizId
,
message
.
getBizId
()
));
// messageApi.batchReadFlagByMessageIds(StrUtil.join(",", new Object[]{idList}), MsgReadStateEnum.READ);
sysMessageService
.
update
(
new
LambdaUpdateWrapper
<
SysMessage
>()
.
set
(
SysMessage:
:
getReadFlag
,
1
)
.
eq
(
SysMessage:
:
getBizId
,
bizId
));
List
<
Long
>
userIdList
=
list
.
stream
().
map
(
SysMessage:
:
getReceiveUserId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
userIdList
=
list
.
stream
().
map
(
SysMessage:
:
getReceiveUserId
).
collect
(
Collectors
.
toList
());
userIdList
.
forEach
(
userId
->{
if
(
userId
!=
LoginContext
.
getContext
().
getLoginUser
().
getUserId
())
//非本人审核单据
MessageSendReq
sendReq
=
new
MessageSendReq
();
{
sendReq
.
setReceiveUserIds
(
userIdList
.
stream
()
MessageSendReq
sendReq
=
new
MessageSendReq
();
.
map
(
Object:
:
toString
)
sendReq
.
setReceiveUserIds
(
String
.
valueOf
(
userId
));
.
collect
(
Collectors
.
joining
(
","
)));
sendReq
.
setMsgTitle
(
"refresh"
);
sendReq
.
setMsgTitle
(
"refresh"
);
sendReq
.
setMsgContent
(
"消息更新"
);
sendReq
.
setMsgContent
(
"消息更新"
);
sendReq
.
setPriority
(
"1"
);
sendReq
.
setPriority
(
"1"
);
sendReq
.
setSendTime
(
DateTime
.
now
());
sendReq
.
setSendTime
(
DateTime
.
now
());
messageApi
.
sendMessageNoToken
(
sendReq
);
messageApi
.
sendMessageNoToken
(
sendReq
);
}
});
return
true
;
return
true
;
}
}
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/TjServiceImpl.java
View file @
3fd65719
package
com
.
junmp
.
jyzb
.
service
.
impl
;
package
com
.
junmp
.
jyzb
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -23,6 +25,7 @@ import com.junmp.jyzb.mapper.*;
...
@@ -23,6 +25,7 @@ import com.junmp.jyzb.mapper.*;
import
com.junmp.jyzb.service.InventorySummaryService
;
import
com.junmp.jyzb.service.InventorySummaryService
;
import
com.junmp.jyzb.service.PubOrgService
;
import
com.junmp.jyzb.service.PubOrgService
;
import
com.junmp.jyzb.service.TjService
;
import
com.junmp.jyzb.service.TjService
;
import
com.junmp.jyzb.utils.DateTimeUtil
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.common.util.HttpServletUtil
;
import
com.junmp.v2.common.util.HttpServletUtil
;
import
com.junmp.v2.db.api.factory.PageFactory
;
import
com.junmp.v2.db.api.factory.PageFactory
;
...
@@ -38,6 +41,7 @@ import javax.annotation.Resource;
...
@@ -38,6 +41,7 @@ import javax.annotation.Resource;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.Year
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.Executor
;
...
@@ -309,7 +313,7 @@ public class TjServiceImpl implements TjService {
...
@@ -309,7 +313,7 @@ public class TjServiceImpl implements TjService {
req
.
setColumn
(
req
.
getColumn
().
equals
(
"createTime"
)
req
.
setColumn
(
req
.
getColumn
().
equals
(
"createTime"
)
?
null
:
req
.
getColumn
().
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
());
?
null
:
req
.
getColumn
().
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
());
req
.
setOrder
((
req
.
getOrder
().
equals
(
"desc"
)||
req
.
getOrder
().
equals
(
"asc"
))
req
.
setOrder
((
req
.
getOrder
().
equals
(
"desc"
)||
req
.
getOrder
().
equals
(
"asc"
))
?
null
:
req
.
getOrder
().
toLowerCase
()
);
?
req
.
getOrder
().
toLowerCase
()
:
null
);
}
}
List
<
TjOrgEqsDto
>
allData
=
inventorySummaryMapper
.
getTotalDataDetail
(
String
.
valueOf
(
req
.
getOrgId
()),
req
.
getTypeIdsList
(),
req
.
getSizeNameList
(),
req
.
getLevelNum
(),
req
.
getLevel
(),
req
.
getColumn
(),
req
.
getOrder
());
List
<
TjOrgEqsDto
>
allData
=
inventorySummaryMapper
.
getTotalDataDetail
(
String
.
valueOf
(
req
.
getOrgId
()),
req
.
getTypeIdsList
(),
req
.
getSizeNameList
(),
req
.
getLevelNum
(),
req
.
getLevel
(),
req
.
getColumn
(),
req
.
getOrder
());
...
@@ -415,7 +419,7 @@ public class TjServiceImpl implements TjService {
...
@@ -415,7 +419,7 @@ public class TjServiceImpl implements TjService {
req
.
setColumn
(
req
.
getColumn
().
equals
(
"createTime"
)
req
.
setColumn
(
req
.
getColumn
().
equals
(
"createTime"
)
?
null
:
req
.
getColumn
().
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
());
?
null
:
req
.
getColumn
().
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
());
req
.
setOrder
((
req
.
getOrder
().
equals
(
"desc"
)||
req
.
getOrder
().
equals
(
"asc"
))
req
.
setOrder
((
req
.
getOrder
().
equals
(
"desc"
)||
req
.
getOrder
().
equals
(
"asc"
))
?
req
.
getOrder
().
toLowerCase
()
:
null
);
?
req
.
getOrder
().
toLowerCase
()
:
null
);
List
<
InventorySumDto
>
returnList
=
inventorySummaryMapper
.
TjOrgEqsDetail
(
req
.
getOrgId
(),
req
.
getTypeIdsList
(),
List
<
InventorySumDto
>
returnList
=
inventorySummaryMapper
.
TjOrgEqsDetail
(
req
.
getOrgId
(),
req
.
getTypeIdsList
(),
req
.
getSizeNameList
(),
req
.
getColumn
(),
req
.
getOrder
());
req
.
getSizeNameList
(),
req
.
getColumn
(),
req
.
getOrder
());
return
returnList
;
return
returnList
;
...
@@ -619,7 +623,7 @@ public class TjServiceImpl implements TjService {
...
@@ -619,7 +623,7 @@ public class TjServiceImpl implements TjService {
req
.
setColumn
(
req
.
getColumn
().
equals
(
"createTime"
)
req
.
setColumn
(
req
.
getColumn
().
equals
(
"createTime"
)
?
null
:
req
.
getColumn
().
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
());
?
null
:
req
.
getColumn
().
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
());
req
.
setOrder
((
req
.
getOrder
().
equals
(
"desc"
)||
req
.
getOrder
().
equals
(
"asc"
))
req
.
setOrder
((
req
.
getOrder
().
equals
(
"desc"
)||
req
.
getOrder
().
equals
(
"asc"
))
?
null
:
req
.
getOrder
().
toLowerCase
()
);
?
req
.
getOrder
().
toLowerCase
()
:
null
);
}
}
List
<
TjOrgPriceDto
>
returnList
=
priceSumSummaryMapper
.
TjOrgPriceDetail
(
req
.
getOrgId
(),
req
.
getYear
(),
List
<
TjOrgPriceDto
>
returnList
=
priceSumSummaryMapper
.
TjOrgPriceDetail
(
req
.
getOrgId
(),
req
.
getYear
(),
req
.
getTypeIdsList
(),
req
.
getSizeNameList
(),
req
.
getColumn
(),
req
.
getOrder
());
req
.
getTypeIdsList
(),
req
.
getSizeNameList
(),
req
.
getColumn
(),
req
.
getOrder
());
...
@@ -934,7 +938,7 @@ public class TjServiceImpl implements TjService {
...
@@ -934,7 +938,7 @@ public class TjServiceImpl implements TjService {
req
.
setColumn
(
req
.
getColumn
().
equals
(
"createTime"
)
req
.
setColumn
(
req
.
getColumn
().
equals
(
"createTime"
)
?
null
:
req
.
getColumn
().
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
());
?
null
:
req
.
getColumn
().
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
());
req
.
setOrder
((
req
.
getOrder
().
equals
(
"desc"
)||
req
.
getOrder
().
equals
(
"asc"
))
req
.
setOrder
((
req
.
getOrder
().
equals
(
"desc"
)||
req
.
getOrder
().
equals
(
"asc"
))
?
null
:
req
.
getOrder
().
toLowerCase
()
);
?
req
.
getOrder
().
toLowerCase
()
:
null
);
}
}
List
<
TjOrgCountDto
>
returnList
=
equipmentCountSummaryMapper
.
TjOrgCountDetail
(
req
.
getOrgId
(),
List
<
TjOrgCountDto
>
returnList
=
equipmentCountSummaryMapper
.
TjOrgCountDetail
(
req
.
getOrgId
(),
req
.
getTypeIdsList
(),
req
.
getSizeNameList
(),
req
.
getYear
(),
req
.
getTypeParentId
(),
req
.
getTypeIdsList
(),
req
.
getSizeNameList
(),
req
.
getYear
(),
req
.
getTypeParentId
(),
...
@@ -1060,7 +1064,16 @@ public class TjServiceImpl implements TjService {
...
@@ -1060,7 +1064,16 @@ public class TjServiceImpl implements TjService {
public
List
<
InventorySummary
>
GetCount
(
TjOrgCountReq
req
)
{
public
List
<
InventorySummary
>
GetCount
(
TjOrgCountReq
req
)
{
int
length
=
req
.
getFindCode
().
length
();
int
length
=
req
.
getFindCode
().
length
();
List
<
InventorySummary
>
tjOutAndInDtos
=
equipmentCountSummaryMapper
.
GetCount
(
req
,
length
);
List
<
InventorySummary
>
tjOutAndInDtos
=
equipmentCountSummaryMapper
.
GetCount
(
req
,
length
);
InventorySummary
inventorySummary
=
tjOutAndInDtos
.
get
(
0
);
req
.
setOrgId
(
inventorySummary
.
getOrgId
());
Year
now
=
Year
.
now
();
int
year
=
now
.
getValue
();
req
.
setStartTime
(
year
+
"-01"
);
req
.
setEndTime
(
year
+
"-12"
);
FinalTjOrgCountDto
finalTjOrgCountDto
=
TjOrgCountSum
(
req
);
inventorySummary
.
setUseCount
(
finalTjOrgCountDto
.
getUseCount
());
inventorySummary
.
setBrokenCount
(
finalTjOrgCountDto
.
getBrokenCount
());
inventorySummary
.
setFixCount
(
finalTjOrgCountDto
.
getFixCount
());
return
tjOutAndInDtos
;
return
tjOutAndInDtos
;
}
}
...
...
jyzb-biz/src/main/resources/mapper/EquipmentCountSummaryMapper.xml
View file @
3fd65719
差异被折叠。
点击展开。
jyzb-biz/src/main/resources/mapper/InventoryMapper.xml
View file @
3fd65719
...
@@ -36,6 +36,21 @@
...
@@ -36,6 +36,21 @@
production_date, warranty_period, maintenance_period, fix_count, price, create_time,
production_date, warranty_period, maintenance_period, fix_count, price, create_time,
update_time, note,area_id
update_time, note,area_id
</sql>
</sql>
<update
id=
"updateEqsInfo"
>
<foreach
collection=
"list"
item=
"item"
separator=
";"
>
update
base_inventory
<set>
size_id=(select DISTINCT id FROM base_equipment_size where name=#{item.sizeName} and
type_id =(select DISTINCT id FROM base_equipment_type where name=#{item.typeName} limit 1) limit 1),
type_id=(select DISTINCT id FROM base_equipment_type where name=#{item.typeName} limit 1),
location_id=(select DISTINCT id FROM base_warehouse where name=#{item.locationId} limit 1),
state="normal",bussiness_type="normal",update_time=#{updateTime},property=0,epc_type=1,location_state="in",
location_type=0
</set>
where note ="equipmentImport"
</foreach>
</update>
<select
id=
"GetViewCountByepcs"
resultType=
"com.junmp.jyzb.api.bean.dto.EpcListDto"
>
<select
id=
"GetViewCountByepcs"
resultType=
"com.junmp.jyzb.api.bean.dto.EpcListDto"
>
...
@@ -701,6 +716,48 @@
...
@@ -701,6 +716,48 @@
left JOIN base_supplier bs ON bs.id = t2.supplier_id
left JOIN base_supplier bs ON bs.id = t2.supplier_id
</select>
</select>
<select
id=
"GetByPeriodAndDate"
resultType=
"com.junmp.jyzb.api.bean.PeriodAndDateDto"
>
select count(*) as zkCount,location_id,max(location_name) as location_name,warranty_period,production_date,price as unit_price,org_id FROM(
SELECT a.*,b.warranty_period,b.production_date,b.price FROM
(SELECT org_id,size_id,type_id,location_id,epc,location_name FROM `base_warehouse_inventory` wi
where org_id=#{req.orgId} and type_id=#{req.typeId}
and size_id=#{req.sizeId}
and location_state="in" and location_type=0
<if
test=
"req.epcType ==1"
>
and epc_type=1
</if>
<if
test=
"req.locationName != null and req.locationName != ''"
>
and location_name like CONCAT('%', req.locationName, '%')
</if>
)as a
left join (
select epc,warranty_period,production_date,price
FROM base_inventory bi where org_id_int=#{req.orgId}
and type_id=#{req.typeId} and size_id=#{req.sizeId}
and location_state="in" and location_type=0
<if
test=
"req.epcType ==1"
>
and epc_type=1
</if>
)as b on a.epc=b.epc
) as t group by location_id,price,warranty_period,production_date
having 1=1
<if
test=
"req.price != null and req.price!= ''"
>
and price =#{req.price}
</if>
<if
test=
"req.zkCount != null and req.zkCount !=''"
>
and zkCount =#{req.zkCount}
</if>
<if
test=
"req.warrantyPeriod != null and req.warrantyPeriod !=''"
>
and warranty_period =#{req.warrantyPeriod}
</if>
<if
test=
"req.startTime!= null and req.startTime !=''"
>
and production_date > #{req.startTime}
</if>
<if
test=
"req.endTime!= null and req.endTime !=''"
>
and production_date
<
#{req.endTime}
</if>
</select>
<select
id=
"EqsByStateSum"
resultType=
"java.lang.Integer"
>
<select
id=
"EqsByStateSum"
resultType=
"java.lang.Integer"
>
select count(*) from (
select count(*) from (
...
@@ -747,41 +804,6 @@
...
@@ -747,41 +804,6 @@
</if>
</if>
</select>
</select>
<select
id=
"GetByPeriodAndDate"
resultType=
"com.junmp.jyzb.api.bean.PeriodAndDateDto"
>
select count(*) as zkCount,location_id,max(location_name) as location_name,warranty_period,production_date,price as unit_price,org_id FROM(
SELECT a.*,b.warranty_period,b.production_date,b.price FROM
(SELECT org_id,size_id,type_id,location_id,epc,location_name FROM `base_warehouse_inventory` wi
where org_id=#{req.orgId} and type_id=#{req.typeId}
and size_id=#{req.sizeId}
and location_state="in" and location_type=0
<if
test=
"req.locationName != null and req.locationName != ''"
>
and location_name like CONCAT('%', req.locationName, '%')
</if>
)as a
left join (
select epc,warranty_period,production_date,price
FROM base_inventory bi where org_id_int=#{req.orgId}
and type_id=#{req.typeId} and size_id=#{req.sizeId}
and location_state="in" and location_type=0)as b on a.epc=b.epc
) as t group by location_id,price,warranty_period,production_date
having 1=1
<if
test=
"req.price != null and req.price!= ''"
>
and price =#{req.price}
</if>
<if
test=
"req.zkCount != null and req.zkCount !=''"
>
and zkCount =#{req.zkCount}
</if>
<if
test=
"req.warrantyPeriod != null and req.warrantyPeriod !=''"
>
and warranty_period =#{req.warrantyPeriod}
</if>
<if
test=
"req.startTime!= null and req.startTime !=''"
>
and production_date > #{req.startTime}
</if>
<if
test=
"req.endTime!= null and req.endTime !=''"
>
and production_date
<
#{req.endTime}
</if>
</select>
<select
id=
"getEqsInfo"
resultType=
"com.junmp.jyzb.entity.Inventory"
>
<select
id=
"getEqsInfo"
resultType=
"com.junmp.jyzb.entity.Inventory"
>
SELECT wi.id as inventoryId,wi.type_id,wi.size_id,wi.shelf_id,wi.shelf_location, wi.epc,wi.org_id,wi.location_state,
SELECT wi.id as inventoryId,wi.type_id,wi.size_id,wi.shelf_id,wi.shelf_location, wi.epc,wi.org_id,wi.location_state,
wi.type_name,wi.org_name,wi.size_name,wi.location_name,
wi.type_name,wi.org_name,wi.size_name,wi.location_name,
...
...
jyzb-biz/src/main/resources/mapper/InventorySummaryMapper.xml
View file @
3fd65719
...
@@ -87,6 +87,12 @@
...
@@ -87,6 +87,12 @@
END
END
WHERE add_price IS NULL OR add_num IS NULL;
WHERE add_price IS NULL OR add_num IS NULL;
</update>
</update>
<insert
id=
"updateSummaryInsByOrder"
statementType=
"CALLABLE"
>
{CALL UpdateInventorySummaryByOrgId(#{orgId, mode=IN})}
</insert>
<insert
id=
"setWarrantyInventoryAction"
statementType=
"CALLABLE"
>
<insert
id=
"setWarrantyInventoryAction"
statementType=
"CALLABLE"
>
{CALL Insert_into_base_warranty_inventory()}
{CALL Insert_into_base_warranty_inventory()}
...
@@ -602,7 +608,7 @@
...
@@ -602,7 +608,7 @@
<if
test=
"column != null and column != '' and order != null and order != '' "
>
<if
test=
"column != null and column != '' and order != null and order != '' "
>
order by ${column} ${order}
order by ${column} ${order}
</if>
</if>
<if
test=
"column == null
and order == null
"
>
<if
test=
"column == null"
>
ORDER BY type_id
ORDER BY type_id
</if>
</if>
...
@@ -762,12 +768,13 @@
...
@@ -762,12 +768,13 @@
select count(*) from (
select count(*) from (
SELECT wi.type_id,wi.size_id,wi.shelf_id,wi.shelf_location, wi.epc,wi.org_id,wi.location_state,wi.location_name,wi.type_name,wi.size_name,wi.org_name,
SELECT wi.type_id,wi.size_id,wi.shelf_id,wi.shelf_location, wi.epc,wi.org_id,wi.location_state,wi.location_name,wi.type_name,wi.size_name,wi.org_name,
wi.location_type,wi.location_id,i.id,i.supplier_id,i.price,i.state,i.bussiness_state,
wi.location_type,wi.location_id,i.id,i.supplier_id,i.price,i.state,i.bussiness_state,
i.production_date,i.warranty_period,i.maintenance_period, i.
term_state,i.
property,
i.production_date,i.warranty_period,i.maintenance_period, i.property,
i.area_id,
i.area_id,
bs.name as supplier_name,
bs.name as supplier_name,
(select instructions FROM base_equipment_type where id=#{req.typeId}) as instructions,
(select instructions FROM base_equipment_type where id=#{req.typeId}) as instructions,
(select photo FROM base_equipment_type where id=#{req.typeId}) as type_photo,
(select photo FROM base_equipment_type where id=#{req.typeId}) as type_photo,
es.photo as size_photo
es.photo as size_photo,
(case when DATE_ADD(i.production_date, INTERVAL i.warranty_period MONTH) > NOW() or i.warranty_period = 0 then 0 else 1 end)as term_state
FROM base_warehouse_inventory wi
FROM base_warehouse_inventory wi
LEFT JOIN base_inventory i ON i.epc = wi.epc
LEFT JOIN base_inventory i ON i.epc = wi.epc
LEFT JOIN base_equipment_size es ON wi.size_id = es.id
LEFT JOIN base_equipment_size es ON wi.size_id = es.id
...
@@ -779,8 +786,11 @@
...
@@ -779,8 +786,11 @@
<if
test=
"req.locationId != null and req.locationId != ''"
>
<if
test=
"req.locationId != null and req.locationId != ''"
>
and wi.location_id =#{req.locationId}
and wi.location_id =#{req.locationId}
</if>
</if>
<if
test=
"req.termState!= -1"
>
<if
test=
"req.termState== 1"
>
and i.term_state=#{req.termState}
and DATE_ADD(i.production_date, INTERVAL i.warranty_period MONTH)
<
NOW() and i.warranty_period != 0
</if>
<if
test=
"req.termState== 0"
>
and (DATE_ADD(i.production_date, INTERVAL i.warranty_period MONTH) > NOW() or i.warranty_period = 0)
</if>
</if>
<if
test=
"req.locationState!='all' and req.locationState !=null and req.locationState!=''"
>
<if
test=
"req.locationState!='all' and req.locationState !=null and req.locationState!=''"
>
and i.location_state=#{req.locationState}
and i.location_state=#{req.locationState}
...
@@ -804,26 +814,29 @@
...
@@ -804,26 +814,29 @@
SELECT wi.type_id,wi.size_id,wi.shelf_id,wi.shelf_location, wi.epc,wi.org_id,wi.location_state,wi.location_name,wi.type_name,wi.size_name,wi.org_name,
SELECT wi.type_id,wi.size_id,wi.shelf_id,wi.shelf_location, wi.epc,wi.org_id,wi.location_state,wi.location_name,wi.type_name,wi.size_name,wi.org_name,
wi.location_type,wi.location_id,i.id,i.supplier_id,i.price,i.state,i.bussiness_state,
wi.location_type,wi.location_id,i.id,i.supplier_id,i.price,i.state,i.bussiness_state,
i.production_date,i.warranty_period,i.maintenance_period,
i.term_state,
i.property,
i.production_date,i.warranty_period,i.maintenance_period,i.property,
i.area_id,
i.area_id,
bs.name as supplier_name,
bs.name as supplier_name,
es.instructions as instructions,
es.instructions as instructions,
(select photo FROM base_equipment_type where id=#{req.typeId}) as type_photo,
(select photo FROM base_equipment_type where id=#{req.typeId}) as type_photo,
es.photo as size_photo
es.photo as size_photo,
(case when DATE_ADD(i.production_date, INTERVAL i.warranty_period MONTH) > NOW() or i.warranty_period = 0 then 0 else 1 end)as term_state
FROM base_warehouse_inventory wi
FROM base_warehouse_inventory wi
LEFT JOIN base_inventory i ON i.epc = wi.epc
LEFT JOIN base_inventory i ON i.epc = wi.epc
LEFT JOIN base_equipment_size es ON wi.size_id = es.id
LEFT JOIN base_equipment_size es ON wi.size_id = es.id
LEFT JOIN base_supplier bs ON bs.id = i.supplier_id
LEFT JOIN base_supplier bs ON bs.id = i.supplier_id
WHERE wi.org_id=#{req.orgId} and wi.type_id=#{req.typeId} and i.state !="destory"
WHERE wi.org_id=#{req.orgId} and wi.type_id=#{req.typeId} and i.state !="destory"
<if
test=
"req.locationType !='all' and req.locationType != null"
>
<if
test=
"req.locationType !='all' and req.locationType != null"
>
and wi.location_type=#{req.locationType}
and wi.location_type=#{req.locationType}
</if>
</if>
<if
test=
"req.locationId != null and req.locationId != ''"
>
<if
test=
"req.locationId != null and req.locationId != ''"
>
and wi.location_id =#{req.locationId}
and wi.location_id =#{req.locationId}
</if>
</if>
<if
test=
"req.termState!= -1"
>
<if
test=
"req.termState== 1"
>
and i.term_state=#{req.termState}
and DATE_ADD(i.production_date, INTERVAL i.warranty_period MONTH)
<
NOW() and i.warranty_period != 0
</if>
<if
test=
"req.termState== 0"
>
and (DATE_ADD(i.production_date, INTERVAL i.warranty_period MONTH) > NOW() or i.warranty_period = 0)
</if>
</if>
<if
test=
"req.locationState!='all' and req.locationState !=null and req.locationState!=''"
>
<if
test=
"req.locationState!='all' and req.locationState !=null and req.locationState!=''"
>
and i.location_state=#{req.locationState}
and i.location_state=#{req.locationState}
...
@@ -840,6 +853,9 @@
...
@@ -840,6 +853,9 @@
<if
test=
"req.maintenancePeriod != null and req.maintenancePeriod != ''"
>
<if
test=
"req.maintenancePeriod != null and req.maintenancePeriod != ''"
>
and i.maintenance_period=#{req.maintenancePeriod}
and i.maintenance_period=#{req.maintenancePeriod}
</if>
</if>
<if
test=
"req.state !='all' and req.state !=''"
>
and i.state=#{req.state}
</if>
ORDER BY wi.type_id,i.size_id
ORDER BY wi.type_id,i.size_id
<if
test=
"req.pageNo != null and req.pageSize != null"
>
<if
test=
"req.pageNo != null and req.pageSize != null"
>
limit #{req.pageNo},#{req.pageSize}
limit #{req.pageNo},#{req.pageSize}
...
...
jyzb-biz/src/main/resources/mapper/WarehouseInventoryMapper.xml
View file @
3fd65719
...
@@ -29,4 +29,18 @@
...
@@ -29,4 +29,18 @@
update_time,update_user,create_user,
update_time,update_user,create_user,
location_state,shelf_location,shelf_id
location_state,shelf_location,shelf_id
</sql>
</sql>
<update
id=
"updateWareInfo"
>
<foreach
collection=
"list"
item=
"item"
separator=
";"
>
update
base_warehouse_inventory
<set>
size_id=(select DISTINCT id FROM base_equipment_size where name=#{item.sizeName} and
type_id =(select DISTINCT id FROM base_equipment_type where name=#{item.typeName} limit 1) limit 1),
type_id=(select DISTINCT id FROM base_equipment_type where name=#{item.typeName} limit 1),
location_id=(select DISTINCT id FROM base_warehouse where name=#{item.locationId} limit 1),
update_time=#{updateTime},epc_type=1,location_state="in",location_type=0
</set>
where flag =2
</foreach>
</update>
</mapper>
</mapper>
jyzb-boot/src/main/resources/application-local.yml
View file @
3fd65719
...
@@ -4,8 +4,8 @@ scanner:
...
@@ -4,8 +4,8 @@ scanner:
easy-es
:
easy-es
:
enable
:
true
enable
:
true
address
:
192.168.3.121:9200
address
:
192.168.3.121:9200
username
:
username
:
elastic
password
:
password
:
junmp123
thing
:
thing
:
server
:
server
:
websocket
:
websocket
:
...
@@ -42,7 +42,7 @@ spring:
...
@@ -42,7 +42,7 @@ spring:
redis
:
redis
:
#host: 192.168.3.188
#host: 192.168.3.188
host
:
192.168.3.1
21
host
:
192.168.3.1
88
port
:
6379
port
:
6379
database
:
1
database
:
1
password
:
password
:
...
...
jyzb-boot/src/main/resources/application-prod.yml
View file @
3fd65719
...
@@ -4,8 +4,8 @@ scanner:
...
@@ -4,8 +4,8 @@ scanner:
easy-es
:
easy-es
:
enable
:
true
enable
:
true
address
:
192.168.3.121:9200
address
:
192.168.3.121:9200
username
:
username
:
elastic
password
:
password
:
junmp123
thing
:
thing
:
server
:
server
:
websocket
:
websocket
:
...
@@ -36,7 +36,7 @@ knife4j:
...
@@ -36,7 +36,7 @@ knife4j:
spring
:
spring
:
datasource
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://192.168.1.128:3306/db_jyzb
_test
?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
url
:
jdbc:mysql://192.168.1.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username
:
root
username
:
root
password
:
123456
password
:
123456
...
...
jyzb-boot/src/main/resources/application.yml
View file @
3fd65719
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
easy-es
:
easy-es
:
enable
:
true
enable
:
true
address
:
192.168.3.121:9200
address
:
192.168.3.121:9200
username
:
username
:
elastic
password
:
password
:
junmp123
server
:
server
:
tomcat
:
tomcat
:
uri-encoding
:
UTF-8
#tomcat编码
uri-encoding
:
UTF-8
#tomcat编码
...
...
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/FlowTaskServiceImpl.java
View file @
3fd65719
...
@@ -301,7 +301,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
...
@@ -301,7 +301,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
String
bussinessType
=
MapUtil
.
getStr
(
processInstance
.
getProcessVariables
(),
BUSSINESS_TYPE
);
String
bussinessType
=
MapUtil
.
getStr
(
processInstance
.
getProcessVariables
(),
BUSSINESS_TYPE
);
sendReq
.
setReceiveUserIds
(
String
.
valueOf
(
user
.
getUserId
()));
sendReq
.
setReceiveUserIds
(
String
.
valueOf
(
user
.
getUserId
()));
// sendReq.setBizId(Long.valueOf(processInstance.getProcessInstanceId()));
// sendReq.setBizId(Long.valueOf(processInstance.getProcessInstanceId()));
sendReq
.
setMsgTitle
(
"您的
审批
被驳回"
);
sendReq
.
setMsgTitle
(
"您的
申请
被驳回"
);
sendReq
.
setBizType
(
"refuse/"
+
Types
);
sendReq
.
setBizType
(
"refuse/"
+
Types
);
sendReq
.
setBizId
(
Long
.
valueOf
(
task
.
getProcessInstanceId
()));
sendReq
.
setBizId
(
Long
.
valueOf
(
task
.
getProcessInstanceId
()));
sendReq
.
setMsgContent
(
"您提交的审批【"
+
mainProcess
.
getName
()+
"】被驳回,原因:"
+
comments
);
sendReq
.
setMsgContent
(
"您提交的审批【"
+
mainProcess
.
getName
()+
"】被驳回,原因:"
+
comments
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论