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
8374a3d3
Commit
8374a3d3
authored
Sep 14, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.计划明细增加计划行号
parent
cb9ba8d3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
185 additions
and
161 deletions
+185
-161
HGCG001A.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001A.java
+17
-1
ServiceHGCG001A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG001A.java
+16
-7
HGCG001A.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001A.xml
+148
-153
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+2
-0
ServiceHGSC009A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
+2
-0
No files found.
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001A.java
View file @
8374a3d3
...
@@ -36,6 +36,7 @@ public class HGCG001A extends DaoEPBase {
...
@@ -36,6 +36,7 @@ public class HGCG001A extends DaoEPBase {
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_PLAN_DATE
=
"planDate"
;
/* 计划日期*/
public
static
final
String
FIELD_PLAN_DATE
=
"planDate"
;
/* 计划日期*/
public
static
final
String
FIELD_PLAN_NO
=
"planNo"
;
/* 计划单号*/
public
static
final
String
FIELD_PLAN_NO
=
"planNo"
;
/* 计划单号*/
public
static
final
String
FIELD_PLAN_LINE_NO
=
"planLineNo"
;
/* 计划单行号*/
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
...
@@ -122,6 +123,7 @@ public class HGCG001A extends DaoEPBase {
...
@@ -122,6 +123,7 @@ public class HGCG001A extends DaoEPBase {
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
planDate
=
" "
;
/* 计划日期*/
private
String
planDate
=
" "
;
/* 计划日期*/
private
String
planNo
=
" "
;
/* 计划单号*/
private
String
planNo
=
" "
;
/* 计划单号*/
private
String
planLineNo
=
" "
;
/* 计划单行号*/
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
String
inventName
=
" "
;
/* 存货名称*/
...
@@ -216,7 +218,11 @@ public class HGCG001A extends DaoEPBase {
...
@@ -216,7 +218,11 @@ public class HGCG001A extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_PLAN_NO
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_NO
);
eiColumn
.
setDescName
(
"计划单号"
);
eiColumn
.
setDescName
(
"计划单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_LINE_NO
);
eiColumn
.
setDescName
(
"计划单行号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"存货类型"
);
eiColumn
.
setDescName
(
"存货类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -984,6 +990,14 @@ public class HGCG001A extends DaoEPBase {
...
@@ -984,6 +990,14 @@ public class HGCG001A extends DaoEPBase {
this
.
calculationMethod
=
calculationMethod
;
this
.
calculationMethod
=
calculationMethod
;
}
}
public
String
getPlanLineNo
()
{
return
planLineNo
;
}
public
void
setPlanLineNo
(
String
planLineNo
)
{
this
.
planLineNo
=
planLineNo
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -1006,6 +1020,7 @@ public class HGCG001A extends DaoEPBase {
...
@@ -1006,6 +1020,7 @@ public class HGCG001A extends DaoEPBase {
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setPlanDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_DATE
)),
planDate
));
setPlanDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_DATE
)),
planDate
));
setPlanNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_NO
)),
planNo
));
setPlanNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_NO
)),
planNo
));
setPlanLineNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_LINE_NO
)),
planLineNo
));
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
...
@@ -1059,6 +1074,7 @@ public class HGCG001A extends DaoEPBase {
...
@@ -1059,6 +1074,7 @@ public class HGCG001A extends DaoEPBase {
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_PLAN_DATE
,
StringUtils
.
toString
(
planDate
,
eiMetadata
.
getMeta
(
FIELD_PLAN_DATE
)));
map
.
put
(
FIELD_PLAN_DATE
,
StringUtils
.
toString
(
planDate
,
eiMetadata
.
getMeta
(
FIELD_PLAN_DATE
)));
map
.
put
(
FIELD_PLAN_NO
,
StringUtils
.
toString
(
planNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_NO
)));
map
.
put
(
FIELD_PLAN_NO
,
StringUtils
.
toString
(
planNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_NO
)));
map
.
put
(
FIELD_PLAN_LINE_NO
,
StringUtils
.
toString
(
planLineNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_LINE_NO
)));
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
...
...
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG001A.java
View file @
8374a3d3
...
@@ -22,6 +22,7 @@ import com.baosight.hggp.util.contants.ACConstants;
...
@@ -22,6 +22,7 @@ import com.baosight.hggp.util.contants.ACConstants;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
...
@@ -121,25 +122,33 @@ public class ServiceHGCG001A extends ServiceBase {
...
@@ -121,25 +122,33 @@ public class ServiceHGCG001A extends ServiceBase {
AssertUtils
.
isGe
(
BigDecimal
.
ZERO
,
fCg001a
.
getPurWeight
(),
String
.
format
(
"计划明细[%s]采购重量必须大于0"
,
fCg001a
.
getInventCode
()));
AssertUtils
.
isGe
(
BigDecimal
.
ZERO
,
fCg001a
.
getPurWeight
(),
String
.
format
(
"计划明细[%s]采购重量必须大于0"
,
fCg001a
.
getInventCode
()));
}
}
}
}
/**
/**
* 数据保存
* 数据保存
*
*
* @param fCg001s
* @param fCg001s
*/
*/
private
void
saveData
(
List
<
HGCG001A
>
fCg001s
,
HGCG001
c
g001
)
{
private
void
saveData
(
List
<
HGCG001A
>
fCg001s
,
HGCG001
dbC
g001
)
{
for
(
HGCG001A
fCg001a
:
fCg001s
)
{
for
(
HGCG001A
fCg001a
:
fCg001s
)
{
fCg001a
.
setPurUnitWeight
(
fCg001a
.
getPurWeight
().
divide
(
fCg001a
.
getPurQty
(),
3
,
RoundingMode
.
HALF_UP
));
fCg001a
.
setPurUnitWeight
(
fCg001a
.
getPurWeight
().
divide
(
fCg001a
.
getPurQty
(),
3
,
RoundingMode
.
HALF_UP
));
if
(
fCg001a
.
getId
()
==
null
||
fCg001a
.
getId
()
==
0
){
if
(
fCg001a
.
getId
()
==
null
||
fCg001a
.
getId
()
==
0
)
{
BeanUtils
.
copyProperties
(
cg001
,
fCg001a
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
,
fCg001a
.
setPlanDate
(
dbCg001
.
getPlanDate
());
"inventType"
,
"inventTypeDetail"
,
"inventCode"
,
"inventName"
,
"spec"
,
"material"
,
"unit"
,
"length"
,
"width"
,
"thick"
,
"purQty"
,
"purUnitWeight"
,
"purWeight"
);
fCg001a
.
setPlanNo
(
dbCg001
.
getPlanNo
());
fCg001a
.
setPlanLineNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CG_PLAN_LINE_NO
,
new
String
[]{
dbCg001
.
getPlanNo
()}));
fCg001a
.
setCompanyCode
(
dbCg001
.
getCompanyCode
());
fCg001a
.
setCompanyName
(
dbCg001
.
getCompanyName
());
fCg001a
.
setProjCode
(
dbCg001
.
getProjCode
());
fCg001a
.
setProjName
(
dbCg001
.
getProjName
());
fCg001a
.
setStatus
(
HGConstant
.
CgPlanStatus
.
S_0
);
fCg001a
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
DaoUtils
.
insert
(
HGCG001A
.
INSERT
,
fCg001a
);
DaoUtils
.
insert
(
HGCG001A
.
INSERT
,
fCg001a
);
}
else
{
}
else
{
DaoUtils
.
update
(
HGCG001A
.
UPDATE
,
fCg001a
);
DaoUtils
.
update
(
HGCG001A
.
UPDATE
,
fCg001a
);
}
}
}
}
//修改主表数量
//修改主表数量
updateCg001Pur
(
c
g001
);
updateCg001Pur
(
dbC
g001
);
}
}
private
void
updateCg001Pur
(
HGCG001
cg001
)
{
private
void
updateCg001Pur
(
HGCG001
cg001
)
{
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001A.xml
View file @
8374a3d3
...
@@ -2,11 +2,51 @@
...
@@ -2,11 +2,51 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGCG001A"
>
<sqlMap
namespace=
"HGCG001A"
>
<sql
id=
"column"
>
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
PLAN_DATE as "planDate",
<!-- 计划日期 -->
PLAN_NO as "planNo",
<!-- 计划单号 -->
PLAN_LINE_NO as "planLineNo",
<!-- 计划单号 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC as "spec",
<!-- 规格 -->
MATERIAL as "material",
<!-- 材质 -->
UNIT as "unit",
<!-- 单位 -->
LENGTH as "length",
<!-- 长度 -->
WIDTH as "width",
<!-- 宽度 -->
THICK as "thick",
<!-- 厚度 -->
PLAN_QTY as "planQty",
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT as "planUnitWeight",
<!-- 计划单重 -->
PLAN_WEIGHT as "planWeight",
<!-- 计划重量 -->
PUR_QTY as "purQty",
<!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight",
<!-- 采购单重 -->
PUR_WEIGHT as "purWeight",
<!-- 采购重量 -->
MATERIAL_PLAN_ID as "materialPlanId",
<!-- 材料计划id -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型大类 -->
STATUS as "status",
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
REMARKS as "remarks",
<!-- 备注 -->
PROJ_CODE as "projCode",
PROJ_NAME as "projName",
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRIMARY_ID as "primaryId"
<!-- 主表id -->
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
AND DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<include
refid=
"idCondition"
/>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
</isNotEmpty>
...
@@ -121,6 +161,12 @@
...
@@ -121,6 +161,12 @@
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
ID IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planLineNo"
>
PLAN_LINE_NO = #planLineNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planLineNos"
>
PLAN_LINE_NO IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"planLineNos"
>
#planLineNos[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<sql
id=
"conditionByContract"
>
<sql
id=
"conditionByContract"
>
...
@@ -245,72 +291,29 @@
...
@@ -245,72 +291,29 @@
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<!-- 公共修改字段 -->
<sql
id=
"orderBy"
>
<sql
id=
"updateRevise"
>
<dynamic
prepend=
"ORDER BY"
>
UPDATED_BY = #updatedBy#,
<isNotEmpty
property=
"orderBy"
>
UPDATED_NAME = #updatedName#,
$orderBy$
UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<isEmpty
property=
"orderBy"
>
ID desc
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG001A"
>
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG001A"
>
SELECT
SELECT
<include
refid=
"column"
/>
ID as "id",
FROM ${hggpSchema}.HGCG001A WHERE 1=1
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
<include
refid=
"condition"
/>
DEP_CODE as "depCode",
<!-- 部门编码 -->
<include
refid=
"orderBy"
/>
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
</select>
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
PLAN_DATE as "planDate",
<!-- 计划日期 -->
PLAN_NO as "planNo",
<!-- 计划单号 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC as "spec",
<!-- 规格 -->
MATERIAL as "material",
<!-- 材质 -->
UNIT as "unit",
<!-- 单位 -->
LENGTH as "length",
<!-- 长度 -->
WIDTH as "width",
<!-- 宽度 -->
THICK as "thick",
<!-- 厚度 -->
PLAN_QTY as "planQty",
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT as "planUnitWeight",
<!-- 计划单重 -->
PLAN_WEIGHT as "planWeight",
<!-- 计划重量 -->
PUR_QTY as "purQty",
<!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight",
<!-- 采购单重 -->
PUR_WEIGHT as "purWeight",
<!-- 采购重量 -->
MATERIAL_PLAN_ID as "materialPlanId",
<!-- 材料计划id -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型大类 -->
STATUS as "status",
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
REMARKS as "remarks",
<!-- 备注 -->
PROJ_CODE as "projCode",
PROJ_NAME as "projName",
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRIMARY_ID as "primaryId"
<!-- 主表id -->
FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"idCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID desc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGCG001A WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
</select>
</select>
<select
id=
"queryByContract"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG001A"
>
<select
id=
"queryByContract"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG001A"
>
SELECT
SELECT
...
@@ -365,93 +368,83 @@
...
@@ -365,93 +368,83 @@
</dynamic>
</dynamic>
</select>
</select>
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGCG001A (ID,
INSERT INTO ${hggpSchema}.HGCG001A (
ACCOUNT_CODE,
<!-- 企业编码 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
CREATED_TIME,
<!-- 记录创建时间 -->
UPDATED_BY,
<!-- 记录修改者 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
UPDATED_NAME,
<!-- 记录修改名称 -->
COMPANY_CODE,
<!-- 公司编码 -->
UPDATED_TIME,
<!-- 记录修改时间 -->
COMPANY_NAME,
<!-- 公司名称 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
PLAN_DATE,
<!-- 计划日期 -->
COMPANY_CODE,
<!-- 公司编码 -->
PLAN_NO,
<!-- 计划单号 -->
COMPANY_NAME,
<!-- 公司名称 -->
PLAN_LINE_NO,
<!-- 计划单行号 -->
PLAN_DATE,
<!-- 计划日期 -->
INVENT_TYPE,
<!-- 存货类型 -->
PLAN_NO,
<!-- 计划单号 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_NAME,
<!-- 存货名称 -->
INVENT_CODE,
<!-- 存货编码 -->
SPEC,
<!-- 规格 -->
INVENT_NAME,
<!-- 存货名称 -->
MATERIAL,
<!-- 材质 -->
SPEC,
<!-- 规格 -->
UNIT,
<!-- 单位 -->
MATERIAL,
<!-- 材质 -->
LENGTH,
<!-- 长度 -->
UNIT,
<!-- 单位 -->
WIDTH,
<!-- 宽度 -->
LENGTH,
<!-- 长度 -->
THICK,
<!-- 厚度 -->
WIDTH,
<!-- 宽度 -->
PLAN_QTY,
<!-- 计划数量 -->
THICK,
<!-- 厚度 -->
PLAN_UNIT_WEIGHT,
<!-- 计划单重 -->
PLAN_QTY,
<!-- 计划数量 -->
PLAN_WEIGHT,
<!-- 计划重量 -->
PLAN_UNIT_WEIGHT,
<!-- 计划单重 -->
PUR_QTY,
<!-- 采购数量 -->
PLAN_WEIGHT,
<!-- 计划重量 -->
PUR_UNIT_WEIGHT,
<!-- 采购单重 -->
PUR_QTY,
<!-- 采购数量 -->
PUR_WEIGHT,
<!-- 采购重量 -->
PUR_UNIT_WEIGHT,
<!-- 采购单重 -->
MATERIAL_PLAN_ID,
<!-- 材料计划id -->
PUR_WEIGHT,
<!-- 采购重量 -->
INVENT_TYPE_DETAIL,
<!-- 存货类型大类 -->
MATERIAL_PLAN_ID,
<!-- 材料计划id -->
STATUS,
INVENT_TYPE_DETAIL,
<!-- 存货类型大类 -->
PRIMARY_ID,
<!-- 主表id -->
STATUS,
PROJ_CODE,
<!-- 项目编码 -->
PRIMARY_ID,
<!-- 主表id -->
PROJ_NAME,
<!-- 项目名称 -->
PROJ_CODE,
<!-- 项目编码 -->
REMARKS
PROJ_NAME,
<!-- 项目名称 -->
) VALUES (
REMARKS
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
)
#deleteFlag#, #companyCode#, #companyName#, #planDate#, #planNo#, #planLineNo#, #inventType#, #inventCode#,
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #planDate#, #planNo#, #inventType#, #inventCode#, #inventName#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #planQty#, #planUnitWeight#, #planWeight#, #purQty#, #purUnitWeight#, #purWeight#, #materialPlanId#, #inventTypeDetail#,#status#, #primaryId#,#projCode#,#projName#, #remarks#)
#inventName#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #planQty#, #planUnitWeight#, #planWeight#,
</insert>
#purQty#, #purUnitWeight#, #purWeight#, #materialPlanId#, #inventTypeDetail#,#status#,
#primaryId#,#projCode#,#projName#, #remarks#)
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCG001A WHERE
DELETE FROM ${hggpSchema}.HGCG001A WHERE ID = #id#
ID = #id#
</delete>
</delete>
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCG001A
UPDATE ${hggpSchema}.HGCG001A
SET
SET
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
PLAN_DATE = #planDate#,
<!-- 计划日期 -->
CREATED_NAME = #createdName#,
<!-- 记录创建名称 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
CREATED_TIME = #createdTime#,
<!-- 记录创建时间 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
SPEC = #spec#,
<!-- 规格 -->
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
MATERIAL = #material#,
<!-- 材质 -->
DELETE_FLAG = #deleteFlag#,
<!-- 0-未删除,1-已删除 -->
UNIT = #unit#,
<!-- 单位 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
LENGTH = #length#,
<!-- 长度 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
WIDTH = #width#,
<!-- 宽度 -->
PLAN_DATE = #planDate#,
<!-- 计划日期 -->
THICK = #thick#,
<!-- 厚度 -->
PLAN_NO = #planNo#,
<!-- 计划单号 -->
PLAN_QTY = #planQty#,
<!-- 计划数量 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
PLAN_UNIT_WEIGHT = #planUnitWeight#,
<!-- 计划单重 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
PLAN_WEIGHT = #planWeight#,
<!-- 计划重量 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
PUR_QTY = #purQty#,
<!-- 采购数量 -->
SPEC = #spec#,
<!-- 规格 -->
PUR_UNIT_WEIGHT = #purUnitWeight#,
<!-- 采购单重 -->
MATERIAL = #material#,
<!-- 材质 -->
PUR_WEIGHT = #purWeight#,
<!-- 采购重量 -->
UNIT = #unit#,
<!-- 单位 -->
MATERIAL_PLAN_ID = #materialPlanId#,
<!-- 材料计划id -->
LENGTH = #length#,
<!-- 长度 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#,
<!-- 存货类型大类 -->
WIDTH = #width#,
<!-- 宽度 -->
STATUS = #status#,
THICK = #thick#,
<!-- 厚度 -->
REMARKS = #remarks#,
PLAN_QTY = #planQty#,
<!-- 计划数量 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PLAN_UNIT_WEIGHT = #planUnitWeight#,
<!-- 计划单重 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PLAN_WEIGHT = #planWeight#,
<!-- 计划重量 -->
<include
refid=
"SqlBase.updateRevise"
/>
PUR_QTY = #purQty#,
<!-- 采购数量 -->
WHERE ID = #id#
PUR_UNIT_WEIGHT = #purUnitWeight#,
<!-- 采购单重 -->
</update>
PUR_WEIGHT = #purWeight#,
<!-- 采购重量 -->
MATERIAL_PLAN_ID = #materialPlanId#,
<!-- 材料计划id -->
INVENT_TYPE_DETAIL = #inventTypeDetail#,
<!-- 存货类型大类 -->
STATUS = #status#,
REMARKS = #remarks#,
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PRIMARY_ID = #primaryId#
<!-- 主表id -->
WHERE
ID = #id#
</update>
<!-- 行锁 -->
<!-- 行锁 -->
<update
id=
"lock"
>
<update
id=
"lock"
>
...
@@ -466,15 +459,17 @@
...
@@ -466,15 +459,17 @@
UPDATE ${hggpSchema}.HGCG001A
UPDATE ${hggpSchema}.HGCG001A
SET
SET
STATUS = #status#,
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
STATUS = #status#,
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
<include
refid=
"
updateRevise"
/>
<include
refid=
"SqlBase.
updateRevise"
/>
WHERE PLAN_NO = #planNo#
WHERE PLAN_NO = #planNo#
</update>
</update>
<!-- 修改状态信息 -->
<!-- 修改状态信息 -->
<update
id=
"updateStatusById"
>
<update
id=
"updateStatusById"
>
UPDATE ${hggpSchema}.HGCG001A
UPDATE ${hggpSchema}.HGCG001A
SET
SET
STATUS = #status#,
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
STATUS = #status#,
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
<include
refid=
"
updateRevise"
/>
<include
refid=
"SqlBase.
updateRevise"
/>
WHERE ID = #id#
WHERE ID = #id#
</update>
</update>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
8374a3d3
...
@@ -99,6 +99,8 @@ public class HGConstant {
...
@@ -99,6 +99,8 @@ public class HGConstant {
public
static
final
String
APPLY_CODE
=
"APPLY_CODE"
;
public
static
final
String
APPLY_CODE
=
"APPLY_CODE"
;
// 采购计划号
// 采购计划号
public
static
final
String
CG_PLAN_NO
=
"CG_PLAN_NO"
;
public
static
final
String
CG_PLAN_NO
=
"CG_PLAN_NO"
;
// 采购计划行号
public
static
final
String
CG_PLAN_LINE_NO
=
"CG_PLAN_LINE_NO"
;
// 采购合同号
// 采购合同号
public
static
final
String
CG_CONTRACT_NO
=
"CG_CONTRACT_NO"
;
public
static
final
String
CG_CONTRACT_NO
=
"CG_CONTRACT_NO"
;
// 采购合同行号
// 采购合同行号
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
8374a3d3
...
@@ -268,6 +268,8 @@ public class ServiceHGSC009A extends ServiceBase {
...
@@ -268,6 +268,8 @@ public class ServiceHGSC009A extends ServiceBase {
cg001A
.
setPlanWeight
(
hgsc009A
.
getGrossAmount
());
cg001A
.
setPlanWeight
(
hgsc009A
.
getGrossAmount
());
cg001A
.
setPlanQty
(
hgsc009A
.
getQuantity
());
cg001A
.
setPlanQty
(
hgsc009A
.
getQuantity
());
cg001A
.
setPlanNo
(
hgcg001
.
getPlanNo
());
cg001A
.
setPlanNo
(
hgcg001
.
getPlanNo
());
cg001A
.
setPlanLineNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CG_PLAN_LINE_NO
,
new
String
[]{
hgcg001
.
getPlanNo
()}));
cg001A
.
setUnit
(
finalPz005Map
.
get
(
hgsc009A
.
getInventCode
()).
getUnit
());
cg001A
.
setUnit
(
finalPz005Map
.
get
(
hgsc009A
.
getInventCode
()).
getUnit
());
cg001A
.
setInventType
(
finalPz005Map
.
get
(
hgsc009A
.
getInventCode
()).
getInventType
());
cg001A
.
setInventType
(
finalPz005Map
.
get
(
hgsc009A
.
getInventCode
()).
getInventType
());
DaoUtils
.
insert
(
HGCG001A
.
INSERT
,
cg001A
);
DaoUtils
.
insert
(
HGCG001A
.
INSERT
,
cg001A
);
...
...
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