Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
9542fb70
Commit
9542fb70
authored
Nov 19, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.销售合同添加金额计算
2.修复物料清单生成模板功能bug 3.修改采购计划,采购申请,采购订单据逻辑
parent
435eb41c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
113 additions
and
12 deletions
+113
-12
DdynamicEnum.java
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
+9
-0
HPPZ019.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ019.xml
+31
-0
HPSC001.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC001.java
+15
-1
ServiceHPSC001.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC001.java
+1
-1
ServiceHPSC011.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC011.java
+1
-1
HPSC001.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC001.xml
+17
-6
HPPZ019.js
src/main/webapp/HP/PZ/HPPZ019.js
+18
-0
HPPZ019.jsp
src/main/webapp/HP/PZ/HPPZ019.jsp
+3
-3
HPSC001.jsp
src/main/webapp/HP/SC/HPSC001.jsp
+9
-0
HPSC011.jsp
src/main/webapp/HP/SC/HPSC011.jsp
+9
-0
No files found.
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
View file @
9542fb70
...
...
@@ -437,6 +437,15 @@ public enum DdynamicEnum {
* 编写:ly
*/
PRDT_CODE_BLOCK_ID
(
"prdtCode_block_id"
,
"prdtCode"
,
"prdtName"
,
"prodOrderNo"
,
"prdtSpec"
,
"partCode"
,
"partName"
,
"partSpec"
,
"workDate"
,
"assignedNum"
,
"unitWt"
,
"childId"
,
"HPSC005B.queryComboBox"
),
/**
* 模块:生产管理
* 用途:合同下拉框
* 编写:ly
*/
CONTRACT_CODE_BLOCK_ID
(
"contractCode_block_id"
,
"contractCode"
,
"contractName"
,
"HPPZ019.queryContractBox"
),
;
...
...
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ019.xml
View file @
9542fb70
...
...
@@ -268,4 +268,35 @@
ID = #id#
</update>
<select
id=
"queryContractBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT distinct
CONTRACT_CODE as "contractCode",
<!-- 合同号 -->
CONTRACT_NAME as "contractName"
<!-- 合同名称 -->
FROM ${hpjxSchema}.T_HPPZ019 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractDate"
>
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractCode"
>
CONTRACT_CODE LIKE CONCAT('%', #contractCode#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractName"
>
CONTRACT_NAME LIKE CONCAT('%', #contractName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planSalesCode"
>
PLAN_SALES_CODE LIKE CONCAT('%', #planSalesCode#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"custCode"
>
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractStatus"
>
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"approveStatus"
>
APPROVE_STATUS = #approveStatus#
</isNotEmpty>
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC001.java
View file @
9542fb70
...
...
@@ -36,6 +36,7 @@ public class HPSC001 extends DaoEPBase {
private
Integer
materialStatus
=
0
;
/* 物料提交状态0-未提交,1部分提交,2全部提交*/
private
String
projectSource
=
" "
;
/* 项目来源*/
private
String
contractCode
=
" "
;
/* 合同号*/
/**
* initialize the metadata
*/
...
...
@@ -118,6 +119,10 @@ public class HPSC001 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_project_source
);
eiColumn
.
setDescName
(
"项目来源"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"contractCode"
);
eiColumn
.
setDescName
(
"合同号"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor
...
...
@@ -379,6 +384,14 @@ public class HPSC001 extends DaoEPBase {
this
.
projectSource
=
projectSource
;
}
public
String
getContractCode
()
{
return
contractCode
;
}
public
void
setContractCode
(
String
contractCode
)
{
this
.
contractCode
=
contractCode
;
}
/**
* get the value from Map
*/
...
...
@@ -403,7 +416,7 @@ public class HPSC001 extends DaoEPBase {
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"remark"
)),
remark
));
setMaterialStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
"materialStatus"
)),
materialStatus
));
setProjectSource
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_project_source
)),
projectSource
));
setContractCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"contractCode"
)),
contractCode
));
}
/**
...
...
@@ -431,6 +444,7 @@ public class HPSC001 extends DaoEPBase {
map
.
put
(
"remark"
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
"remark"
)));
map
.
put
(
"materialStatus"
,
StringUtils
.
toString
(
materialStatus
,
eiMetadata
.
getMeta
(
"materialStatus"
)));
map
.
put
(
FIELD_project_source
,
StringUtils
.
toString
(
projectSource
,
eiMetadata
.
getMeta
(
FIELD_project_source
)));
map
.
put
(
"contractCode"
,
StringUtils
.
toString
(
contractCode
,
eiMetadata
.
getMeta
(
"contractCode"
)));
return
map
;
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC001.java
View file @
9542fb70
...
...
@@ -46,7 +46,7 @@ public class ServiceHPSC001 extends ServiceBase {
inInfo
=
super
.
query
(
inInfo
,
"HPSC001.query"
,
new
HPSC001
());
Map
map
=
new
HashMap
();
map
.
put
(
"companyCode"
,
UserSessionUtils
.
getCompanyCode
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_BLOCK_ID
),
map
,
true
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_BLOCK_ID
,
DdynamicEnum
.
CONTRACT_CODE_BLOCK_ID
),
map
,
true
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
CUSTOMER_RECORD_BLOCK_ID
),
null
);
map
.
clear
();
map
.
put
(
"itemCode"
,
"ITEM_CODE in ('4')"
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC011.java
View file @
9542fb70
...
...
@@ -31,7 +31,7 @@ public class ServiceHPSC011 extends ServiceBase {
inInfo
=
super
.
query
(
inInfo
,
"HPSC001.query"
,
new
HPSC001
());
Map
map
=
new
HashMap
();
map
.
put
(
"companyCode"
,
UserSessionUtils
.
getCompanyCode
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_BLOCK_ID
),
map
,
true
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_BLOCK_ID
,
DdynamicEnum
.
CONTRACT_CODE_BLOCK_ID
),
map
,
true
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
CUSTOMER_RECORD_BLOCK_ID
),
null
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC001
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC001.xml
View file @
9542fb70
...
...
@@ -30,7 +30,8 @@
DEP_CODE as "depCode",
<!-- 部门编码 -->
REMARK as "remark",
<!-- 备注 -->
MATERIAL_STATUS as "materialStatus",
project_source as "projectSource"
<!-- 项目来源 -->
project_source as "projectSource",
<!-- 项目来源 -->
CONTRACT_CODE as "contractCode"
FROM ${hpjxSchema}.t_hpsc001 T WHERE 1=1
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
@@ -73,6 +74,9 @@
<isNotEmpty
prepend=
" AND "
property=
"projectSource"
>
project_source = #projectSource#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractCode"
>
CONTRACT_CODE LIKE CONCAT('%', #contractCode#, '%')
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
...
...
@@ -181,10 +185,11 @@
UPDATED_TIME,
<!-- 更新时间 -->
DEP_CODE,
<!-- 部门编码 -->
REMARK,
project_source
project_source,
CONTRACT_CODE
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #deliveryDate#, #status#,
0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #projectSource#)
0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #projectSource#
, #contractCode#
)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hpjxSchema}.t_hpsc001
</selectKey>
...
...
@@ -213,7 +218,8 @@
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
REMARK = #remark#,
<!-- 备注 -->
project_source = #projectSource#
project_source = #projectSource#,
CONTRACT_CODE = #contractCode#
WHERE
ID = #id#
</update>
...
...
@@ -316,7 +322,8 @@
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
REMARK as "remark",
<!-- 备注 -->
PROJECT_SOURCE as "projectSource"
PROJECT_SOURCE as "projectSource",
CONTRACT_CODE as "contractCode"
FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
@@ -342,7 +349,8 @@
A.DEP_CODE as "depCode",
<!-- 部门编码 -->
A.REMARK as "remark",
<!-- 备注 -->
A.MATERIAL_STATUS as "materialStatus",
A.project_source as "projectSource"
<!-- 项目来源 -->
A.project_source as "projectSource",
<!-- 项目来源 -->
A.CONTRACT_CODE as "contractCode"
FROM ${hpjxSchema}.t_hpsc001 A
left join ${platSchema}.XS_USER B ON A.PRINC1 = B.LOGIN_NAME
left join ${hpjxSchema}.T_HPPZ003 C ON A.PRINC2 = C.CUST_CODE
...
...
@@ -390,6 +398,9 @@
<isNotEmpty
prepend=
" AND "
property=
"depCodes"
>
A.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"depCodes"
>
#depCodes[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractCode"
>
CONTRACT_CODE LIKE CONCAT('%', #contractCode#, '%')
</isNotEmpty>
ORDER BY A.STATUS, A.CREATED_TIME desc, A.DELIVERY_DATE desc
</select>
...
...
src/main/webapp/HP/PZ/HPPZ019.js
View file @
9542fb70
...
...
@@ -24,6 +24,10 @@ $(function () {
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="updateApproveStatus('
+
item
.
id
+
',0)" >撤回</a>'
;
}
if
(
item
.
id
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="uploadFile('
+
item
.
id
+
')" >附件详情</a>'
;
}
return
template
;
}
},{
...
...
@@ -345,3 +349,16 @@ function deleteDetail() {
});
}
}
/**
* 文件上传
*/
function
uploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HPSB099?methodName=initLoad&inqu_status-0-matId="
+
id
+
"&inqu_status-0-bizType=HPPZ19"
,
title
:
"<div style='text-align: center;'>附件详情</div>"
,
width
:
"60%"
,
height
:
"50%"
,
//callbackName: uploadFileCallback
});
}
\ No newline at end of file
src/main/webapp/HP/PZ/HPPZ019.jsp
View file @
9542fb70
...
...
@@ -44,10 +44,10 @@
<EF:EFRegion id="result" title="基本信息">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="1
0
0" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="1
4
0" align="center"/>
<EF:EFColumn ename="contractDate" cname="合同日期" width="100" align="center" readonly="true"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="contractCode" cname="合同号" width="1
0
0" align="center" readonly="true" required="true"/>
<EF:EFColumn ename="contractCode" cname="合同号" width="1
2
0" align="center" readonly="true" required="true"/>
<EF:EFColumn ename="contractName" cname="合同名称" width="120" align="center" readonly="true" required="true"/>
<EF:EFComboColumn ename="planSalesCode" cname="销售计划单号" blockName="planSalesCode_block_id"
columnTemplate="#=textField#-#=valueField#" itemTemplate="#=textField#-#=valueField#"
...
...
@@ -61,7 +61,7 @@
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractAmount" cname="合同金额" width="120" enable="
fals
e" format="{0:N3}" editType="text"
<EF:EFColumn ename="contractAmount" cname="合同金额" width="120" enable="
tru
e" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="20" required="true"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
...
...
src/main/webapp/HP/SC/HPSC001.jsp
View file @
9542fb70
...
...
@@ -40,6 +40,10 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="合同号" ename="inqu_status-0-contractCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="contractCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker ename="inqu_status-0-deliveryDate" cname="交货日期" role="date" format="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" colWidth="3"/>
</div>
...
...
@@ -49,6 +53,11 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center" sort="false"/>
<EF:EFComboColumn ename="contractCode" cname="合同号" width="120" align="center" required="false"
blockName="contractCode_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#contractCode#')? false: true}"
filter="contains" />
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="100" align="center"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#projCode#')? false: true}"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
...
...
src/main/webapp/HP/SC/HPSC011.jsp
View file @
9542fb70
...
...
@@ -41,6 +41,10 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="合同号" ename="inqu_status-0-contractCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="contractCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker ename="inqu_status-0-deliveryDate" cname="交货日期" role="date" enable="false" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
</div>
</EF:EFRegion>
...
...
@@ -49,6 +53,11 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center" sort="false"/>
<EF:EFComboColumn ename="contractCode" cname="合同号" width="120" align="center" required="false"
blockName="contractCode_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#contractCode#')? false: true}"
filter="contains" />
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="center"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#projCode#')? false: true}"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
...
...
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