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
8723dd58
Commit
8723dd58
authored
May 22, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划bugfix,生产订单派工dev;
parent
48e51a46
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
463 additions
and
18 deletions
+463
-18
ProductTypeEnum.java
src/main/java/com/baosight/hggp/common/ProductTypeEnum.java
+9
-0
HGPZ005.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
+1
-1
HGPZ005A.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005A.xml
+1
-1
HGSC098.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC098.java
+104
-0
ServiceHGSC005A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC005A.java
+2
-1
ServiceHGSC098.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC098.java
+124
-0
HGSC005.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005.xml
+2
-2
HGSC005A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005A.xml
+2
-2
HGSC006.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006.xml
+2
-2
HGSC006A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006A.xml
+2
-2
HGSC098.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC098.xml
+57
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+1
-1
HGSJ001.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
+1
-1
CommonMethod.java
src/main/java/com/baosight/hggp/util/CommonMethod.java
+10
-1
HGSC005.js
src/main/webapp/HG/SC/HGSC005.js
+1
-1
HGSC005.jsp
src/main/webapp/HG/SC/HGSC005.jsp
+1
-1
HGSC005A.jsp
src/main/webapp/HG/SC/HGSC005A.jsp
+1
-1
HGSC006.js
src/main/webapp/HG/SC/HGSC006.js
+3
-0
HGSC006A.js
src/main/webapp/HG/SC/HGSC006A.js
+60
-1
HGSC098.js
src/main/webapp/HG/SC/HGSC098.js
+45
-0
HGSC098.jsp
src/main/webapp/HG/SC/HGSC098.jsp
+34
-0
No files found.
src/main/java/com/baosight/hggp/common/ProductTypeEnum.java
View file @
8723dd58
...
@@ -36,6 +36,15 @@ public enum ProductTypeEnum {
...
@@ -36,6 +36,15 @@ public enum ProductTypeEnum {
return
block
;
return
block
;
}
}
public
static
ProductTypeEnum
getEnumByCode
(
Integer
code
){
for
(
ProductTypeEnum
en
:
ProductTypeEnum
.
values
()){
if
(
code
.
compareTo
(
en
.
code
)==
0
){
return
en
;
}
}
return
null
;
}
public
Integer
getCode
()
{
public
Integer
getCode
()
{
return
code
;
return
code
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
View file @
8723dd58
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<isNotEmpty
prepend=
" AND "
property=
"flowId"
>
<isNotEmpty
prepend=
" AND "
property=
"flowId"
>
FLOW_ID = #flowId#
FLOW_ID = #flowId#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
property=
"inventCodes"
>
<isNotEmpty
pr
epend=
" AND "
pr
operty=
"inventCodes"
>
INVENT_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventCodes"
>
#inventCodes[]#
</iterate>
INVENT_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventCodes"
>
#inventCodes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005A.xml
View file @
8723dd58
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
PARENT_ID = #parentId#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
property=
"ids"
>
<isNotEmpty
pr
epend=
" AND "
pr
operty=
"ids"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
...
...
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC098.java
0 → 100644
View file @
8723dd58
package
com
.
baosight
.
hggp
.
hg
.
sc
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
HGSC098
extends
DaoEPBase
{
private
String
factoryCode
=
" "
;
/* 厂区编码*/
private
String
factoryName
=
" "
;
/* 工厂*/
private
String
groupCode
=
" "
;
/* 组织编码*/
private
String
groupName
=
" "
;
/* 组织名称 */
/**
* initialize the metadata
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
"factoryCode"
);
eiColumn
.
setDescName
(
"厂区编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"factoryName"
);
eiColumn
.
setDescName
(
"工厂"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"groupCode"
);
eiColumn
.
setDescName
(
"组织编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"groupName"
);
eiColumn
.
setDescName
(
"组织名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor
*/
public
HGSC098
()
{
initMetaData
();
}
public
String
getFactoryCode
()
{
return
factoryCode
;
}
public
void
setFactoryCode
(
String
factoryCode
)
{
this
.
factoryCode
=
factoryCode
;
}
public
String
getFactoryName
()
{
return
factoryName
;
}
public
void
setFactoryName
(
String
factoryName
)
{
this
.
factoryName
=
factoryName
;
}
public
String
getGroupCode
()
{
return
groupCode
;
}
public
void
setGroupCode
(
String
groupCode
)
{
this
.
groupCode
=
groupCode
;
}
public
String
getGroupName
()
{
return
groupName
;
}
public
void
setGroupName
(
String
groupName
)
{
this
.
groupName
=
groupName
;
}
/**
* get the value from Map
*/
public
void
fromMap
(
Map
map
)
{
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"factoryCode"
)),
factoryCode
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"factoryName"
)),
factoryName
));
setGroupCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"groupCode"
)),
groupCode
));
setGroupName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"groupName"
)),
groupName
));
}
/**
* set the value to Map
*/
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
"factoryCode"
,
StringUtils
.
toString
(
factoryCode
,
eiMetadata
.
getMeta
(
"factoryCode"
)));
map
.
put
(
"factoryName"
,
StringUtils
.
toString
(
factoryName
,
eiMetadata
.
getMeta
(
"factoryName"
)));
map
.
put
(
"groupCode"
,
StringUtils
.
toString
(
groupCode
,
eiMetadata
.
getMeta
(
"groupCode"
)));
map
.
put
(
"groupName"
,
StringUtils
.
toString
(
groupName
,
eiMetadata
.
getMeta
(
"groupName"
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC005A.java
View file @
8723dd58
...
@@ -29,6 +29,7 @@ public class ServiceHGSC005A extends ServiceBase {
...
@@ -29,6 +29,7 @@ public class ServiceHGSC005A extends ServiceBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PLAN_PROCESS_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PLAN_PROCESS_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
HGSC005A
.
FIELD_plan_code
,
planCode
);
put
(
HGSC005A
.
FIELD_plan_code
,
planCode
);
}},
false
);
}},
false
);
CommonMethod
.
comboBoxDefaultValue
(
inInfo
,
DdynamicEnum
.
PLAN_PROCESS_BLOCK_ID
.
getBlockId
(),
"全部"
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
...
@@ -79,7 +80,7 @@ public class ServiceHGSC005A extends ServiceBase {
...
@@ -79,7 +80,7 @@ public class ServiceHGSC005A extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"生产计划详情"
,
operType
=
"排产"
,
operDesc
=
"排产"
)
@OperationLogAnnotation
(
operModul
=
"生产计划详情"
,
operType
=
"排产"
,
operDesc
=
"排产"
)
public
EiInfo
schedule
(
EiInfo
inInfo
)
{
public
EiInfo
schedule
(
EiInfo
inInfo
)
{
try
{
try
{
String
planCode
=
inInfo
.
getString
(
HGSC005
.
FIELD_plan_code
);
String
planCode
=
inInfo
.
getString
(
"inqu_status-0-planCode"
);
HGSC005
hgsc005
=
HGSCTools
.
THGSC005
.
queryByPlanCode
(
planCode
);
HGSC005
hgsc005
=
HGSCTools
.
THGSC005
.
queryByPlanCode
(
planCode
);
this
.
checkScheduleData
(
hgsc005
);
this
.
checkScheduleData
(
hgsc005
);
int
count
=
HGSCTools
.
THGSC005A
.
schedule
(
planCode
);
int
count
=
HGSCTools
.
THGSC005A
.
schedule
(
planCode
);
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC098.java
0 → 100644
View file @
8723dd58
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.ProductTypeEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC098
;
import
com.baosight.hggp.hg.xs.domain.Dept
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
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.ServiceBase
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
*
*/
public
class
ServiceHGSC098
extends
ServiceBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"组织机构"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
//查询项目所属公司下面的所有厂区
String
companyCode
=
inInfo
.
getString
(
"inqu_status-0-companyCode"
);
String
productType
=
inInfo
.
getString
(
"inqu_status-0-productType"
);
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByParent
(
companyCode
,
OrgTypeEnum
.
FACTORY
.
getCode
());
EiInfoUtils
.
addBlock
(
inInfo
,
"factory_record_block_id"
,
orgList
,
Org
.
class
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGSC098
().
eiMetadata
);
inInfo
.
set
(
"inqu_status-0-productType"
,
productType
);
}
catch
(
PlatException
|
InstantiationException
|
IllegalAccessException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"组织机构"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
//查询项目所属公司下面的所有厂区
String
companyCode
=
inInfo
.
getString
(
"inqu_status-0-companyCode"
);
String
productType
=
inInfo
.
getString
(
"inqu_status-0-productType"
);
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByParent
(
companyCode
,
OrgTypeEnum
.
FACTORY
.
getCode
());
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
inInfo
.
set
(
"inqu_status-0-companyCode"
,
null
);
List
<
String
>
factoryCodes
=
orgList
.
stream
().
map
(
Org:
:
getFactoryCode
).
collect
(
Collectors
.
toList
());
inInfo
.
set
(
"inqu_status-0-factoryCodes"
,
factoryCodes
);
ProductTypeEnum
productTypeEnum
=
ProductTypeEnum
.
getEnumByCode
(
Integer
.
valueOf
(
productType
));
OrgTypeEnum
orgType
;
switch
(
productTypeEnum
)
{
case
STRUCT:
orgType
=
OrgTypeEnum
.
PROD_GROUP
;
break
;
case
PART:
orgType
=
OrgTypeEnum
.
CUT_GROUP
;
break
;
default
:
throw
new
PlatException
(
"产品类型异常!"
);
}
inInfo
.
set
(
"inqu_status-0-orgType"
,
orgType
.
getCode
());
inInfo
=
super
.
query
(
inInfo
,
"HGSC098.query"
,
new
HGSC098
());
}
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 部门下拉框
* @param inInfo
* @return
*/
public
EiInfo
workGroupComboBox
(
EiInfo
inInfo
){
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
factoryCode
=
MapUtils
.
getString
(
queryMap
,
"factoryCode"
);
String
productType
=
inInfo
.
getString
(
"inqu_status-0-productType"
);
ProductTypeEnum
productTypeEnum
=
ProductTypeEnum
.
getEnumByCode
(
Integer
.
valueOf
(
productType
));
OrgTypeEnum
orgType
;
switch
(
productTypeEnum
){
case
STRUCT:
orgType
=
OrgTypeEnum
.
PROD_GROUP
;
break
;
case
PART:
orgType
=
OrgTypeEnum
.
CUT_GROUP
;
break
;
default
:
throw
new
PlatException
(
"产品类型异常!"
);
}
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByParent
(
factoryCode
,
orgType
.
getCode
());
EiInfoUtils
.
addBlock
(
inInfo
,
"workGroup"
,
orgList
,
Org
.
class
);
CommonMethod
.
comboBoxDefaultValue
(
inInfo
,
"depByCompany"
,
"orgEname"
,
"orgCname"
);
}
catch
(
InstantiationException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005.xml
View file @
8723dd58
...
@@ -44,10 +44,10 @@
...
@@ -44,10 +44,10 @@
proj_code = #projCode#
proj_code = #projCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
proj_name like ('%
projName
%')
proj_name like ('%
$projName$
%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planCode"
>
<isNotEmpty
prepend=
" AND "
property=
"planCode"
>
plan_code
= like ('%planCode
%')
plan_code
like ('%$planCode$
%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"commitStatus"
>
<isNotEmpty
prepend=
" AND "
property=
"commitStatus"
>
commit_status = #commitStatus#
commit_status = #commitStatus#
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005A.xml
View file @
8723dd58
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
product_code = #productCode#
product_code = #productCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productName"
>
<isNotEmpty
prepend=
" AND "
property=
"productName"
>
product_name like ('%
productName
%')
product_name like ('%
$productName$
%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"finishDate"
>
<isNotEmpty
prepend=
" AND "
property=
"finishDate"
>
finish_date = #finishDate#
finish_date = #finishDate#
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
updated_time = #updatedTime#
updated_time = #updatedTime#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
property=
"planCodes"
>
<isNotEmpty
pr
epend=
" AND "
pr
operty=
"planCodes"
>
plan_code IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"planCodes"
>
#planCodes[]#
</iterate>
plan_code IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"planCodes"
>
#planCodes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006.xml
View file @
8723dd58
...
@@ -46,10 +46,10 @@
...
@@ -46,10 +46,10 @@
proj_code = #projCode#
proj_code = #projCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
proj_name like ('%
projName
%')
proj_name like ('%
$projName$
%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orderCode"
>
<isNotEmpty
prepend=
" AND "
property=
"orderCode"
>
order_code like ('%
orderCode
%')
order_code like ('%
$orderCode$
%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"assignStatus"
>
<isNotEmpty
prepend=
" AND "
property=
"assignStatus"
>
assign_status = #assignStatus#
assign_status = #assignStatus#
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006A.xml
View file @
8723dd58
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
proj_code = #projCode#
proj_code = #projCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
proj_name like ('%
projName
%')
proj_name like ('%
$projName$
%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orderCode"
>
<isNotEmpty
prepend=
" AND "
property=
"orderCode"
>
order_code = #orderCode#
order_code = #orderCode#
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
product_code = #productCode#
product_code = #productCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productName"
>
<isNotEmpty
prepend=
" AND "
property=
"productName"
>
product_name like ('%
productName
%')
product_name like ('%
$productName$
%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"assignDate"
>
<isNotEmpty
prepend=
" AND "
property=
"assignDate"
>
assign_date = #assignDate#
assign_date = #assignDate#
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC098.xml
0 → 100644
View file @
8723dd58
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPSC098"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC098"
>
SELECT
ORG_ENAME AS "groupCode",
ORG_CNAME AS "groupName",
COMPANY_CODE AS "companyCode",
COMPANY_NAME AS "companyName"
FROM iplat.TXSOG01
WHERE 1 = 1 AND IS_DELETED = 0
AND ACCOUNTT_CODE = #accountCode#
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
ORG_TYPE = #orgType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupCode"
>
ORG_ENAME = #groupCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND"
property=
"factoryCodes"
>
FACTORY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"factoryCodes"
>
#factoryCodes[]#
</iterate>
</isNotEmpty>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT
COUNT(*)
FROM iplat.TXSOG01
WHERE 1 = 1
FROM iplat.TXSOG01
WHERE 1 = 1 AND IS_DELETED = 0
AND ACCOUNTT_CODE = #accountCode#
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
ORG_TYPE = #orgType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupCode"
>
ORG_ENAME = #groupCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND"
property=
"factoryCodes"
>
FACTORY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"factoryCodes"
>
#factoryCodes[]#
</iterate>
</isNotEmpty>
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
8723dd58
...
@@ -165,7 +165,7 @@ public class HGSCTools {
...
@@ -165,7 +165,7 @@ public class HGSCTools {
}
}
public
static
HGSC005
queryByPlanCode
(
String
planCode
){
public
static
HGSC005
queryByPlanCode
(
String
planCode
){
AssertUtils
.
isEmpty
(
planCode
,
"
物料清单ID
不能为空!"
);
AssertUtils
.
isEmpty
(
planCode
,
"
计划编码
不能为空!"
);
HGSC005
result
=
(
HGSC005
)
DaoBase
.
getInstance
().
get
(
HGSC005
.
QUERY
,
HGSC005
.
FIELD_plan_code
,
planCode
);
HGSC005
result
=
(
HGSC005
)
DaoBase
.
getInstance
().
get
(
HGSC005
.
QUERY
,
HGSC005
.
FIELD_plan_code
,
planCode
);
return
result
;
return
result
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
View file @
8723dd58
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
<isNotEmpty
prepend=
" AND "
property=
"processNames"
>
<isNotEmpty
prepend=
" AND "
property=
"processNames"
>
PROCESS_NAME LIKE CONCAT('%', #processNames#, '%')
PROCESS_NAME LIKE CONCAT('%', #processNames#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
property=
"processCodes"
>
<isNotEmpty
pr
epend=
" AND "
pr
operty=
"processCodes"
>
PROCESS_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"processCodes"
>
#processCodes[]#
</iterate>
PROCESS_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"processCodes"
>
#processCodes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"computeType"
>
<isNotEmpty
prepend=
" AND "
property=
"computeType"
>
...
...
src/main/java/com/baosight/hggp/util/CommonMethod.java
View file @
8723dd58
...
@@ -273,12 +273,21 @@ public class CommonMethod {
...
@@ -273,12 +273,21 @@ public class CommonMethod {
comboBoxDefaultValue
(
inInfo
,
blockId
,
HGConstants
.
VALUE_FIELD
,
HGConstants
.
TEXT_FIELD
);
comboBoxDefaultValue
(
inInfo
,
blockId
,
HGConstants
.
VALUE_FIELD
,
HGConstants
.
TEXT_FIELD
);
}
}
public
static
void
comboBoxDefaultValue
(
EiInfo
inInfo
,
String
blockId
,
String
defaultText
)
{
comboBoxDefaultValue
(
inInfo
,
blockId
,
HGConstants
.
VALUE_FIELD
,
HGConstants
.
TEXT_FIELD
,
defaultText
);
}
public
static
void
comboBoxDefaultValue
(
EiInfo
inInfo
,
String
blockId
,
String
valueFieldName
,
String
textFieldName
)
{
public
static
void
comboBoxDefaultValue
(
EiInfo
inInfo
,
String
blockId
,
String
valueFieldName
,
String
textFieldName
)
{
String
defaultText
=
"-- 请选择 --"
;
comboBoxDefaultValue
(
inInfo
,
blockId
,
HGConstants
.
VALUE_FIELD
,
HGConstants
.
TEXT_FIELD
,
defaultText
);
}
public
static
void
comboBoxDefaultValue
(
EiInfo
inInfo
,
String
blockId
,
String
valueFieldName
,
String
textFieldName
,
String
defaultText
)
{
List
rows
=
inInfo
.
getBlock
(
blockId
).
getRows
();
List
rows
=
inInfo
.
getBlock
(
blockId
).
getRows
();
List
newRows
=
new
ArrayList
(){{
List
newRows
=
new
ArrayList
(){{
add
(
new
HashMap
<
String
,
Object
>(){{
add
(
new
HashMap
<
String
,
Object
>(){{
put
(
valueFieldName
,
""
);
put
(
valueFieldName
,
""
);
put
(
textFieldName
,
"-- 请选择 --"
);
put
(
textFieldName
,
defaultText
);
}});
}});
}};
}};
newRows
.
addAll
(
rows
);
newRows
.
addAll
(
rows
);
...
...
src/main/webapp/HG/SC/HGSC005.js
View file @
8723dd58
...
@@ -15,7 +15,7 @@ $(function () {
...
@@ -15,7 +15,7 @@ $(function () {
field
:
"operator"
,
field
:
"operator"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showInfo(
'
+
item
.
planCode
+
')" >计划详情</a>'
;
'onclick="showInfo(
\'
'
+
item
.
planCode
+
'
\
'
)" >计划详情</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
matId
+
')" >附件详情</a>'
;
+
'onclick="showUploadFile('
+
item
.
matId
+
')" >附件详情</a>'
;
return
template
;
return
template
;
...
...
src/main/webapp/HG/SC/HGSC005.jsp
View file @
8723dd58
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"true"
width=
"1
0
0"
align=
"center"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"true"
width=
"1
6
0"
align=
"center"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"true"
width=
"120"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
...
...
src/main/webapp/HG/SC/HGSC005A.jsp
View file @
8723dd58
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"inqu_status-0-planCode"
cname=
"计划编码"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-planCode"
cname=
"计划编码"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-productName"
cname=
"产品名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-productName"
cname=
"产品名称"
colWidth=
"3"
/>
<EF:EFSelect
cname=
"工序"
ename=
"
result-0-processName"
colWidth=
"3"
required=
"true
"
filter=
"contains"
>
<EF:EFSelect
cname=
"工序"
ename=
"
inqu_status-0-processName"
colWidth=
"3
"
filter=
"contains"
>
<EF:EFOptions
blockId=
"plan_process_block_id"
valueField=
"valueField"
textField=
"textField"
/>
<EF:EFOptions
blockId=
"plan_process_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFDatePicker
cname=
"交货日期"
ename=
"inqu_status-0-finishDate"
colWidth=
"3"
<EF:EFDatePicker
cname=
"交货日期"
ename=
"inqu_status-0-finishDate"
colWidth=
"3"
...
...
src/main/webapp/HG/SC/HGSC006.js
View file @
8723dd58
...
@@ -25,6 +25,9 @@ $(function () {
...
@@ -25,6 +25,9 @@ $(function () {
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
},
},
onSuccess
:
function
(
e
)
{
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
query
();
}
}
}
}
}
...
...
src/main/webapp/HG/SC/HGSC006A.js
View file @
8723dd58
...
@@ -13,12 +13,19 @@ $(function () {
...
@@ -13,12 +13,19 @@ $(function () {
columns
:
[{
columns
:
[{
field
:
"operator"
,
field
:
"operator"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
let
template
=
""
;
if
(
item
.
unassignQuantity
>
0
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="separateAssign(
\'
'
+
item
.
id
+
'
\'
)" >拆单派工</a>'
;
}
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showTaskInfo('
+
item
.
id
+
')" >任务详情</a>'
;
'onclick="showTaskInfo('
+
item
.
id
+
')" >任务详情</a>'
;
return
template
;
return
template
;
}
}
}],
}],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
// 批量分派
$
(
"#ASSIGN"
).
on
(
"click"
,
assign
);
},
},
onSuccess
:
function
(
e
)
{
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
...
@@ -29,6 +36,58 @@ $(function () {
...
@@ -29,6 +36,58 @@ $(function () {
});
});
/**
* 批量分派
*/
function
assign
()
{
//重置全局变量
ids
=
[];
let
rows
=
resultGrid
.
getCheckedRows
()
if
(
rows
.
length
<
1
)
{
message
(
"请至少选择一条需要分派的数据"
);
return
;
}
let
companyCode
=
rows
[
0
].
companyCode
;
JSColorbox
.
open
({
href
:
"HPSC098?methodName=initLoad&inqu_status-0-companyCode="
+
companyCode
,
title
:
"<div style='text-align: center;'>选择组织</div>"
,
width
:
"70%"
,
height
:
"70%"
,
callbackName
:
function
(
row
)
{
var
info
=
new
EiInfo
()
info
.
set
(
"ids"
,
ids
.
join
(
','
));
info
.
set
(
"factoryCode"
,
row
.
factoryCode
);
info
.
set
(
"factoryName"
,
row
.
factoryName
);
info
.
set
(
"groupCode"
,
row
.
groupCode
);
info
.
set
(
"groupName"
,
row
.
groupName
);
EiCommunicator
.
send
(
"HPSC006A"
,
"assign"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
ei
.
msg
});
// 刷新列表
resultGrid
.
dataSource
.
page
(
1
);
// 关闭弹窗
JSColorbox
.
close
();
}
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
});
}
function
separateAssign
(
id
){
}
function
showTaskInfo
(
orderDetailId
)
{
function
showTaskInfo
(
orderDetailId
)
{
// JSColorbox.open({
// JSColorbox.open({
// href: "HGSC007?methodName=initLoad&inqu_status-0-orderDetailId=" + orderDetailId + "&efParentFormEname=HGSC006A",
// href: "HGSC007?methodName=initLoad&inqu_status-0-orderDetailId=" + orderDetailId + "&efParentFormEname=HGSC006A",
...
...
src/main/webapp/HG/SC/HGSC098.js
0 → 100644
View file @
8723dd58
$
(
function
()
{
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
input
:
true
,
numeric
:
false
,
pageSize
:
15
,
position
:
'top'
,
pageSizes
:
[
15
,
50
,
100
,
200
]
},
columns
:
[]
}
}
$
(
"#CONFIRM"
).
on
(
"click"
,
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
()
console
.
log
(
rows
)
if
(
rows
.
length
!=
1
)
{
message
(
"请选择一条数据 "
);
return
;
}
let
row
=
rows
[
0
];
let
isInput
=
decodeURI
(
window
.
location
.
href
.
split
(
"&"
)[
1
]);
if
(
isInput
===
"isInput"
){
parent
.
JSColorbox
.
setValueCallback
(
row
);
return
;
};
JSUtils
.
confirm
(
"确定分派? "
,
{
ok
:
function
()
{
parent
.
JSColorbox
.
setValueCallback
(
row
);
}
});
});
});
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
\ No newline at end of file
src/main/webapp/HG/SC/HGSC098.jsp
0 → 100644
View file @
8723dd58
HPSC098.js<!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="查询条件">
<EF:EFInput cname="公司编码" ename="companyCode" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="产品类型" ename="productType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFSelect ename="inqu_status-0-factoryCode" cname="工厂" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="factoryName" valueField="factoryCode"/>
</EF:EFSelect>
<EF:EFCascadeSelect cascadeFrom="result-0-companyCode" cname="工作组" ename="result-0-depCode"
colWidth="4" required="true" filter="contains" defaultValue=""
serviceName="HGSC098" methodName="workGroupComboBox" resultId="workGroup"
textField="orgCname" valueField="orgEname" >
</EF:EFCascadeSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single,row">
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="120" align="center" />
<EF:EFColumn ename="groupCode" cname="组织编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="groupName" cname="工作组" enable="false" width="120" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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