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
51b1512b
Commit
51b1512b
authored
Jun 17, 2024
by
yukang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
7c4a9a64
6a8e49bf
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
862 additions
and
164 deletions
+862
-164
HGSC007.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007.java
+2
-1
HGSC007POJO.java
...main/java/com/baosight/hggp/hg/sc/domain/HGSC007POJO.java
+603
-0
ServiceHGSC007.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
+89
-32
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+123
-123
HGXSOrg.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSOrg.xml
+2
-0
DateUtil.java
src/main/java/com/baosight/hggp/util/DateUtil.java
+6
-2
HGYX001.js
src/main/webapp/HG/YX/HGYX001.js
+18
-2
HGYX001.jsp
src/main/webapp/HG/YX/HGYX001.jsp
+1
-1
HGYX002.js
src/main/webapp/HG/YX/HGYX002.js
+17
-2
HGYX002.jsp
src/main/webapp/HG/YX/HGYX002.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007.java
View file @
51b1512b
...
@@ -115,7 +115,8 @@ public class HGSC007 extends DaoEPBase {
...
@@ -115,7 +115,8 @@ public class HGSC007 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HGSC007.update"
;
public
static
final
String
UPDATE
=
"HGSC007.update"
;
public
static
final
String
DELETE
=
"HGSC007.delete"
;
public
static
final
String
DELETE
=
"HGSC007.delete"
;
public
static
final
String
QUERY_SUM_WT
=
"HGSC007.querySumWt"
;
/*查询累计产量*/
public
static
final
String
QUERY_SUM_WT
=
"HGSC007.querySumWt"
;
/*查询累计产量*/
public
static
final
String
QUERY_DAY_WT
=
"HGSC007.queryDayWt"
;
/*查询工序产量*/
public
static
final
String
QUERY_DAY_WT
=
"HGSC007.queryDayWt"
;
/*查询工序日产量*/
public
static
final
String
QUERY_MONTH_WT
=
"HGSC007.queryMonthWt"
;
/*查询工序月产量*/
public
static
final
String
QUERY_PROJ_CODE_WT
=
"HGSC007.queryProjCodeWt"
;
/*查询项目产量*/
public
static
final
String
QUERY_PROJ_CODE_WT
=
"HGSC007.queryProjCodeWt"
;
/*查询项目产量*/
private
Long
id
=
new
Long
(
0
);
private
Long
id
=
new
Long
(
0
);
...
...
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007POJO.java
0 → 100644
View file @
51b1512b
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.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author LiuYang
* @version 1.0 2024/6/14
*/
public
class
HGSC007POJO
extends
DaoEPBase
{
public
static
final
String
FIELD_id
=
"id"
;
public
static
final
String
FIELD_mat_id
=
"matId"
;
/* 物料清单ID*/
public
static
final
String
FIELD_order_id
=
"orderId"
;
/* 生产计划ID*/
public
static
final
String
FIELD_order_detail_id
=
"orderDetailId"
;
/* 生产计划明细ID*/
public
static
final
String
FIELD_tech_flow_id
=
"techFlowId"
;
/* 工艺流程ID*/
public
static
final
String
FIELD_tech_flow_name
=
"techFlowName"
;
/* 工艺流程名称*/
public
static
final
String
FIELD_invent_process_id
=
"inventProcessId"
;
/* 存货工序ID,对应HGPZ005A.id*/
public
static
final
String
FIELD_process_code
=
"processCode"
;
/* 工序编码*/
public
static
final
String
FIELD_process_name
=
"processName"
;
/* 工序名称*/
public
static
final
String
FIELD_process_order
=
"processOrder"
;
/* 加工顺序*/
public
static
final
String
FIELD_company_code
=
"companyCode"
;
/* 公司编码*/
public
static
final
String
FIELD_company_name
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_dep_code
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_dep_name
=
"depName"
;
/* 部门名称*/
public
static
final
String
FIELD_proj_code
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_proj_name
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_task_code
=
"taskCode"
;
/* 任务编码*/
public
static
final
String
FIELD_product_type
=
"productType"
;
/* 产品类型*/
public
static
final
String
FIELD_product_code
=
"productCode"
;
/* 产品编号*/
public
static
final
String
FIELD_product_name
=
"productName"
;
/* 产品名称*/
public
static
final
String
FIELD_plan_start_date
=
"planStartDate"
;
/* 计划开始日期*/
public
static
final
String
FIELD_plan_end_date
=
"planEndDate"
;
/* 计划结束日期*/
public
static
final
String
FIELD_factory_code
=
"factoryCode"
;
/* 工厂编号*/
public
static
final
String
FIELD_factory_name
=
"factoryName"
;
/* 工厂名称*/
public
static
final
String
FIELD_group_code
=
"groupCode"
;
/* 工作组编号*/
public
static
final
String
FIELD_group_name
=
"groupName"
;
/* 工作组名称*/
public
static
final
String
FIELD_complete_date
=
"completeDate"
;
/* 完工日期*/
public
static
final
String
FIELD_quantity
=
"quantity"
;
/* 数量*/
public
static
final
String
FIELD_finish_quantity
=
"finishQuantity"
;
/* 完工数量*/
public
static
final
String
FIELD_unfinish_quantity
=
"unfinishQuantity"
;
/* 未完工数量*/
public
static
final
String
FIELD_single_weight
=
"singleWeight"
;
/* 单重*/
public
static
final
String
FIELD_total_weight
=
"totalWeight"
;
/* 总重*/
public
static
final
String
FIELD_finish_weight
=
"finishWeight"
;
/* 完工重量*/
public
static
final
String
FIELD_unfinish_weight
=
"unfinishWeight"
;
/* 未完工重量*/
public
static
final
String
FIELD_account_code
=
"accountCode"
;
/* 帐套*/
public
static
final
String
FIELD_day_weight
=
"dayWeight"
;
/* 日重量*/
public
static
final
String
FIELD_month_weight
=
"monthWeight"
;
/* 月重量*/
public
static
final
String
FIELD_year_weight
=
"yearWeight"
;
/* 年重量*/
private
Long
id
=
new
Long
(
0
);
private
String
processCode
=
" "
;
/* 工序编码*/
private
String
processName
=
" "
;
/* 工序名称*/
private
String
accountCode
=
" "
;
/* 帐套*/
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
depName
=
" "
;
/* 部门名称*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
taskCode
=
" "
;
/* 任务编码*/
private
Integer
productType
=
new
Integer
(
0
);
/* 产品类型*/
private
String
productCode
=
" "
;
/* 产品编号*/
private
String
productName
=
" "
;
/* 产品名称*/
private
String
planStartDate
=
" "
;
/* 计划开始日期*/
private
String
planEndDate
=
" "
;
/* 计划结束日期*/
private
String
factoryCode
=
" "
;
/* 工厂编号*/
private
String
factoryName
=
" "
;
/* 工厂名称*/
private
String
groupCode
=
" "
;
/* 工作组编号*/
private
String
groupName
=
" "
;
/* 工作组名称*/
private
String
completeDate
=
" "
;
/* 完工日期*/
private
Integer
quantity
=
new
Integer
(
0
);
/* 数量*/
private
Integer
finishQuantity
=
new
Integer
(
0
);
/* 完工数量*/
private
Integer
unfinishQuantity
=
new
Integer
(
0
);
/* 未完工数量*/
private
BigDecimal
singleWeight
=
new
BigDecimal
(
"0"
);
/* 单重*/
private
BigDecimal
totalWeight
=
new
BigDecimal
(
"0"
);
/* 总重*/
private
BigDecimal
finishWeight
=
new
BigDecimal
(
"0"
);
/* 完工重量*/
private
BigDecimal
unfinishWeight
=
new
BigDecimal
(
"0"
);
/* 未完工重量*/
private
BigDecimal
dayWeight
=
new
BigDecimal
(
"0"
);
/* 日重量*/
private
BigDecimal
monthWeight
=
new
BigDecimal
(
"0"
);
/* 月重量*/
private
BigDecimal
yearWeight
=
new
BigDecimal
(
"0"
);
/* 年重量*/
public
HGSC007POJO
(){
initMetaData
();
}
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_id
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_mat_id
);
eiColumn
.
setDescName
(
"物料清单ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_order_id
);
eiColumn
.
setDescName
(
"生产计划ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_order_detail_id
);
eiColumn
.
setDescName
(
"生产计划明细ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_tech_flow_id
);
eiColumn
.
setDescName
(
"工艺流程ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_tech_flow_name
);
eiColumn
.
setDescName
(
"工艺流程名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_invent_process_id
);
eiColumn
.
setDescName
(
"存货工序ID,对应HGPZ005A.id"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_process_code
);
eiColumn
.
setDescName
(
"工序编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_process_name
);
eiColumn
.
setDescName
(
"工序名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_process_order
);
eiColumn
.
setDescName
(
"加工顺序"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_company_code
);
eiColumn
.
setDescName
(
"公司编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_company_name
);
eiColumn
.
setDescName
(
"公司名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_dep_code
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_dep_name
);
eiColumn
.
setDescName
(
"部门名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_proj_code
);
eiColumn
.
setDescName
(
"项目编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_proj_name
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_task_code
);
eiColumn
.
setDescName
(
"任务编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_product_type
);
eiColumn
.
setDescName
(
"产品类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_product_code
);
eiColumn
.
setDescName
(
"产品编号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_product_name
);
eiColumn
.
setDescName
(
"产品名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_plan_start_date
);
eiColumn
.
setDescName
(
"计划开始日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_plan_end_date
);
eiColumn
.
setDescName
(
"计划结束日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_factory_code
);
eiColumn
.
setDescName
(
"工厂编号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_factory_name
);
eiColumn
.
setDescName
(
"工厂名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_group_code
);
eiColumn
.
setDescName
(
"工作组编号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_group_name
);
eiColumn
.
setDescName
(
"工作组名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_complete_date
);
eiColumn
.
setDescName
(
"完工日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_quantity
);
eiColumn
.
setDescName
(
"数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_finish_quantity
);
eiColumn
.
setDescName
(
"完工数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_unfinish_quantity
);
eiColumn
.
setDescName
(
"未完工数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_single_weight
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"单重"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_total_weight
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"总重"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_finish_weight
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"完工重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_unfinish_weight
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"未完工重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_account_code
);
eiColumn
.
setDescName
(
"帐套"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_day_weight
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"日重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_month_weight
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"月重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_year_weight
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"年重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getProcessCode
()
{
return
processCode
;
}
public
void
setProcessCode
(
String
processCode
)
{
this
.
processCode
=
processCode
;
}
public
String
getProcessName
()
{
return
processName
;
}
public
void
setProcessName
(
String
processName
)
{
this
.
processName
=
processName
;
}
public
String
getCompanyCode
()
{
return
companyCode
;
}
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
public
String
getDepCode
()
{
return
depCode
;
}
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
public
String
getDepName
()
{
return
depName
;
}
public
void
setDepName
(
String
depName
)
{
this
.
depName
=
depName
;
}
public
String
getProjCode
()
{
return
projCode
;
}
public
void
setProjCode
(
String
projCode
)
{
this
.
projCode
=
projCode
;
}
public
String
getProjName
()
{
return
projName
;
}
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
}
public
String
getTaskCode
()
{
return
taskCode
;
}
public
void
setTaskCode
(
String
taskCode
)
{
this
.
taskCode
=
taskCode
;
}
public
Integer
getProductType
()
{
return
productType
;
}
public
void
setProductType
(
Integer
productType
)
{
this
.
productType
=
productType
;
}
public
String
getProductCode
()
{
return
productCode
;
}
public
void
setProductCode
(
String
productCode
)
{
this
.
productCode
=
productCode
;
}
public
String
getProductName
()
{
return
productName
;
}
public
void
setProductName
(
String
productName
)
{
this
.
productName
=
productName
;
}
public
String
getPlanStartDate
()
{
return
planStartDate
;
}
public
void
setPlanStartDate
(
String
planStartDate
)
{
this
.
planStartDate
=
planStartDate
;
}
public
String
getPlanEndDate
()
{
return
planEndDate
;
}
public
void
setPlanEndDate
(
String
planEndDate
)
{
this
.
planEndDate
=
planEndDate
;
}
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
;
}
public
String
getCompleteDate
()
{
return
completeDate
;
}
public
void
setCompleteDate
(
String
completeDate
)
{
this
.
completeDate
=
completeDate
;
}
public
Integer
getQuantity
()
{
return
quantity
;
}
public
void
setQuantity
(
Integer
quantity
)
{
this
.
quantity
=
quantity
;
}
public
Integer
getFinishQuantity
()
{
return
finishQuantity
;
}
public
void
setFinishQuantity
(
Integer
finishQuantity
)
{
this
.
finishQuantity
=
finishQuantity
;
}
public
Integer
getUnfinishQuantity
()
{
return
unfinishQuantity
;
}
public
void
setUnfinishQuantity
(
Integer
unfinishQuantity
)
{
this
.
unfinishQuantity
=
unfinishQuantity
;
}
public
BigDecimal
getSingleWeight
()
{
return
singleWeight
;
}
public
void
setSingleWeight
(
BigDecimal
singleWeight
)
{
this
.
singleWeight
=
singleWeight
;
}
public
BigDecimal
getTotalWeight
()
{
return
totalWeight
;
}
public
void
setTotalWeight
(
BigDecimal
totalWeight
)
{
this
.
totalWeight
=
totalWeight
;
}
public
BigDecimal
getFinishWeight
()
{
return
finishWeight
;
}
public
void
setFinishWeight
(
BigDecimal
finishWeight
)
{
this
.
finishWeight
=
finishWeight
;
}
public
BigDecimal
getUnfinishWeight
()
{
return
unfinishWeight
;
}
public
void
setUnfinishWeight
(
BigDecimal
unfinishWeight
)
{
this
.
unfinishWeight
=
unfinishWeight
;
}
public
String
getAccountCode
()
{
return
accountCode
;
}
public
void
setAccountCode
(
String
accountCode
)
{
this
.
accountCode
=
accountCode
;
}
public
BigDecimal
getDayWeight
()
{
return
dayWeight
;
}
public
void
setDayWeight
(
BigDecimal
dayWeight
)
{
this
.
dayWeight
=
dayWeight
;
}
public
BigDecimal
getMonthWeight
()
{
return
monthWeight
;
}
public
void
setMonthWeight
(
BigDecimal
monthWeight
)
{
this
.
monthWeight
=
monthWeight
;
}
public
BigDecimal
getYearWeight
()
{
return
yearWeight
;
}
public
void
setYearWeight
(
BigDecimal
yearWeight
)
{
this
.
yearWeight
=
yearWeight
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_id
)),
id
));
setProcessCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_process_code
)),
processCode
));
setProcessName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_process_name
)),
processName
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_company_code
)),
companyCode
));
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_company_name
)),
companyName
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_dep_code
)),
depCode
));
setDepName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_dep_name
)),
depName
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_code
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_name
)),
projName
));
setTaskCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_task_code
)),
taskCode
));
setProductType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_type
)),
productType
));
setProductCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_code
)),
productCode
));
setProductName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_product_name
)),
productName
));
setPlanStartDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_plan_start_date
)),
planStartDate
));
setPlanEndDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_plan_end_date
)),
planEndDate
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_factory_code
)),
factoryCode
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_factory_name
)),
factoryName
));
setGroupCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_group_code
)),
groupCode
));
setGroupName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_group_name
)),
groupName
));
setCompleteDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_complete_date
)),
completeDate
));
setQuantity
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_quantity
)),
quantity
));
setFinishQuantity
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_finish_quantity
)),
finishQuantity
));
setUnfinishQuantity
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_unfinish_quantity
)),
unfinishQuantity
));
setSingleWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_single_weight
)),
singleWeight
));
setTotalWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_total_weight
)),
totalWeight
));
setFinishWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_finish_weight
)),
finishWeight
));
setUnfinishWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_unfinish_weight
)),
unfinishWeight
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_account_code
)),
accountCode
));
setDayWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_day_weight
)),
dayWeight
));
setMonthWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_month_weight
)),
monthWeight
));
setYearWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_year_weight
)),
yearWeight
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_id
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_id
)));
map
.
put
(
FIELD_process_code
,
StringUtils
.
toString
(
processCode
,
eiMetadata
.
getMeta
(
FIELD_process_code
)));
map
.
put
(
FIELD_process_name
,
StringUtils
.
toString
(
processName
,
eiMetadata
.
getMeta
(
FIELD_process_name
)));
map
.
put
(
FIELD_company_code
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_company_code
)));
map
.
put
(
FIELD_company_name
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_company_name
)));
map
.
put
(
FIELD_dep_code
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_dep_code
)));
map
.
put
(
FIELD_dep_name
,
StringUtils
.
toString
(
depName
,
eiMetadata
.
getMeta
(
FIELD_dep_name
)));
map
.
put
(
FIELD_proj_code
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_proj_code
)));
map
.
put
(
FIELD_proj_name
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_proj_name
)));
map
.
put
(
FIELD_task_code
,
StringUtils
.
toString
(
taskCode
,
eiMetadata
.
getMeta
(
FIELD_task_code
)));
map
.
put
(
FIELD_product_type
,
StringUtils
.
toString
(
productType
,
eiMetadata
.
getMeta
(
FIELD_product_type
)));
map
.
put
(
FIELD_product_code
,
StringUtils
.
toString
(
productCode
,
eiMetadata
.
getMeta
(
FIELD_product_code
)));
map
.
put
(
FIELD_product_name
,
StringUtils
.
toString
(
productName
,
eiMetadata
.
getMeta
(
FIELD_product_name
)));
map
.
put
(
FIELD_plan_start_date
,
StringUtils
.
toString
(
planStartDate
,
eiMetadata
.
getMeta
(
FIELD_plan_start_date
)));
map
.
put
(
FIELD_plan_end_date
,
StringUtils
.
toString
(
planEndDate
,
eiMetadata
.
getMeta
(
FIELD_plan_end_date
)));
map
.
put
(
FIELD_factory_code
,
StringUtils
.
toString
(
factoryCode
,
eiMetadata
.
getMeta
(
FIELD_factory_code
)));
map
.
put
(
FIELD_factory_name
,
StringUtils
.
toString
(
factoryName
,
eiMetadata
.
getMeta
(
FIELD_factory_name
)));
map
.
put
(
FIELD_group_code
,
StringUtils
.
toString
(
groupCode
,
eiMetadata
.
getMeta
(
FIELD_group_code
)));
map
.
put
(
FIELD_group_name
,
StringUtils
.
toString
(
groupName
,
eiMetadata
.
getMeta
(
FIELD_group_name
)));
map
.
put
(
FIELD_complete_date
,
StringUtils
.
toString
(
completeDate
,
eiMetadata
.
getMeta
(
FIELD_complete_date
)));
map
.
put
(
FIELD_quantity
,
StringUtils
.
toString
(
quantity
,
eiMetadata
.
getMeta
(
FIELD_quantity
)));
map
.
put
(
FIELD_finish_quantity
,
StringUtils
.
toString
(
finishQuantity
,
eiMetadata
.
getMeta
(
FIELD_finish_quantity
)));
map
.
put
(
FIELD_unfinish_quantity
,
StringUtils
.
toString
(
unfinishQuantity
,
eiMetadata
.
getMeta
(
FIELD_unfinish_quantity
)));
map
.
put
(
FIELD_single_weight
,
StringUtils
.
toString
(
singleWeight
,
eiMetadata
.
getMeta
(
FIELD_single_weight
)));
map
.
put
(
FIELD_total_weight
,
StringUtils
.
toString
(
totalWeight
,
eiMetadata
.
getMeta
(
FIELD_total_weight
)));
map
.
put
(
FIELD_finish_weight
,
StringUtils
.
toString
(
finishWeight
,
eiMetadata
.
getMeta
(
FIELD_finish_weight
)));
map
.
put
(
FIELD_unfinish_weight
,
StringUtils
.
toString
(
unfinishWeight
,
eiMetadata
.
getMeta
(
FIELD_unfinish_weight
)));
map
.
put
(
FIELD_account_code
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_account_code
)));
map
.
put
(
FIELD_day_weight
,
StringUtils
.
toString
(
dayWeight
,
eiMetadata
.
getMeta
(
FIELD_day_weight
)));
map
.
put
(
FIELD_month_weight
,
StringUtils
.
toString
(
monthWeight
,
eiMetadata
.
getMeta
(
FIELD_month_weight
)));
map
.
put
(
FIELD_year_weight
,
StringUtils
.
toString
(
yearWeight
,
eiMetadata
.
getMeta
(
FIELD_year_weight
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
View file @
51b1512b
...
@@ -22,10 +22,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
...
@@ -22,10 +22,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
...
@@ -96,13 +93,12 @@ import java.util.Map;
...
@@ -96,13 +93,12 @@ import java.util.Map;
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
for
(
Org
org
:
orgs
)
{
List
<
Map
>
org1
=
DaoBase
.
getInstance
().
query
(
"HGXSOrg.queryFactoryComboBox"
,
new
HashMap
<
String
,
Object
>(){{
put
(
Org
.
FIELD_PARENT_ORG_ID
,
org
.
getOrgId
());
}});
for
(
Org
org
:
orgs
)
{
factoryCodes
.
addAll
(
org1
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
Org
.
FIELD_ORG_ID
,
org
.
getFactoryCode
());
map
.
put
(
Org
.
FIELD_ORG_CNAME
,
org
.
getFactoryName
());
factoryCodes
.
add
(
map
);
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"APP查询工厂失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"APP查询工厂失败"
);
...
@@ -111,48 +107,109 @@ import java.util.Map;
...
@@ -111,48 +107,109 @@ import java.util.Map;
}
}
/**
/**
* app查询工序累计产量
*/
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询工序累计产量"
,
operDesc
=
"APP查询工序累计产量"
)
public
EiInfo
getProcessSumWt
(
EiInfo
inInfo
)
{
try
{
EiBlock
queryRow
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
String
companyCode
=
queryRow
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_company_code
);
if
(
StringUtils
.
isEmpty
(
companyCode
))
{
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
}
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_SUM_WT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* app查询工序产量
* app查询工序产量
*/
*/
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询产量"
,
operDesc
=
"APP查询产量"
)
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询工序产量"
,
operDesc
=
"APP查询工序产量"
)
public
Map
<
String
,
List
>
getWt
(
EiInfo
inInfo
)
{
public
EiInfo
getProcessWt
(
EiInfo
inInfo
)
{
Map
<
String
,
List
>
map
=
new
HashMap
<>();
try
{
try
{
EiBlock
queryRow
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
companyCode
=
queryRow
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_company_code
);
Object
companyCode
=
queryRow
.
get
(
HGSC007
.
FIELD_company_code
);
if
(
StringUtils
.
isEmpty
(
companyCode
))
{
if
(
companyCode
==
null
)
{
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
put
(
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
//queryRow.put(HGSC007.FIELD_company_name,userVO.getUsername());
}
}
List
sumList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_SUM_WT
,
queryRow
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_DAY_WT
);
List
dayList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_DAY_WT
,
queryRow
);
map
.
put
(
"sumList"
,
sumList
);
map
.
put
(
"dayList"
,
dayList
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
return
map
;
return
inInfo
;
}
/**
* app查询工序日产量
*/
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询工序日产量"
,
operDesc
=
"APP查询工序日产量"
)
public
EiInfo
getProcessDayWt
(
EiInfo
inInfo
)
{
try
{
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
);
if
(
StringUtils
.
isNotEmpty
(
endDate
))
{
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
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* app查询工序日产量
*/
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询工序日产量"
,
operDesc
=
"APP查询工序日产量"
)
public
EiInfo
getProcessMonthWt
(
EiInfo
inInfo
)
{
try
{
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
);
if
(
StringUtils
.
isNotEmpty
(
endDate
))
{
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
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
}
/**
/**
* app查询工序产量
* app查询工序产量
*/
*/
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询项目产量"
,
operDesc
=
"APP查询项目产量"
)
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询项目产量"
,
operDesc
=
"APP查询项目产量"
)
public
List
getProjCodeWt
(
EiInfo
inInfo
)
{
public
EiInfo
getProjCodeWt
(
EiInfo
inInfo
)
{
List
sumList
=
null
;
try
{
try
{
EiBlock
queryRow
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
//Map queryRow = EiInfoUtils.getFirstRow(inInfo);
Object
companyCode
=
queryRow
.
get
(
HGSC007
.
FIELD_company_code
);
String
companyCode
=
queryRow
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_company_code
);
if
(
companyCode
==
null
)
{
if
(
StringUtils
.
isEmpty
(
companyCode
))
{
queryRow
.
put
(
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
//queryRow.put(HGSC007.FIELD_company_name,userVO.getUsername());
}
}
sumList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_PROJ_CODE_WT
,
queryRow
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_PROJ_CODE_WT
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
return
sumList
;
return
inInfo
;
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
51b1512b
...
@@ -185,6 +185,43 @@
...
@@ -185,6 +185,43 @@
</isEqual>
</isEqual>
</sql>
</sql>
<sql
id=
"appCondition"
>
<!-- 无权限时使用 -->
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
h.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
(h.CREATED_BY = #authOnlyPeople# OR h.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
<isNotEmpty
property=
"authOnlyPeople"
>
h.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty
property=
"authDepCodes"
>
h.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql
id=
"appOrderCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
h.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
h.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
h.company_name = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
h2.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
h2.factory_name = #factoryName#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC007"
>
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC007"
>
SELECT
SELECT
...
@@ -492,164 +529,127 @@
...
@@ -492,164 +529,127 @@
select
select
a.factoryCode ,
a.factoryCode ,
a.factoryName ,
a.factoryName ,
sum(a.dayWt) as dayWt,
sum(a.dayWt) as dayW
eigh
t,
sum(a.monthWt) as monthWt,
sum(a.monthWt) as monthW
eigh
t,
sum(a.yearWt) as yearWt
sum(a.yearWt) as yearW
eigh
t
from (
from (
select
select
factory_code as factoryCode ,
h2.
factory_code as factoryCode ,
factory_name as factoryName ,
h2.
factory_name as factoryName ,
0 as dayWt,
0 as dayWt,
0 as monthWt,
0 as monthWt,
sum(finish_weight) as yearWt
sum(h.finish_weight) as yearWt
from hggp.hgsc007 where 1 = 1 and left(created_time,4) = LEFT(#createdTime#,4)
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
<include
refid=
"HGXSDataAuth.authCondition"
/>
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<include
refid=
"appCondition"
/>
account_code = #accountCode#
<include
refid=
"appOrderCondition"
/>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depositDate"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
LEFT(h.DEPOSIT_DATE,4) = LEFT(#depositDate#,4)
company_code = #companyCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
group by h.DEPOSIT_DATE, h2.factory_code, h2.factory_name
company_name = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
factory_name = #factoryName#
</isNotEmpty>
group by factory_code , factory_name
union all
union all
select
select
factory_code as factoryCode ,
h2.
factory_code as factoryCode ,
factory_name as factoryName ,
h2.
factory_name as factoryName ,
0 as dayWt,
0 as dayWt,
sum(finish_weight) as monthWt,
sum(
h.
finish_weight) as monthWt,
0 as yearWt
0 as yearWt
from hggp.hgsc007 where 1 = 1 and left(created_time,6) = LEFT(#createdTime#,6)
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
<include
refid=
"HGXSDataAuth.authCondition"
/>
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<include
refid=
"appCondition"
/>
account_code = #accountCode#
<include
refid=
"appOrderCondition"
/>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depositDate"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
LEFT(h.DEPOSIT_DATE,6) = LEFT(#depositDate#,6)
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
company_name = #companyName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
group by h.DEPOSIT_DATE, h2.factory_code, h2.factory_name
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
factory_name = #factoryName#
</isNotEmpty>
group by factory_code , factory_name
union all
union all
select
select
factory_code as factoryCode ,
h2.
factory_code as factoryCode ,
factory_name as factoryName ,
h2.
factory_name as factoryName ,
sum(finish_weight) as dayWt,
sum(
h.
finish_weight) as dayWt,
0 as monthWt,
0 as monthWt,
0 as yearWt
0 as yearWt
from hggp.hgsc007 where 1 = 1 and left(created_time,8) = LEFT(#createdTime#,8)
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
<include
refid=
"HGXSDataAuth.authCondition"
/>
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<include
refid=
"appCondition"
/>
account_code = #accountCode#
<include
refid=
"appOrderCondition"
/>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depositDate"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
LEFT(h.DEPOSIT_DATE,8) = LEFT(#depositDate#,8)
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
company_name = #companyName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
group by h.DEPOSIT_DATE, h2.factory_code, h2.factory_name
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
factory_name = #factoryName#
</isNotEmpty>
group by factory_code , factory_name
) a
) a
group by a.factoryCode , a.factoryName
group by a.factoryCode , a.factoryName
</select>
</select>
<!--查询工序日产量-->
<!--查询工序日产量-->
<select
id=
"queryDayWt"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryDayWt"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
select
factory_code as factoryCode ,
h.DEPOSIT_DATE as "completeDate",
factory_name as factoryName ,
h2.factory_code as "factoryCode",
process_code as processCode ,
h2.factory_name as "factoryName",
process_name as processName ,
h2.process_code as "processCode",
sum(finish_weight) finishWeight
h2.process_name as "processName",
from hggp.HGSC007
SUM(h.INV_WEIGHT) "totalWeight"
where 1 = 1 and left(created_time,8) = #createdTime#
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
<include
refid=
"HGXSDataAuth.authCondition"
/>
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<include
refid=
"appCondition"
/>
account_code = #accountCode#
<include
refid=
"appOrderCondition"
/>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"endDate"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
h.DEPOSIT_DATE between #startDate# and #endDate#
company_code = #companyCode#
</isNotEmpty>
</isNotEmpty>
group by h.DEPOSIT_DATE, h2.factory_code, h2.factory_name, h2.process_code, h2.process_name
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
order by h.DEPOSIT_DATE asc
company_name = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
factory_name = #factoryName#
</isNotEmpty>
group by factory_code , factory_name , process_code , process_name;
</select>
</select>
<!--查询工序月产量-->
<select
id=
"queryMonthWt"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
left(h.DEPOSIT_DATE,6) as "completeDate",
h2.factory_code as "factoryCode",
h2.factory_name as "factoryName",
h2.process_code as "processCode",
h2.process_name as "processName",
SUM(h.INV_WEIGHT) "totalWeight"
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include
refid=
"appCondition"
/>
<include
refid=
"appOrderCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"endDate"
>
left(h.DEPOSIT_DATE,6) between left(#startDate#,6) and left(#endDate#,6)
</isNotEmpty>
group by h.DEPOSIT_DATE, h2.factory_code, h2.factory_name, h2.process_code, h2.process_name
order by h.DEPOSIT_DATE asc
</select>
<!--项目产量-->
<select
id=
"queryProjCodeWt"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryProjCodeWt"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
select
b
.factory_code as factoryCode ,
h2
.factory_code as factoryCode ,
b
.factory_name as factoryName ,
h2
.factory_name as factoryName ,
a
.proj_code as projCode,
h
.proj_code as projCode,
a
.proj_name as projName,
h
.proj_name as projName,
a.plan_end_date as planEnd
Date,
h.finish_date as complete
Date,
sum(
a
.total_weight) as totalWeight,
sum(
h
.total_weight) as totalWeight,
sum(
a
.finish_weight) as finishWeight
sum(
h
.finish_weight) as finishWeight
from
hggp.HGSC005a a inner join hggp.HGSC007 b on a.id = b
.order_detail_id
from
${hggpSchema}.HGSC005a h inner join ${hggpSchema}.HGSC007 h2 on h.id = h2
.order_detail_id
where 1 = 1
where 1 = 1
<include
refid=
"appCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
a
.account_code = #accountCode#
h
.account_code = #accountCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
a
.company_code = #companyCode#
h
.company_code = #companyCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
a
.company_name = #companyName#
h
.company_name = #companyName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
b
.factory_code = #factoryCode#
h2
.factory_code = #factoryCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
b
.factory_name = #factoryName#
h2
.factory_name = #factoryName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
planEnd
Date"
>
<isNotEmpty
prepend=
" AND "
property=
"
finish
Date"
>
a.plan_end_date = #planEnd
Date#
h.finish_date = #finish
Date#
</isNotEmpty>
</isNotEmpty>
<!-- 无权限时使用 -->
group by h2.factory_code, h2.factory_name, h.proj_code, h.proj_name, h.finish_date
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
order by h.finish_date desc
a.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
(a.CREATED_BY = #authOnlyPeople# OR a.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
<isNotEmpty
property=
"authOnlyPeople"
>
a.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty
property=
"authDepCodes"
>
a.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEqual>
group by b.factory_code , b.factory_name , a.proj_code , a.proj_name, a.plan_end_date
</select>
</select>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSOrg.xml
View file @
51b1512b
...
@@ -228,7 +228,9 @@
...
@@ -228,7 +228,9 @@
A.ORG_TYPE AS "orgType",
A.ORG_TYPE AS "orgType",
A.ACCOUNT_CODE AS "accounCcode",
A.ACCOUNT_CODE AS "accounCcode",
A.FACTORY_CODE AS "factoryCode",
A.FACTORY_CODE AS "factoryCode",
A.FACTORY_NAME AS "factoryName",
A.COMPANY_CODE AS "companyCode",
A.COMPANY_CODE AS "companyCode",
A.COMPANY_NAME AS "companyName",
A.PARENT_ORG_ID as "parentOrgId"
A.PARENT_ORG_ID as "parentOrgId"
FROM ${platSchema}.TXSOG01 A, ${platSchema}.TXSOG02 B, ${platSchema}.XS_USER C
FROM ${platSchema}.TXSOG01 A, ${platSchema}.TXSOG02 B, ${platSchema}.XS_USER C
WHERE 1=1
WHERE 1=1
...
...
src/main/java/com/baosight/hggp/util/DateUtil.java
View file @
51b1512b
...
@@ -80,9 +80,13 @@ public class DateUtil {
...
@@ -80,9 +80,13 @@ public class DateUtil {
* @return
* @return
*/
*/
public
static
String
getMonthOfDays
(
String
date
){
public
static
String
getMonthOfDays
(
String
date
){
return
getMonthOfDays
(
date
,
-
1
,
DATE10_PATTERN
);
}
public
static
String
getMonthOfDays
(
String
date
,
int
month
,
String
pattern
){
Calendar
calendar
=
Calendar
.
getInstance
();
//日历对象
Calendar
calendar
=
Calendar
.
getInstance
();
//日历对象
calendar
.
setTime
(
Objects
.
requireNonNull
(
DateUtil
.
toDate
(
date
,
DATE10_PATTERN
)));
//设置当前日期
calendar
.
setTime
(
Objects
.
requireNonNull
(
DateUtil
.
toDate
(
date
,
pattern
)));
//设置当前日期
calendar
.
add
(
Calendar
.
MONTH
,
-
1
);
//月份减一
calendar
.
add
(
Calendar
.
MONTH
,
month
);
//月份减一
return
DateUtil
.
toDateStr
(
calendar
.
getTime
(),
DATE8_PATTERN
);
//输出上个月的日期
return
DateUtil
.
toDateStr
(
calendar
.
getTime
(),
DATE8_PATTERN
);
//输出上个月的日期
}
}
...
...
src/main/webapp/HG/YX/HGYX001.js
View file @
51b1512b
...
@@ -16,6 +16,8 @@ $(function () {
...
@@ -16,6 +16,8 @@ $(function () {
if
(
!
isBlank
(
item
.
id
)){
if
(
!
isBlank
(
item
.
id
)){
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="showDetail('
+
item
.
id
+
')" >发货详情</a>'
;
+
'onclick="showDetail('
+
item
.
id
+
')" >发货详情</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
')" >附件详情</a>'
;
/*if (auditStatus == 0) {
/*if (auditStatus == 0) {
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="updateStatus(' + item.id + ',1)" >审核</a>';
'onclick="updateStatus(' + item.id + ',1)" >审核</a>';
...
@@ -335,6 +337,21 @@ function commit() {
...
@@ -335,6 +337,21 @@ function commit() {
}
}
/**
* 显示附件清单
*
* @param id
*/
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HGSB099?methodName=initLoad&inqu_status-0-matId="
+
id
+
"&inqu_status-0-bizType=YX001"
,
title
:
"<div style='text-align: center;'>附件详情</div>"
,
width
:
"70%"
,
height
:
"50%"
,
//callbackName: uploadFileCallback
});
}
function
windowCallback
(
ei
)
{
function
windowCallback
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
// 刷新列表
// 刷新列表
...
@@ -342,4 +359,4 @@ function windowCallback(ei) {
...
@@ -342,4 +359,4 @@ function windowCallback(ei) {
// 关闭弹窗
// 关闭弹窗
JSColorbox
.
close
();
JSColorbox
.
close
();
}
}
}
}
\ No newline at end of file
src/main/webapp/HG/YX/HGYX001.jsp
View file @
51b1512b
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="1
2
0" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="1
4
0" align="center"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
...
...
src/main/webapp/HG/YX/HGYX002.js
View file @
51b1512b
...
@@ -16,6 +16,8 @@ $(function () {
...
@@ -16,6 +16,8 @@ $(function () {
if
(
!
isBlank
(
item
.
id
)){
if
(
!
isBlank
(
item
.
id
)){
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="showDetail('
+
item
.
id
+
')" >退货详情</a>'
;
+
'onclick="showDetail('
+
item
.
id
+
')" >退货详情</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
')" >附件详情</a>'
;
/*if (auditStatus == 0) {
/*if (auditStatus == 0) {
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="updateStatus(' + item.id + ',1)" >审核</a>';
'onclick="updateStatus(' + item.id + ',1)" >审核</a>';
...
@@ -212,4 +214,18 @@ function windowCallback(ei) {
...
@@ -212,4 +214,18 @@ function windowCallback(ei) {
// 关闭弹窗
// 关闭弹窗
JSColorbox
.
close
();
JSColorbox
.
close
();
}
}
}
}
\ No newline at end of file
/**
* 显示附件清单
*
* @param id
*/
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HGSB099?methodName=initLoad&inqu_status-0-matId="
+
id
+
"&inqu_status-0-bizType=YX002"
,
title
:
"<div style='text-align: center;'>附件详情</div>"
,
width
:
"70%"
,
height
:
"50%"
,
//callbackName: uploadFileCallback
});
}
src/main/webapp/HG/YX/HGYX002.jsp
View file @
51b1512b
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="1
2
0" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="1
4
0" align="center"/>
<EF:EFComboColumn ename="projCode" enable="true" cname="项目名称" width="110" align="center"
<EF:EFComboColumn ename="projCode" enable="true" cname="项目名称" width="110" align="center"
filter="contains" readonly="true" required="true">
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
...
...
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