Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
cloud-fb
Commits
920a99d1
Commit
920a99d1
authored
Apr 28, 2021
by
高晓磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调价修改为只不可新增已通过的数据.砂石预警设置中isopen改为true
parent
bb84bd2d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
52 additions
and
36 deletions
+52
-36
SandMiningAreaServiceImpl.java
...dinas/biz/internal/service/SandMiningAreaServiceImpl.java
+1
-1
PriceAdjustmentConstant.java
...om/xyst/dinas/price/constant/PriceAdjustmentConstant.java
+3
-0
PriceAdjustmentDaoImpl.java
...xyst/dinas/price/internal/dao/PriceAdjustmentDaoImpl.java
+5
-5
PriceAdjustmentServiceImpl.java
...as/price/internal/service/PriceAdjustmentServiceImpl.java
+5
-3
PriceAdjustmentController.java
...a/com/xyst/dinas/price/web/PriceAdjustmentController.java
+4
-7
ProductionPlanReportDao.java
...om/xyst/dinas/production/dao/ProductionPlanReportDao.java
+1
-1
ProductionPlanReportDaoImpl.java
.../production/internal/dao/ProductionPlanReportDaoImpl.java
+18
-4
DischargingServiceImpl.java
...s/production/internal/service/DischargingServiceImpl.java
+11
-11
ProductionPlanReportServiceImpl.java
...ion/internal/service/ProductionPlanReportServiceImpl.java
+1
-1
ProductionPlanReportService.java
...dinas/production/service/ProductionPlanReportService.java
+1
-1
ProductionPlanReportController.java
.../dinas/production/web/ProductionPlanReportController.java
+2
-2
No files found.
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/service/SandMiningAreaServiceImpl.java
View file @
920a99d1
...
...
@@ -80,7 +80,7 @@ public class SandMiningAreaServiceImpl implements SandMiningAreaService {
warnSetting
.
setBillId
(
kobject
.
getUuid
(
"id"
));
warnSetting
.
setTarget
(
SandMiningAreaConstant
.
SAND_MINING_AREA_WARN_TARGET
);
warnSetting
.
setTargetType
(
WarnTargetTypeEnum
.
NUMBER_TYPE
.
name
());
warnSetting
.
setOpen
(
fals
e
);
warnSetting
.
setOpen
(
tru
e
);
warnSetting
.
setMemo
(
getAreaWarningInfo
(
kobject
));
warnSetting
.
setWarnCalculator
(
SandMiningAreaConstant
.
warnCalculator
);
warningSettingService
.
insertWarnSetting
(
warnSetting
);
...
...
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/constant/PriceAdjustmentConstant.java
View file @
920a99d1
package
com
.
xyst
.
dinas
.
price
.
constant
;
/**
* @author scol
*/
public
interface
PriceAdjustmentConstant
{
/**
...
...
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/internal/dao/PriceAdjustmentDaoImpl.java
View file @
920a99d1
...
...
@@ -106,7 +106,7 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
bean
.
getName
());
detachedCriteria
.
add
(
Restrictions
.
eq
(
BaseConstants
.
DEL
,
false
));
detachedCriteria
.
add
(
Restrictions
.
in
(
"station.id"
,
id
));
detachedCriteria
.
add
(
Restrictions
.
in
(
"applyStatus"
,
BizProcessState
.
IN_PROCESS
.
getValue
()
,
BizProcessState
.
DONE_WITH_REJECT
.
getValue
()
));
detachedCriteria
.
add
(
Restrictions
.
in
(
"applyStatus"
,
BizProcessState
.
IN_PROCESS
.
getValue
()));
detachedCriteria
.
addOrder
(
Order
.
desc
(
"adjustmentDate"
));
List
<
KObject
>
byCriteria
=
(
List
<
KObject
>)
template
.
findByCriteria
(
detachedCriteria
,
0
,
1
);
return
byCriteria
;
...
...
@@ -355,7 +355,7 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
private
List
<
PriceAdjustmentEchartReturnEntity
>
getPriceAdjustmentEchartReturnEntities
(
List
<
HashMap
<
String
,
Object
>>
byCriteria
,
Date
adjustmentStartDate
,
Date
adjustmentEndDate
)
{
PriceAdjustmentEchartReturnEntity
priceAdjustmentEchartReturnEntity
;
List
<
PriceAdjustmentEchartReturnEntity
>
priceAdjustmentEchartReturnEntities
=
new
ArrayList
<>();
HashMap
<
String
,
PriceAdjustmentEchartReturnEntity
>
priceAdjustmentEchartReturnHashMap
=
new
HashMap
<>();
HashMap
<
String
,
PriceAdjustmentEchartReturnEntity
>
priceAdjustmentEchartReturnHashMap
=
new
HashMap
<>(
12
);
StationDetailEntity
stationDetailEntity
;
HashMap
<
String
,
StationDetailEntity
>
stationDetail
=
new
HashMap
<>();
...
...
@@ -455,13 +455,13 @@ public class PriceAdjustmentDaoImpl extends AbstractBaseDao implements PriceAdju
@Override
public
UUID
create
(
KObject
kObject
)
{
KObject
staff
=
AminoContextHolder
.
getContext
().
getStaff
();
if
(
null
==
kObject
.
getUuid
(
"id"
))
{
kObject
.
set
(
"id"
,
UUID
.
randomUUID
());
if
(
null
==
kObject
.
getUuid
(
BaseConstants
.
ID
))
{
kObject
.
set
(
BaseConstants
.
ID
,
UUID
.
randomUUID
());
}
kObject
.
set
(
"regionalCompany"
,
dinasTypeDao
.
getCurrentLoginRegionalCompany
());
kObject
.
set
(
BaseConstants
.
CREATOR
,
staff
);
kObject
.
set
(
BaseConstants
.
CREATE_TIME
,
new
Date
());
kObject
.
set
(
"del"
,
false
);
kObject
.
set
(
BaseConstants
.
DEL
,
false
);
return
((
UUID
)
template
.
save
(
kObject
));
}
...
...
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/internal/service/PriceAdjustmentServiceImpl.java
View file @
920a99d1
...
...
@@ -3,6 +3,7 @@ package com.xyst.dinas.price.internal.service;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bap.workflow.core.BizProcessState
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.inz.common.BaseConstants
;
import
com.xyst.dinas.price.dao.PriceAdjustmentDao
;
import
com.xyst.dinas.price.entity.PriceAdjustmentEchartReturnEntity
;
import
com.xyst.dinas.price.entity.PriceAdjustmentEchartSearchEntity
;
...
...
@@ -134,15 +135,16 @@ public class PriceAdjustmentServiceImpl implements PriceAdjustmentService {
@Override
public
void
update
(
KObject
kobject
)
{
priceAdjustmentDao
.
modify
(
kobject
);
//审批通过后获取 同一天生效时间 && 创建时间小于该条记录 && 已审批 的记录,将其改为
驳回
//审批通过后获取 同一天生效时间 && 创建时间小于该条记录 && 已审批 的记录,将其改为
失效
List
<
KObject
>
kObjects
=
priceAdjustmentDao
.
getSameAdjustmentDateAndLtCreateDate
(
kobject
);
if
(
null
==
kObjects
)
{
return
;
}
for
(
KObject
kObject
:
kObjects
)
{
// kObject.set("applyStatus", BizProcessState.DONE_WITH_REJECT.getValue());
if
(
kObject
.
getString
(
BaseConstants
.
ID
).
equals
(
kObject
.
getString
(
BaseConstants
.
ID
))){
continue
;
}
kObject
.
set
(
"adjustmentStatus"
,
PriceAdjustmentAdjustmentStatusEnum
.
ABOLITION
.
getValue
());
// kObject.set("failureReason", "本条数据所属生效日已有新记录审批通过,本条系统自动废弃");
priceAdjustmentDao
.
modify
(
kObject
);
}
...
...
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/web/PriceAdjustmentController.java
View file @
920a99d1
...
...
@@ -174,7 +174,7 @@ public class PriceAdjustmentController {
}
KObject
priceAdjustment
=
priceAdjustmentService
.
validateByStationId
(
id
);
if
(
null
!=
priceAdjustment
){
return
ResponseObj
.
error
(
"有正在审批
或者未通过
的数据,不可新建"
,
priceAdjustment
);
return
ResponseObj
.
error
(
"有正在审批的数据,不可新建"
,
priceAdjustment
);
}
return
ResponseObj
.
success
(
"可以新增"
);
...
...
@@ -218,7 +218,7 @@ public class PriceAdjustmentController {
@GetMapping
(
"getSameMessage"
)
public
ResponseObj
getSameAdjustmentDateAndLtCreateDateInfo
(
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@RequestParam
(
"adjustmentDate"
)
Date
adjustmentDate
,
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@RequestParam
(
"createTime"
)
Date
createTime
,
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@RequestParam
(
"stationId"
)
UUID
stationId
){
List
<
KObject
>
sameAdjustmentDateAndLtCreateDateInfo
=
priceAdjustmentService
.
getSameAdjustmentDateAndLtCreateDateInfo
(
adjustmentDate
,
createTime
,
stationId
);
if
(
CollectionUtils
.
isEmpty
(
sameAdjustmentDateAndLtCreateDateInfo
)){
if
(
!
CollectionUtils
.
isEmpty
(
sameAdjustmentDateAndLtCreateDateInfo
)){
String
formart1DateString
=
DateTimeUtils
.
getFormart1DateString
(
adjustmentDate
);
String
message
=
"检查到该场站生效日期为["
+
formart1DateString
+
"]下有"
+
sameAdjustmentDateAndLtCreateDateInfo
.
size
()+
"条早先创建并审批通过的记录,当该记录提交审批通过后,会将其它记录置为失效"
;
return
ResponseObj
.
error
(
message
,
sameAdjustmentDateAndLtCreateDateInfo
);
...
...
@@ -234,8 +234,8 @@ public class PriceAdjustmentController {
@GetMapping
(
"getSameMessageById"
)
public
ResponseObj
getSameById
(
@RequestParam
(
"id"
)
UUID
id
){
KObject
byId
=
priceAdjustmentService
.
getById
(
id
);
List
<
KObject
>
sameAdjustmentDateAndLtCreateDateInfo
=
priceAdjustmentService
.
getSameAdjustmentDateAndLtCreateDateInfo
(
byId
.
getDate
(
"adjustmentDate"
),
byId
.
getDate
(
"createTime"
)
,
byId
.
get
(
"station"
).
getUuid
(
"
I
d"
));
if
(
CollectionUtils
.
isEmpty
(
sameAdjustmentDateAndLtCreateDateInfo
)){
List
<
KObject
>
sameAdjustmentDateAndLtCreateDateInfo
=
priceAdjustmentService
.
getSameAdjustmentDateAndLtCreateDateInfo
(
byId
.
getDate
(
"adjustmentDate"
),
byId
.
getDate
(
"createTime"
)
,
byId
.
get
(
"station"
).
getUuid
(
"
i
d"
));
if
(
!
CollectionUtils
.
isEmpty
(
sameAdjustmentDateAndLtCreateDateInfo
)){
String
formart1DateString
=
DateTimeUtils
.
getFormart1DateString
(
byId
.
getDate
(
"adjustmentDate"
));
String
message
=
"检查到该场站生效日期为["
+
formart1DateString
+
"]下有"
+
sameAdjustmentDateAndLtCreateDateInfo
.
size
()+
"条早先创建并审批通过的记录,当该记录提交审批通过后,会将其它记录置为失效"
;
return
ResponseObj
.
error
(
message
,
sameAdjustmentDateAndLtCreateDateInfo
);
...
...
@@ -243,6 +243,4 @@ public class PriceAdjustmentController {
return
ResponseObj
.
success
();
}
}
\ No newline at end of file
backend/xyst.dinas.production/src/main/java/com/xyst/dinas/production/dao/ProductionPlanReportDao.java
View file @
920a99d1
...
...
@@ -33,6 +33,6 @@ public interface ProductionPlanReportDao extends BaseDao {
void
deleteByStationAndDate
(
UUID
stationId
,
Date
convertStringToDate1
);
List
<
KObject
>
getNoWareHousing
(
List
<
UUID
>
productionLineIds
);
List
<
KObject
>
getNoWareHousing
(
UUID
productionPlanId
);
}
backend/xyst.dinas.production/src/main/java/com/xyst/dinas/production/internal/dao/ProductionPlanReportDaoImpl.java
View file @
920a99d1
...
...
@@ -57,7 +57,7 @@ public class ProductionPlanReportDaoImpl extends AbstractBaseDao implements Prod
detachedCriteria
.
add
(
Restrictions
.
ge
(
"productionPlanDate"
,
startDate
));
}
if
(
null
!=
endDate
)
{
detachedCriteria
.
add
(
Restrictions
.
le
(
"productionPlanDate"
,
start
Date
));
detachedCriteria
.
add
(
Restrictions
.
le
(
"productionPlanDate"
,
end
Date
));
}
dinasTypeDao
.
addRegionalCompanyFilter
(
detachedCriteria
);
...
...
@@ -235,19 +235,33 @@ public class ProductionPlanReportDaoImpl extends AbstractBaseDao implements Prod
}
@Override
public
List
<
KObject
>
getNoWareHousing
(
List
<
UUID
>
productionLineIds
)
{
public
List
<
KObject
>
getNoWareHousing
(
UUID
productionPlanId
)
{
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
ENTITY
);
detachedCriteria
.
add
(
Restrictions
.
eq
(
BaseConstants
.
DEL
,
false
));
if
(
CollectionUtils
.
isEmpty
(
productionLineIds
)
)
{
if
(
null
==
productionPlanId
)
{
detachedCriteria
.
add
(
Restrictions
.
le
(
"productionPlanDate"
,
new
Date
()));
}
else
{
detachedCriteria
.
add
(
Restrictions
.
in
(
"id"
,
productionLineIds
));
//根据单条生产计划id查询该场站今天所有的生产计划
List
<
UUID
>
ids
=
getAllByOne
(
productionPlanId
);
assert
ids
!=
null
;
detachedCriteria
.
add
(
Restrictions
.
in
(
"id"
,
ids
));
}
detachedCriteria
.
add
(
Restrictions
.
eq
(
"warehousingStatus"
,
false
));
return
(
List
<
KObject
>)
template
.
findByCriteria
(
detachedCriteria
);
}
private
List
<
UUID
>
getAllByOne
(
UUID
productionPlanId
)
{
KObject
load
=
load
(
productionPlanId
);
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
ENTITY
);
detachedCriteria
.
add
(
Restrictions
.
eq
(
BaseConstants
.
DEL
,
false
));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"productionPlanDate"
,
load
.
getDate
(
"productionPlanDate"
)));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"station.id"
,
load
.
get
(
"station"
).
getUuid
(
"id"
)));
detachedCriteria
.
setProjection
(
Projections
.
projectionList
().
add
(
Projections
.
distinct
(
Projections
.
property
(
"id"
))));
return
(
List
<
UUID
>)
template
.
findByCriteria
(
detachedCriteria
);
}
/**
* 抽象方法,需要实现类提供HibernateTemplate
*
...
...
backend/xyst.dinas.production/src/main/java/com/xyst/dinas/production/internal/service/DischargingServiceImpl.java
View file @
920a99d1
...
...
@@ -29,8 +29,8 @@ public class DischargingServiceImpl implements DischargingService {
@Autowired
private
DischargingDao
dischargingDao
;
@Autowired
private
WarningService
warningService
;
@Autowired
private
WarningService
warningService
;
@Autowired
private
StationDao
stationDao
;
@Autowired
...
...
@@ -59,9 +59,9 @@ public class DischargingServiceImpl implements DischargingService {
}
@Override
public
List
<
HashMap
<
String
,
Object
>>
groupInfoByYear
(
List
<
UUID
>
regionalCompanyIds
,
Integer
year
,
Boolean
isGroupByMonth
,
Boolean
isGroupByRegionalCompany
,
Boolean
isGroupBySandMiningArea
)
{
public
List
<
HashMap
<
String
,
Object
>>
groupInfoByYear
(
List
<
UUID
>
regionalCompanyIds
,
Integer
year
,
Boolean
isGroupByMonth
,
Boolean
isGroupByRegionalCompany
,
Boolean
isGroupBySandMiningArea
)
{
return
dischargingDao
.
groupInfo
(
regionalCompanyIds
,
year
,
isGroupByMonth
,
isGroupByRegionalCompany
,
isGroupBySandMiningArea
);
return
dischargingDao
.
groupInfo
(
regionalCompanyIds
,
year
,
isGroupByMonth
,
isGroupByRegionalCompany
,
isGroupBySandMiningArea
);
}
@Override
...
...
@@ -97,7 +97,7 @@ public class DischargingServiceImpl implements DischargingService {
//生成预警消息的逻辑 如果是小于当前年份的记录,不生成预警
//如果已有parentId 也不触发预警
Boolean
ltYear
=
DateTimeUtils
.
isLtNowYear
(
dischargingTime
);
if
(!
ltYear
&&
kObject
.
getUuid
(
"parentId"
)
!=
null
)
{
if
(!
ltYear
&&
kObject
.
getUuid
(
"parentId"
)
!=
null
)
{
setWarningRecord
(
sandMiningAreaId
,
dischargingTime
,
sandMiningArea
);
}
return
uuid
;
...
...
@@ -107,14 +107,14 @@ public class DischargingServiceImpl implements DischargingService {
//查询某个采区下某的开采量
Double
allDischargingWeightByYearAndSandAreaId
=
dischargingDao
.
getAllDischargingWeightByYearAndSandAreaId
(
dischargingTime
,
billId
);
SandAreaDinasCountWarningCalculate
sandAreaDinasCountWarningCalculate
=
new
SandAreaDinasCountWarningCalculate
(
allDischargingWeightByYearAndSandAreaId
,
sandMiningArea
.
getString
(
"sandMiningAreaName"
));
BaseBusinessWarn
businessWarn
=
warningService
.
createWarn
(
SandMiningAreaConstant
.
SAND_MINING_AREA_BILL_TYPE
,
billId
,
SandMiningAreaConstant
.
SAND_MINING_AREA_WARN_TARGET
);
businessWarn
.
setWarningCalculate
(
sandAreaDinasCountWarningCalculate
);
businessWarn
.
warn
();
}
@Override
public
Double
getAllDischargingWeightByNowAndSandAreaId
(
UUID
billId
){
public
Double
getAllDischargingWeightByNowAndSandAreaId
(
UUID
billId
)
{
return
dischargingDao
.
getAllDischargingWeightByYearAndSandAreaId
(
new
Date
(),
billId
);
}
...
...
@@ -188,14 +188,14 @@ public class DischargingServiceImpl implements DischargingService {
KObject
oldSandMiningArea
=
id
.
get
(
"sandMiningArea"
);
UUID
oldSandMiningAreaId
=
oldSandMiningArea
.
getUuid
(
"id"
);
if
(
null
!=
kObject
.
getUuid
(
"parentId"
))
{
if
(
null
==
kObject
.
getUuid
(
"parentId"
))
{
//如果采区和年都没有变化,则不判断旧的数据是否结束
if
(
oldSandMiningAreaId
!=
sandMiningAreaId
&&!
DateTimeUtils
.
isSameYear
(
oldDischargingTime
,
dischargingTime
))
{
if
(
oldSandMiningAreaId
!=
sandMiningAreaId
&&
!
DateTimeUtils
.
isSameYear
(
oldDischargingTime
,
dischargingTime
))
{
setWarningRecord
(
oldSandMiningAreaId
,
oldDischargingTime
,
oldSandMiningArea
);
}
if
(!
DateTimeUtils
.
isLtNowYear
(
dischargingTime
))
{
if
(!
DateTimeUtils
.
isLtNowYear
(
dischargingTime
))
{
setWarningRecord
(
sandMiningAreaId
,
dischargingTime
,
sandMiningArea
);
}
}
}
dischargingDao
.
modify
(
kObject
);
}
...
...
backend/xyst.dinas.production/src/main/java/com/xyst/dinas/production/internal/service/ProductionPlanReportServiceImpl.java
View file @
920a99d1
...
...
@@ -168,7 +168,7 @@ public class ProductionPlanReportServiceImpl implements ProductionPlanReportServ
}
@Override
public
void
warehousing
(
List
<
UUID
>
productionLineIds
)
{
public
void
warehousing
(
UUID
productionLineIds
)
{
//查询本天之前所有未入库的数据
List
<
KObject
>
a
=
productionPlanReportDao
.
getNoWareHousing
(
productionLineIds
);
...
...
backend/xyst.dinas.production/src/main/java/com/xyst/dinas/production/service/ProductionPlanReportService.java
View file @
920a99d1
...
...
@@ -38,6 +38,6 @@ public interface ProductionPlanReportService {
void
deleteByStationAndDate
(
UUID
stationId
,
Date
convertStringToDate1
);
void
warehousing
(
List
<
UUID
>
productionLineIds
);
void
warehousing
(
UUID
productionLineIds
);
}
backend/xyst.dinas.production/src/main/java/com/xyst/dinas/production/web/ProductionPlanReportController.java
View file @
920a99d1
...
...
@@ -59,9 +59,9 @@ public class ProductionPlanReportController {
@RequestMapping
(
value
=
"warehousing"
,
method
=
RequestMethod
.
GET
)
public
ResponseObj
warehousing
(
@RequestParam
(
name
=
"production
LineIds"
,
required
=
false
)
List
<
UUID
>
productionLineIds
@RequestParam
(
name
=
"production
PlanId"
,
required
=
false
)
UUID
productionPlanId
)
{
productionPlanReportService
.
warehousing
(
production
LineIds
);
productionPlanReportService
.
warehousing
(
production
PlanId
);
return
ResponseObj
.
success
(
"入库成功"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment