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
2d47037c
Commit
2d47037c
authored
Aug 20, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.仅查询所在组的数据
parent
52b24166
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
245 deletions
+113
-245
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+21
-0
ServiceHGSC007.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
+74
-64
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+18
-181
No files found.
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
2d47037c
...
...
@@ -133,6 +133,27 @@ public class UserSessionUtils extends UserSession {
}
/**
* 获取登录用户的所有组
*
* @return
*/
public
static
List
<
String
>
getAllGroupCode
()
{
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
return
new
ArrayList
<>();
}
List
<
String
>
prodGroupCodes
=
new
ArrayList
<>();
for
(
Org
org
:
orgs
)
{
if
(
OrgTypeEnum
.
PROD_GROUP
.
getCode
().
equals
(
org
.
getOrgType
())
||
OrgTypeEnum
.
CUT_GROUP
.
getCode
().
equals
(
org
.
getOrgType
())
||
OrgTypeEnum
.
SYN_GROUP
.
getCode
().
equals
(
org
.
getOrgType
()))
{
prodGroupCodes
.
add
(
org
.
getOrgId
());
}
}
return
prodGroupCodes
;
}
/**
* 获取登录用户所有角色
*
* @return
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
View file @
2d47037c
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Factory
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.DateUtil
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.StringUtil
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -26,16 +25,46 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
* @author Zhang JiHui
* @version 1.0 2024/5/24
*/
public
class
ServiceHGSC007
extends
ServiceEPBase
{
public
class
ServiceHGSC007
extends
ServiceEPBase
{
public
static
List
<
Map
<
String
,
Object
>>
getOrg
()
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
for
(
Org
org
:
orgList
)
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
if
(!
org
.
getOrgType
().
equals
(
OrgTypeEnum
.
COMPANY
.
getCode
()))
{
//Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
objectMap
.
put
(
Org
.
FIELD_FACTORY_CODE
,
org
.
getFactoryCode
());
objectMap
.
put
(
Org
.
FIELD_FACTORY_NAME
,
org
.
getFactoryName
());
}
else
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
org
.
getOrgId
());
List
<
Map
>
results
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgXsOrg
.
QUERY_BY_FACTORY
,
map
);
if
(
results
.
size
()
>
0
)
{
Map
org1
=
results
.
get
(
0
);
objectMap
.
put
(
Org
.
FIELD_FACTORY_CODE
,
org1
.
get
(
Org
.
FIELD_ORG_ID
));
objectMap
.
put
(
Org
.
FIELD_FACTORY_NAME
,
org1
.
get
(
Org
.
FIELD_ORG_CNAME
));
}
}
list
.
add
(
objectMap
);
}
}
return
list
;
}
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"查询"
,
operDesc
=
"初始化页面"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
...
...
@@ -48,26 +77,29 @@ import java.util.stream.Collectors;
return
inInfo
;
}
/*
* 查询*/
/**
* 查询
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
EiBlock
block
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
String
creatTime
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_created_time
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
creatTime
=
MapUtils
.
getString
(
queryMap
,
HGSC007
.
FIELD_created_time
);
if
(
StringUtils
.
isNotBlank
(
creatTime
))
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_created_time
,
StringUtil
.
removeHorizontalLine
(
creatTime
));
queryMap
.
put
(
HGSC007
.
FIELD_created_time
,
StringUtil
.
removeHorizontalLine
(
creatTime
));
}
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY
,
new
HGSC007
()
);
// 仅查询自己所在组的任务
queryMap
.
put
(
"groupCodes"
,
UserSessionUtils
.
getAllGroupCode
()
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY
,
new
HGSC007
());
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"查询"
,
operDesc
=
"APP查询数量"
)
public
Integer
count
(
EiInfo
inInfo
)
{
Integer
count
=
null
;
...
...
@@ -75,10 +107,11 @@ import java.util.stream.Collectors;
EiBlock
block
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
String
creatTime
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_created_time
);
if
(
StringUtils
.
isNotBlank
(
creatTime
))
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_created_time
,
StringUtil
.
removeHorizontalLine
(
creatTime
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_created_time
,
StringUtil
.
removeHorizontalLine
(
creatTime
));
}
Map
paramMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
count
=
super
.
count
(
HGSC007
.
COUNT
,
paramMap
);
count
=
super
.
count
(
HGSC007
.
COUNT
,
paramMap
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
@@ -97,16 +130,20 @@ import java.util.stream.Collectors;
List
<
Org
>
factoryCodes
=
new
ArrayList
<>();
try
{
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
Optional
.
ofNullable
(
roleCompanyCode
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
code
->
{
factoryCodes
.
addAll
(
HGXSTools
.
XsOrg
.
queryByParent
(
code
,
OrgTypeEnum
.
FACTORY
.
getCode
()));
Optional
.
ofNullable
(
roleCompanyCode
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
code
->
{
factoryCodes
.
addAll
(
HGXSTools
.
XsOrg
.
queryByParent
(
code
,
OrgTypeEnum
.
FACTORY
.
getCode
()));
});
//List<Map<String,Object>> mapList = getOrg();
//factoryCodes.addAll(mapList);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"APP查询工厂失败"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"APP查询工厂失败"
);
}
return
factoryCodes
.
stream
().
filter
(
o
->
com
.
baosight
.
hggp
.
util
.
StringUtils
.
equals
(
o
.
getOrgType
(),
OrgTypeEnum
.
FACTORY
.
getCode
())).
map
(
item
->
new
Factory
(
item
.
getCompanyCode
(),
item
.
getCompanyName
(),
item
.
getFactoryCode
(),
item
.
getFactoryName
())).
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toMap
(
Factory:
:
getFactoryCode
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
oldValue
),
return
factoryCodes
.
stream
()
.
filter
(
o
->
com
.
baosight
.
hggp
.
util
.
StringUtils
.
equals
(
o
.
getOrgType
(),
OrgTypeEnum
.
FACTORY
.
getCode
()))
.
map
(
item
->
new
Factory
(
item
.
getCompanyCode
(),
item
.
getCompanyName
(),
item
.
getFactoryCode
(),
item
.
getFactoryName
())).
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toMap
(
Factory:
:
getFactoryCode
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
oldValue
),
// 将Map转回List
m
->
new
ArrayList
<>(
m
.
values
())
));
...
...
@@ -124,7 +161,7 @@ import java.util.stream.Collectors;
if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}*/
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_SUM_WT
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_SUM_WT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
@@ -143,7 +180,7 @@ import java.util.stream.Collectors;
if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}*/
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_WT
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_WT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
@@ -159,15 +196,15 @@ import java.util.stream.Collectors;
EiBlock
queryRow
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
//UserVO userVO = HGCWTools.HgCw002.getUserCompany();
//String companyCode = queryRow.getCellStr(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code);
String
endDate
=
queryRow
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_END_DATE
);
String
endDate
=
queryRow
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_END_DATE
);
if
(
StringUtils
.
isNotEmpty
(
endDate
))
{
String
startDate
=
DateUtil
.
dateSubStr
(
endDate
,
-
7
);
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_START_DATE
,
startDate
);
String
startDate
=
DateUtil
.
dateSubStr
(
endDate
,
-
7
);
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_START_DATE
,
startDate
);
}
/*if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}*/
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_DAY_WT
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_DAY_WT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
@@ -183,15 +220,15 @@ import java.util.stream.Collectors;
EiBlock
queryRow
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
//UserVO userVO = HGCWTools.HgCw002.getUserCompany();
//String companyCode = queryRow.getCellStr(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code);
String
endDate
=
queryRow
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_END_DATE
);
String
endDate
=
queryRow
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_END_DATE
);
if
(
StringUtils
.
isNotEmpty
(
endDate
))
{
String
startDate
=
DateUtil
.
getMonthOfDays
(
endDate
,-
6
,
DateUtil
.
DATE8_PATTERN
);
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_START_DATE
,
startDate
);
String
startDate
=
DateUtil
.
getMonthOfDays
(
endDate
,
-
6
,
DateUtil
.
DATE8_PATTERN
);
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_START_DATE
,
startDate
);
}
/*if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}*/
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_MONTH_WT
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_MONTH_WT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
@@ -211,40 +248,13 @@ import java.util.stream.Collectors;
if (StringUtils.isEmpty(companyCode)) {
queryRow.setCell(ACConstants.ROW_CODE_0,HGSC007.FIELD_company_code,userVO.getUsercode());
}*/
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_PROJ_CODE_WT
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_PROJ_CODE_WT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
public
static
List
<
Map
<
String
,
Object
>>
getOrg
()
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
for
(
Org
org:
orgList
)
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
if
(!
org
.
getOrgType
().
equals
(
OrgTypeEnum
.
COMPANY
.
getCode
()))
{
//Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
objectMap
.
put
(
Org
.
FIELD_FACTORY_CODE
,
org
.
getFactoryCode
());
objectMap
.
put
(
Org
.
FIELD_FACTORY_NAME
,
org
.
getFactoryName
());
}
else
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
org
.
getOrgId
());
List
<
Map
>
results
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgXsOrg
.
QUERY_BY_FACTORY
,
map
);
if
(
results
.
size
()>
0
)
{
Map
org1
=
results
.
get
(
0
);
objectMap
.
put
(
Org
.
FIELD_FACTORY_CODE
,
org1
.
get
(
Org
.
FIELD_ORG_ID
));
objectMap
.
put
(
Org
.
FIELD_FACTORY_NAME
,
org1
.
get
(
Org
.
FIELD_ORG_CNAME
));
}
}
list
.
add
(
objectMap
);
}
}
return
list
;
}
}
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
2d47037c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-23 17:55:59
Version : 1.0
schema : hggp
tableName : HGSC007
id BIGINT NOT NULL primarykey,
order_id BIGINT NOT NULL,
order_detail_id BIGINT NOT NULL,
tech_flow_id BIGINT,
tech_flow_name BIGINT,
invent_process_id BIGINT,
process_code VARCHAR,
process_name VARCHAR,
process_order BIGINT,
company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
dep_code VARCHAR,
dep_name VARCHAR,
proj_code VARCHAR,
proj_name VARCHAR,
task_code VARCHAR,
product_type TINYINT,
product_code VARCHAR,
product_name VARCHAR,
plan_start_date VARCHAR,
plan_end_date VARCHAR,
factory_code VARCHAR,
factory_name VARCHAR,
group_code VARCHAR,
group_name VARCHAR,
complete_date VARCHAR,
quantity TINYINT,
finish_quantity TINYINT,
unfinish_quantity TINYINT,
single_weight DECIMAL,
total_weight DECIMAL,
finish_weight DECIMAL,
unfinish_weight DECIMAL,
account_code VARCHAR NOT NULL,
created_by VARCHAR,
created_name VARCHAR,
created_time VARCHAR,
updated_by VARCHAR,
updated_name VARCHAR,
updated_time VARCHAR
-->
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGSC007"
>
<sql
id=
"authCondition"
>
...
...
@@ -68,9 +23,9 @@
</isNotEmpty>
</isNotEqual>
</sql>
<sql
id=
"condition"
>
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
A.id = #id#
</isNotEmpty>
...
...
@@ -205,6 +160,13 @@
ifnull(A.complete_date,'') != ''
</isEqual>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"groupCodes"
>
A.GROUP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"groupCodes"
>
#groupCodes[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"appCondition"
>
<!-- 无权限时使用 -->
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
...
...
@@ -242,8 +204,7 @@
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC007"
>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC007"
>
SELECT
A.id as "id",
A.mat_id as "matId",
<!-- 物料清单ID -->
...
...
@@ -288,10 +249,11 @@
A.updated_time as "updatedTime",
<!-- 更新时间 -->
B.LENGTH as "length",
<!-- 长 -->
B.SPEC as "spec"
<!-- 规格 -->
FROM ${hggpSchema}.HGSC007 A LEFT JOIN ${hggpSchema}.HGPZ005 B ON A.product_code = B.INVENT_CODE
FROM ${hggpSchema}.HGSC007 A
LEFT JOIN ${hggpSchema}.HGPZ005 B ON A.product_code = B.INVENT_CODE
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
...
...
@@ -300,140 +262,15 @@
A.id desc, A.product_type asc, A.product_name, A.process_order desc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGSC007 A LEFT JOIN ${hggpSchema}.HGPZ005 B ON A.product_code = B.INVENT_CODE WHERE 1=1
<include
refid=
"condition"
/>
SELECT COUNT(*) FROM ${hggpSchema}.HGSC007 A
LEFT JOIN ${hggpSchema}.HGPZ005 B ON A.product_code = B.INVENT_CODE
WHERE 1=1
<include
refid=
"condition"
/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderId">
order_id = #orderId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderDetailId">
order_detail_id = #orderDetailId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowId">
tech_flow_id = #techFlowId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowName">
tech_flow_name = #techFlowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventProcessId">
invent_process_id = #inventProcessId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
process_code = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
process_name = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
process_order = #processOrder#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskCode">
task_code = #taskCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
plan_start_date = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
plan_end_date = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
group_name = #groupName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="completeDate">
complete_date = #completeDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishQuantity">
finish_quantity = #finishQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unfinishQuantity">
unfinish_quantity = #unfinishQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishWeight">
finish_weight = #finishWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unfinishWeight">
unfinish_weight = #unfinishWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
updated_time = #updatedTime#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGSC007 (id,
mat_id,
<!-- 物料清单ID -->
...
...
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