Commit ecfaf75d by liuyang

2024-08-08 生产任务和生产报工增加长度、规格字段

parent c8c6c7d0
......@@ -3,12 +3,11 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.AssignStatusEnum;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sc.domain.HGSC006;
import com.baosight.hggp.hg.sc.domain.HGSC006A;
import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.sc.domain.*;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
......@@ -23,6 +22,8 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
/**
......@@ -67,6 +68,7 @@ public class ServiceHGSC006A extends ServiceBase {
String groupCode = inInfo.getString("groupCode");
String groupName = inInfo.getString("groupName");
HGSC006 hgsc006 = HGSCTools.THGSC006.getByOrderCode(orderCode);
List<HGPZ005> hgpz005List = DaoBase.getInstance().query(HGPZ005.QUERY,new HashMap<>());
for (String orderDetailId : orderDetailIds) {
// 校验主订单是否已分派
HGSC006A hgsc006A = HGSCTools.THGSC006A.getById(Long.parseLong(orderDetailId));
......@@ -89,10 +91,15 @@ public class ServiceHGSC006A extends ServiceBase {
default:
throw new PlatException(String.format("生产订单[%s]%s状态异常,请联系管理员!",hgsc006A.getProcessName(), hgsc006A.getProductName()));
}
HGPZ005 hgpz005 =hgpz005List.stream().filter(pz005 -> pz005.getInventCode().equals(hgsc006A.getProductCode())).findAny().get();
// 写入子表数据
HGSC007 hgsc007 = new HGSC007();
BeanUtils.copyProperties(hgsc006A,hgsc007);
cleanBaseInfo(hgsc007);
if (hgpz005 != null) {
hgsc007.setSpec(hgpz005.getSpec());
hgsc007.setLength(hgpz005.getLength());
}
hgsc007.setTaskCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC007_TASK_CODE));
hgsc007.setMatId(hgsc006.getMatId());
hgsc007.setOrderId(hgsc006.getId());
......
......@@ -3,9 +3,12 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.ProductTypeEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.*;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Org;
......@@ -145,12 +148,13 @@ public class ServiceHGSC006B extends ServiceBase {
HGSC006A hgsc006A = HGSCTools.THGSC006A.getById(orderDetailId);
// 查询任务信息
List<HGSC007> hgsc007List = HGSCTools.THGSC007.list(taskIds);
HGPZ005 hgpz005 = HGPZTools.HgPz005.get(hgsc006A.getProductCode());
// 写入数据
for (Map resultRow : resultRows) {
HGSC007 hgsc007 = new HGSC007();
hgsc007.fromMap(resultRow);
if (hgsc007.getId() == null || hgsc007.getId() == 0) {
this.add(hgsc006, hgsc006A, hgsc007);
this.add(hgsc006, hgsc006A, hgsc007,hgpz005);
} else {
this.modify(hgsc006A, hgsc007, hgsc007List);
}
......@@ -173,7 +177,7 @@ public class ServiceHGSC006B extends ServiceBase {
* @param hgsc006A
* @param hgsc007
*/
private void add(HGSC006 hgsc006, HGSC006A hgsc006A, HGSC007 hgsc007) {
private void add(HGSC006 hgsc006, HGSC006A hgsc006A, HGSC007 hgsc007,HGPZ005 hgpz005) {
Long orderDetailId = hgsc006A.getId();
// 数据校验
AssertUtils.isEmpty(hgsc007.getFactoryCode(), "请选择厂区");
......@@ -196,6 +200,10 @@ public class ServiceHGSC006B extends ServiceBase {
add007.setGroupName(hgsc007.getGroupName());
add007.setFactoryCode(hgsc007.getFactoryCode());
add007.setFactoryName(hgsc007.getFactoryName());
if (hgpz005 != null) {
add007.setSpec(hgpz005.getSpec());
add007.setLength(hgpz005.getLength());
}
DaoUtils.insert(HGSC007.INSERT, add007);
}
......
......@@ -47,162 +47,141 @@
-->
<sqlMap namespace="HGSC007">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
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>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.mat_id = #matId#
mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderId">
A.order_id = #orderId#
order_id = #orderId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderDetailId">
A.order_detail_id = #orderDetailId#
order_detail_id = #orderDetailId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowId">
A.tech_flow_id = #techFlowId#
tech_flow_id = #techFlowId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowName">
A.tech_flow_name = #techFlowName#
tech_flow_name = #techFlowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventProcessId">
A.invent_process_id = #inventProcessId#
invent_process_id = #inventProcessId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
A.process_code = #processCode#
process_code = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
A.process_name = #processName#
process_name = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
A.process_order = #processOrder#
process_order = #processOrder#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name = #companyName#
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.dep_code = #depCode#
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
A.dep_name = #depName#
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name = #projName#
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskCode">
A.task_code = #taskCode#
task_code = #taskCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
A.product_type = #productType#
product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
A.product_code LIKE CONCAT('%', #productCode#, '%')
product_code LIKE CONCAT('%', #productCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
A.product_name LIKE CONCAT('%', #productName#, '%')
product_name LIKE CONCAT('%', #productName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
A.plan_start_date = #planStartDate#
plan_start_date = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
A.plan_end_date = #planEndDate#
plan_end_date = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
A.factory_code = #factoryCode#
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
A.factory_name = #factoryName#
factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
A.group_code = #groupCode#
group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
A.group_name LIKE CONCAT('%', #groupName# ,'%')
group_name LIKE CONCAT('%', #groupName# ,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="completeDate">
A.complete_date = #completeDate#
complete_date = #completeDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
A.quantity = #quantity#
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishQuantity">
A.finish_quantity = #finishQuantity#
finish_quantity = #finishQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unfinishQuantity">
A.unfinish_quantity = #unfinishQuantity#
unfinish_quantity = #unfinishQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
A.single_weight = #singleWeight#
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
A.total_weight = #totalWeight#
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishWeight">
A.finish_weight = #finishWeight#
finish_weight = #finishWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unfinishWeight">
A.unfinish_weight = #unfinishWeight#
unfinish_weight = #unfinishWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.created_time LIKE CONCAT('%', #createdTime# ,'%')
created_time LIKE CONCAT('%', #createdTime# ,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.updated_name = #updatedName#
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.updated_time = #updatedTime#
updated_time = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
A.id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<!-- 移动端请求参数 -->
<isEqual prepend=" AND " property="completeStatus" compareValue="0">
ifnull(A.complete_date,'') = ''
ifnull(complete_date,'') = ''
</isEqual>
<isEqual prepend=" AND " property="completeStatus" compareValue="1">
ifnull(A.complete_date,'') != ''
ifnull(complete_date,'') != ''
</isEqual>
</sql>
<sql id="appCondition">
......@@ -245,50 +224,50 @@
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC007">
SELECT
A.id as "id",
A.mat_id as "matId", <!-- 物料清单ID -->
A.order_id as "orderId", <!-- 生产计划ID -->
A.order_detail_id as "orderDetailId", <!-- 生产计划明细ID -->
A.tech_flow_id as "techFlowId", <!-- 工艺流程ID -->
A.tech_flow_name as "techFlowName", <!-- 工艺流程名称 -->
A.invent_process_id as "inventProcessId", <!-- 存货工序ID,对应HGPZ005A.id -->
A.process_code as "processCode", <!-- 工序编码 -->
A.process_name as "processName", <!-- 工序名称 -->
A.process_order as "processOrder", <!-- 加工顺序 -->
A.company_code as "companyCode", <!-- 公司编码 -->
A.company_name as "companyName", <!-- 公司名称 -->
A.dep_code as "depCode", <!-- 部门编码 -->
A.dep_name as "depName", <!-- 部门名称 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
A.task_code as "taskCode", <!-- 任务编码 -->
A.product_type as "productType", <!-- 产品类型 -->
A.product_code as "productCode", <!-- 产品编号 -->
A.product_name as "productName", <!-- 产品名称 -->
A.plan_start_date as "planStartDate", <!-- 计划开始日期 -->
A.plan_end_date as "planEndDate", <!-- 计划结束日期 -->
A.factory_code as "factoryCode", <!-- 工厂编号 -->
A.factory_name as "factoryName", <!-- 工厂名称 -->
A.group_code as "groupCode", <!-- 工作组编号 -->
A.group_name as "groupName", <!-- 工作组名称 -->
A.complete_date as "completeDate", <!-- 完工日期 -->
A.quantity as "quantity", <!-- 数量 -->
A.finish_quantity as "finishQuantity", <!-- 完工数量 -->
A.unfinish_quantity as "unfinishQuantity", <!-- 未完工数量 -->
A.single_weight as "singleWeight", <!-- 单重 -->
A.total_weight as "totalWeight", <!-- 总重 -->
A.finish_weight as "finishWeight", <!-- 完工重量 -->
A.unfinish_weight as "unfinishWeight", <!-- 未完工重量 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
A.created_time as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime", <!-- 更新时间 -->
B.LENGTH as "length", <!-- 长 -->
B.SPEC as "spec" <!-- 规格 -->
FROM ${hggpSchema}.HGSC007 A LEFT JOIN ${hggpSchema}.HGPZ005 B ON A.product_code = B.INVENT_CODE
id as "id",
mat_id as "matId", <!-- 物料清单ID -->
order_id as "orderId", <!-- 生产计划ID -->
order_detail_id as "orderDetailId", <!-- 生产计划明细ID -->
tech_flow_id as "techFlowId", <!-- 工艺流程ID -->
tech_flow_name as "techFlowName", <!-- 工艺流程名称 -->
invent_process_id as "inventProcessId", <!-- 存货工序ID,对应HGPZ005A.id -->
process_code as "processCode", <!-- 工序编码 -->
process_name as "processName", <!-- 工序名称 -->
process_order as "processOrder", <!-- 加工顺序 -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
dep_code as "depCode", <!-- 部门编码 -->
dep_name as "depName", <!-- 部门名称 -->
proj_code as "projCode", <!-- 项目编码 -->
proj_name as "projName", <!-- 项目名称 -->
task_code as "taskCode", <!-- 任务编码 -->
product_type as "productType", <!-- 产品类型 -->
product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 -->
plan_start_date as "planStartDate", <!-- 计划开始日期 -->
plan_end_date as "planEndDate", <!-- 计划结束日期 -->
factory_code as "factoryCode", <!-- 工厂编号 -->
factory_name as "factoryName", <!-- 工厂名称 -->
group_code as "groupCode", <!-- 工作组编号 -->
group_name as "groupName", <!-- 工作组名称 -->
complete_date as "completeDate", <!-- 完工日期 -->
quantity as "quantity", <!-- 数量 -->
finish_quantity as "finishQuantity", <!-- 完工数量 -->
unfinish_quantity as "unfinishQuantity", <!-- 未完工数量 -->
single_weight as "singleWeight", <!-- 单重 -->
total_weight as "totalWeight", <!-- 总重 -->
finish_weight as "finishWeight", <!-- 完工重量 -->
unfinish_weight as "unfinishWeight", <!-- 未完工重量 -->
account_code as "accountCode", <!-- 帐套 -->
created_by as "createdBy", <!-- 创建人 -->
created_name as "createdName", <!-- 创建人名称 -->
created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更新人 -->
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime", <!-- 更新时间 -->
LENGTH as "length", <!-- 长 -->
SPEC as "spec" <!-- 规格 -->
FROM ${hggpSchema}.HGSC007
WHERE 1=1
<include refid="condition" />
......@@ -297,14 +276,14 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
A.id desc, A.product_type asc, A.product_name, A.process_order desc
id desc, product_type asc, product_name, process_order desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC007 A LEFT JOIN ${hggpSchema}.HGPZ005 B ON A.product_code = B.INVENT_CODE WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGSC007 WHERE 1=1
<include refid="condition" />
</select>
......@@ -475,10 +454,16 @@
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
updated_time, <!-- 更新时间 -->
spec,
length
)
VALUES (#id#, #matId#, #orderId#, #orderDetailId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#, #processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #taskCode#, #productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #completeDate#, #quantity#, #finishQuantity#, #unfinishQuantity#, #singleWeight#, #totalWeight#, #finishWeight#, #unfinishWeight#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
VALUES (#id#, #matId#, #orderId#, #orderDetailId#, #techFlowId#, #techFlowName#, #inventProcessId#,
#processCode#, #processName#, #processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#,
#projName#, #taskCode#, #productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#,
#factoryCode#, #factoryName#, #groupCode#, #groupName#, #completeDate#, #quantity#, #finishQuantity#,
#unfinishQuantity#, #singleWeight#, #totalWeight#, #finishWeight#, #unfinishWeight#, #accountCode#, #createdBy#,
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #spec#, #length#)
</insert>
<delete id="delete">
......@@ -528,7 +513,9 @@
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
updated_time = #updatedTime#, <!-- 更新时间 -->
spec = #spec#,
length = #length#
WHERE
id = #id#
</update>
......
......@@ -43,182 +43,161 @@
-->
<sqlMap namespace="HGSC008">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
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>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.mat_id = #matId#
mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskId">
A.task_id = #taskId#
task_id = #taskId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowId">
A.tech_flow_id = #techFlowId#
tech_flow_id = #techFlowId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowName">
A.tech_flow_name = #techFlowName#
tech_flow_name = #techFlowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventProcessId">
A.invent_process_id = #inventProcessId#
invent_process_id = #inventProcessId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
A.process_code = #processCode#
process_code = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
A.process_name = #processName#
process_name = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
A.process_order = #processOrder#
process_order = #processOrder#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name like ('%$companyName$%')
company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.dep_code = #depCode#
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
A.dep_name = #depName#
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name = #projName#
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workCode">
A.work_code like ('%$workCode$%')
work_code like ('%$workCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
A.product_type = #productType#
product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
A.product_code = #productCode#
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
A.product_name = #productName#
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
A.plan_start_date = #planStartDate#
plan_start_date = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
A.plan_end_date = #planEndDate#
plan_end_date = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
A.factory_code = #factoryCode#
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
A.factory_name = #factoryName#
factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
A.group_code = #groupCode#
group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
A.group_name like ('%$groupName$%')
group_name like ('%$groupName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="registerDate">
A.register_date = #registerDate#
register_date = #registerDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
A.quantity = #quantity#
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
A.single_weight = #singleWeight#
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
A.total_weight = #totalWeight#
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.created_time = #createdTime#
created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.updated_name = #updatedName#
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.updated_time = #updatedTime#
updated_time = #updatedTime#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC008">
SELECT
A.id as "id",
A.mat_id as "matId", <!-- 物料清单ID -->
A.task_id as "taskId", <!-- 生产任务ID -->
A.tech_flow_id as "techFlowId", <!-- 工艺流程ID -->
A.tech_flow_name as "techFlowName", <!-- 工艺流程名称 -->
A.invent_process_id as "inventProcessId", <!-- 存货工序ID,对应HGPZ005A.id -->
A.process_code as "processCode", <!-- 工序编码 -->
A.process_name as "processName", <!-- 工序名称 -->
A.process_order as "processOrder", <!-- 加工顺序 -->
A.company_code as "companyCode", <!-- 公司编码 -->
A.company_name as "companyName", <!-- 公司名称 -->
A.dep_code as "depCode", <!-- 部门编码 -->
A.dep_name as "depName", <!-- 部门名称 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
A.work_code as "workCode", <!-- 报工编码 -->
A.product_type as "productType", <!-- 产品类型 -->
A.product_code as "productCode", <!-- 产品编号 -->
A.product_name as "productName", <!-- 产品名称 -->
A.plan_start_date as "planStartDate", <!-- 计划开始日期 -->
A.plan_end_date as "planEndDate", <!-- 计划结束日期 -->
A.factory_code as "factoryCode", <!-- 工厂编号 -->
A.factory_name as "factoryName", <!-- 工厂名称 -->
A.group_code as "groupCode", <!-- 工作组编号 -->
A.group_name as "groupName", <!-- 工作组名称 -->
A.register_date as "registerDate", <!-- 报工日期 -->
A.quantity as "quantity", <!-- 数量 -->
A.single_weight as "singleWeight", <!-- 单重 -->
A.total_weight as "totalWeight", <!-- 总重 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
A.created_time as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime", <!-- 更新时间 -->
B.LENGTH as "length", <!-- 长 -->
B.SPEC as "spec" <!-- 规格 -->
FROM ${hggpSchema}.HGSC008 A LEFT JOIN ${hggpSchema}.HGPZ005 B ON A.product_code = B.INVENT_CODE
id as "id",
mat_id as "matId", <!-- 物料清单ID -->
task_id as "taskId", <!-- 生产任务ID -->
tech_flow_id as "techFlowId", <!-- 工艺流程ID -->
tech_flow_name as "techFlowName", <!-- 工艺流程名称 -->
invent_process_id as "inventProcessId", <!-- 存货工序ID,对应HGPZ005A.id -->
process_code as "processCode", <!-- 工序编码 -->
process_name as "processName", <!-- 工序名称 -->
process_order as "processOrder", <!-- 加工顺序 -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
dep_code as "depCode", <!-- 部门编码 -->
dep_name as "depName", <!-- 部门名称 -->
proj_code as "projCode", <!-- 项目编码 -->
proj_name as "projName", <!-- 项目名称 -->
work_code as "workCode", <!-- 报工编码 -->
product_type as "productType", <!-- 产品类型 -->
product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 -->
plan_start_date as "planStartDate", <!-- 计划开始日期 -->
plan_end_date as "planEndDate", <!-- 计划结束日期 -->
factory_code as "factoryCode", <!-- 工厂编号 -->
factory_name as "factoryName", <!-- 工厂名称 -->
group_code as "groupCode", <!-- 工作组编号 -->
group_name as "groupName", <!-- 工作组名称 -->
register_date as "registerDate", <!-- 报工日期 -->
quantity as "quantity", <!-- 数量 -->
single_weight as "singleWeight", <!-- 单重 -->
total_weight as "totalWeight", <!-- 总重 -->
account_code as "accountCode", <!-- 帐套 -->
created_by as "createdBy", <!-- 创建人 -->
created_name as "createdName", <!-- 创建人名称 -->
created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更新人 -->
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime", <!-- 更新时间 -->
length as "length", <!-- 长 -->
spec as "spec" <!-- 规格 -->
FROM ${hggpSchema}.HGSC008
WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -226,14 +205,14 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
A.register_date desc ,A.id desc
register_date desc, id desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC008 A LEFT JOIN ${hggpSchema}.HGPZ005 B ON A.product_code = B.INVENT_CODE WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGSC008 WHERE 1=1
<include refid="condition" />
</select>
......@@ -384,9 +363,15 @@
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
updated_time, <!-- 更新时间 -->
spec,
length
)
VALUES (#id#, #matId#, #taskId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#, #processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #workCode#, #productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #registerDate#, #quantity#, #singleWeight#, #totalWeight#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
VALUES (#id#, #matId#, #taskId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#,
#processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #workCode#,
#productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#,
#groupCode#, #groupName#, #registerDate#, #quantity#, #singleWeight#, #totalWeight#, #accountCode#, #createdBy#,
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#,#spec#,#length#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC008
</selectKey>
......@@ -434,7 +419,9 @@
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
updated_time = #updatedTime#, <!-- 更新时间 -->
spec = #spec#,
length = #length#
WHERE
id = #id#
</update>
......
......@@ -56,8 +56,8 @@
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC005A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC006.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC006A.xml"/>
<!--<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC007.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC008.xml"/>-->
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC007.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC008.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC009.xml"/>
<!-- 財務 -->
......
......@@ -14,22 +14,24 @@
<EF:EFInput ename="result-0-processName" cname="工序" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-spec" cname="规格" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-length" cname="长度" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-singleWeight" cname="单重(KG)" colWidth="4" format="{0:0.00}" editType="text" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-taskQuantity" cname="任务数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-taskWeight" cname="任务重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-registeredQuantity" cname="已报工数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-registeredQuantity" cname="已报工数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-registeredWeight" cname="已报工重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-unregisterQuantity" cname="剩余数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-unregisterWeight" cname="剩余重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-unregisterWeight" cname="剩余重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-groupName" cname="班组" colWidth="4" required="true" readonly="true"/>
<EF:EFDatePicker cname="报工日期" ename="result-0-registerDate" colWidth="4"
format="yyyy-MM-dd" required="true" readonly="false"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-quantity" cname="报工数量" format="{0:0}" editType="text" colWidth="4" required="true" />
<EF:EFInput ename="result-0-totalWeight" cname="报工重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment