Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
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
platform
hg-smart
Commits
01269188
Commit
01269188
authored
May 22, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划bugfix
parent
9fb50a52
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
163 additions
and
11 deletions
+163
-11
HGSC005.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005.java
+3
-3
ServiceHGSC004D.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004D.java
+76
-0
ServiceHGSC005.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC005.java
+3
-1
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+4
-4
HGSC004D.js
src/main/webapp/HG/SC/HGSC004D.js
+41
-0
HGSC004D.jsp
src/main/webapp/HG/SC/HGSC004D.jsp
+33
-0
HGSC005.js
src/main/webapp/HG/SC/HGSC005.js
+1
-1
HGSC005.jsp
src/main/webapp/HG/SC/HGSC005.jsp
+1
-1
HGSC006.js
src/main/webapp/HG/SC/HGSC006.js
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005.java
View file @
01269188
...
...
@@ -32,8 +32,8 @@ public class HGSC005 extends DaoEPBase {
public
static
final
String
FIELD_plan_code
=
"planCode"
;
/* 计划编码*/
public
static
final
String
FIELD_commit_status
=
"commitStatus"
;
/* 提交状态 0:未提交;2:已提交*/
public
static
final
String
FIELD_finish_date
=
"finishDate"
;
/* 完工日期*/
public
static
final
String
FIELD_finish_rate
=
"finish
_r
ate"
;
/* 完工进度*/
public
static
final
String
FIELD_is_schedule
=
"is
_s
chedule"
;
/* 是否排产 0,否 1,是*/
public
static
final
String
FIELD_finish_rate
=
"finish
R
ate"
;
/* 完工进度*/
public
static
final
String
FIELD_is_schedule
=
"is
S
chedule"
;
/* 是否排产 0,否 1,是*/
public
static
final
String
FIELD_account_code
=
"accountCode"
;
/* 帐套*/
public
static
final
String
FIELD_dep_code
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_dep_name
=
"depName"
;
/* 部门名称*/
...
...
@@ -53,7 +53,7 @@ public class HGSC005 extends DaoEPBase {
public
static
final
String
COL_plan_code
=
"plan_code"
;
/* 计划编码*/
public
static
final
String
COL_commit_status
=
"commit_status"
;
/* 提交状态 0:未提交;2:已提交*/
public
static
final
String
COL_finish_date
=
"finish_date"
;
/* 完工日期*/
public
static
final
String
COL_is_schedule
=
"is
_s
chedule"
;
/* 是否排产 0,否 1,是*/
public
static
final
String
COL_is_schedule
=
"is
S
chedule"
;
/* 是否排产 0,否 1,是*/
// public static final String COL_finish_rate = "finish_rate"; /* 完工进度*/
public
static
final
String
COL_account_code
=
"account_code"
;
/* 帐套*/
public
static
final
String
COL_dep_code
=
"dep_code"
;
/* 部门编码*/
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004D.java
0 → 100644
View file @
01269188
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.tools.EDTools
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
import
com.baosight.hggp.hg.sc.domain.HGSC099
;
import
com.baosight.hggp.util.FileUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Author wwl
* @Date 2024/5/6 19:48
*/
public
class
ServiceHGSC004D
extends
ServiceEPBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGSC099
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
List
<
Map
<
String
,
Object
>>
EDCM01List
=
EDTools
.
EdCm01
.
list
(
"hggp.sc.bizType"
);
if
(!
CollectionUtils
.
isEmpty
(
EDCM01List
)){
List
<
String
>
bizTypes
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
map
:
EDCM01List
){
bizTypes
.
add
(
map
.
get
(
"itemCode"
).
toString
());
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"bizTypes"
,
bizTypes
);
}
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
inInfo
=
super
.
query
(
inInfo
,
"HGSC099.queryRun"
,
new
HGSC099
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HGSC099.queryDev"
,
new
HGSC099
());
}
}
catch
(
Throwable
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC005.java
View file @
01269188
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sc.domain.HGSC005
;
...
...
@@ -14,6 +15,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -60,7 +62,7 @@ public class ServiceHGSC005 extends ServiceBase {
List
<
String
>
planCodes
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC005
.
FIELD_plan_code
);
List
<
HGSC005A
>
hgsc005AList
=
HGSCTools
.
THGSC005A
.
queryByPlanCodes
(
planCodes
);
this
.
checkCommitDate
(
hgsc005AList
);
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
HGSC005
.
FIELD_id
);
List
<
Long
>
ids
=
MapUtils
.
toDaoEPBase
(
resultRows
,
HGSC005
.
class
).
stream
().
filter
(
o
->
o
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
0
).
map
(
HGSC005:
:
getId
).
collect
(
Collectors
.
toList
()
);
DaoUtils
.
update
(
HGSC005
.
BATCH_COMMIT
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
//生成生产订单
HGSCTools
.
THGSC006
.
generatorOrder
(
MapUtils
.
toDaoEPBase
(
inInfo
,
HGSC005
.
class
),
hgsc005AList
);
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
01269188
...
...
@@ -389,17 +389,17 @@ public class HGSCTools {
hgpz005List
.
forEach
(
product
->{
if
(
StringUtils
.
equals
(
product
.
getInventCode
(),
planInfo
.
getProductCode
())){
//额定工时
BigDecimal
timing
=
sj
.
getStandardJob
().
multiply
(
sj
.
getStandardDays
()).
divide
(
sj
.
getStandardNum
());
BigDecimal
timing
=
sj
.
getStandardJob
().
multiply
(
sj
.
getStandardDays
()).
divide
(
sj
.
getStandardNum
()
,
2
,
ROUND_DOWN
);
ComputeTypeEnum
computeType
=
ComputeTypeEnum
.
getEnumByCode
(
sj
.
getComputeType
());
switch
(
computeType
){
case
CD:
workHour
.
set
(
product
.
getLength
().
multiply
(
new
BigDecimal
(
planInfo
.
getQuantity
())).
multiply
(
unitConver
).
multiply
(
composingCoeff
)
.
divide
(
timing
)
.
divide
(
timing
,
2
,
ROUND_DOWN
)
.
multiply
(
baseWorkHour
).
add
(
finalRemainder
));
break
;
case
SL:
workHour
.
set
(
new
BigDecimal
(
planInfo
.
getQuantity
()).
multiply
(
composingCoeff
)
.
divide
(
timing
)
.
divide
(
timing
,
2
,
ROUND_DOWN
)
.
multiply
(
baseWorkHour
).
add
(
finalRemainder
));
break
;
default
:
...
...
@@ -411,7 +411,7 @@ public class HGSCTools {
});
}
});
BigDecimal
day
=
workHour
.
get
().
setScale
(
0
,
ROUND_DOWN
).
divide
(
baseWorkHour
);
BigDecimal
day
=
workHour
.
get
().
divide
(
baseWorkHour
,
0
,
ROUND_DOWN
);
remainder
=
workHour
.
get
().
remainder
(
baseWorkHour
);
if
(
day
.
compareTo
(
new
BigDecimal
(
0
))>
0
)
{
endDate
=
DateUtil
.
toDateStr
(
DateUtils
.
addDays
(
DateUtil
.
toDate
(
endDate
,
DateUtil
.
DATE10_PATTERN
),
day
.
intValue
()),
DateUtil
.
DATE10_PATTERN
);
...
...
src/main/webapp/HG/SC/HGSC004D.js
0 → 100644
View file @
01269188
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
columns
:
[{
field
:
"operator"
,
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'href="'
+
downloadHref
(
item
.
docId
)
+
'" target="_blank">附件下载</a>'
;
return
template
;
}
}],
loadComplete
:
function
(
grid
){
},
dataBound
:
function
()
{
}
}
};
$
(
"#ef_form_head"
).
hide
();
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 初始化查询
query
();
});
/**
* 查询
*/
var
query
=
function
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
}
src/main/webapp/HG/SC/HGSC004D.jsp
0 → 100644
View file @
01269188
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"附件清单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询区域"
type=
"query"
>
<EF:EFInput
cname=
"主表ID"
ename=
"matId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<div
class=
"row"
>
<EF:EFSelect
cname=
"文件类型"
ename=
"inqu_status-0-bizType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.sc.bizType"
/>
</EF:EFSelect>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFComboColumn
ename=
"bizType"
cname=
"文件类型"
width=
"80"
align=
"center"
enable=
"false"
required=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.sc.bizType"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HG/SC/HGSC005.js
View file @
01269188
...
...
@@ -51,7 +51,7 @@ function showInfo(planCode) {
*/
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HGSC0
99?methodName=initLoad&inqu_status-0-bizType=XMRY
&inqu_status-0-matId="
+
id
,
href
:
"HGSC0
04D?methodName=initLoad
&inqu_status-0-matId="
+
id
,
title
:
"<div style='text-align: center;'>附件详情</div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HG/SC/HGSC005.jsp
View file @
01269188
...
...
@@ -36,7 +36,7 @@
<EF:EFColumn
ename=
"createdTime"
cname=
"生产计划日期"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"planCode"
cname=
"生产计划单号"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishDate"
cname=
"交货日期"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishRate"
cname=
"生产完工进度"
format=
"{0:0
%}
"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishRate"
cname=
"生产完工进度"
format=
"{0:0
}%"
editType=
"text
"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFComboColumn
ename=
"commitStatus"
cname=
"提交状态"
width=
"80"
align=
"center"
required=
"true"
readonly=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.commitStatus"
/>
...
...
src/main/webapp/HG/SC/HGSC006.js
View file @
01269188
...
...
@@ -49,7 +49,7 @@ function showInfo(planCode) {
*/
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HGSC0
99?methodName=initLoad&inqu_status-0-bizType=XMRY
&inqu_status-0-matId="
+
id
,
href
:
"HGSC0
04D?methodName=initLoad
&inqu_status-0-matId="
+
id
,
title
:
"<div style='text-align: center;'>附件详情</div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
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