Compare commits

...

2 Commits

Author SHA1 Message Date
FCD 3b037abdd8 检查项维护追加部门信息 2 months ago
FCD 308c9f3480 白坯检验后台报表调整 2 months ago

@ -135,6 +135,9 @@ public class EquCheckItem extends BaseEntity {
@Excel(name = "循环周期")
private int itemLoop;
@Excel(name = "部门")
private String deptName;
public int getItemLoop() {
return itemLoop;
}
@ -351,6 +354,14 @@ public class EquCheckItem extends BaseEntity {
return updateBy;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -24,6 +24,7 @@
<result property="itemTools" column="item_tools"/>
<result property="itemLoop" column="item_loop"/>
<result property="itemLoopType" column="item_loop_type"/>
<result property="deptName" column="dept_name"/>
</resultMap>
<sql id="selectEquCheckItemVo">
@ -31,33 +32,56 @@
</sql>
<select id="selectEquCheckItemList" parameterType="EquCheckItem" resultMap="EquCheckItemResult">
<include refid="selectEquCheckItemVo"/>
SELECT
i.item_id,
i.item_code,
i.item_name,
i.item_method,
i.item_type,
i.item_type_name,
i.item_remark,
i.factory_code,
i.attr1,
i.attr2,
i.attr3,
i.del_flag,
i.create_time,
i.create_by,
i.update_time,
i.update_by,
i.item_tools,
i.item_loop,
i.item_loop_type,
d.dept_name
FROM equ_check_item i
LEFT JOIN lanju_op_cloud.dbo.sys_user u ON i.create_by = u.user_name
LEFT JOIN lanju_op_cloud.dbo.sys_dept d ON u.dept_id = d.dept_id
<where>
<if test="itemCode != null and itemCode != ''">and item_code like concat('%', #{itemCode}, '%')</if>
<if test="itemName != null and itemName != ''">and item_name like concat('%', #{itemName}, '%')</if>
<if test="itemMethod != null and itemMethod != ''">and item_method like concat('%', #{itemMethod}, '%')
<if test="itemCode != null and itemCode != ''">and i.item_code like concat('%', #{itemCode}, '%')</if>
<if test="itemName != null and itemName != ''">and i.item_name like concat('%', #{itemName}, '%')</if>
<if test="itemMethod != null and itemMethod != ''">and i.item_method like concat('%', #{itemMethod}, '%')
</if>
<if test="itemType != null and itemType != ''">and item_type = #{itemType}</if>
<if test="itemTypeName != null and itemTypeName != ''">and item_type_name like concat('%', #{itemTypeName},
<if test="itemType != null and itemType != ''">and i.item_type = #{itemType}</if>
<if test="itemTypeName != null and itemTypeName != ''">and i.item_type_name like concat('%', #{itemTypeName},
'%')
</if>
<if test="itemRemark != null and itemRemark != ''">and item_remark = #{itemRemark}</if>
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''">and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''">and del_flag = #{delFlag}</if>
<if test="itemLoop != null and itemLoop != ''">and item_loop = #{itemLoop}</if>
<if test="itemLoopType != null and itemLoopType != ''">and item_loop_type = #{itemLoopType}</if>
<if test="itemTools != null and itemTools != ''">and item_tools like concat('%', #{itemTools}, '%')</if>
<if test="createTimeStart != null ">and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null ">and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''">and create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null ">and CONVERT(date,update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null ">and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
<if test="updateBy != null and updateBy != ''">and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
ORDER BY create_time DESC
<if test="itemRemark != null and itemRemark != ''">and i.tem_remark = #{itemRemark}</if>
<if test="factoryCode != null and factoryCode != ''">and i.factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''">and i.attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''">and i.attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''">and i.attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''">and i.del_flag = #{delFlag}</if>
<if test="itemLoop != null and itemLoop != ''">and i.item_loop = #{itemLoop}</if>
<if test="itemLoopType != null and itemLoopType != ''">and i.item_loop_type = #{itemLoopType}</if>
<if test="itemTools != null and itemTools != ''">and i.item_tools like concat('%', #{itemTools}, '%')</if>
<if test="createTimeStart != null ">and CONVERT(date,i.create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null ">and #{createTimeEnd} >= CONVERT(date,i.create_time)</if>
<if test="createBy != null and createBy != ''">and i.create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null ">and CONVERT(date,i.update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null ">and #{updateTimeEnd} >= CONVERT(date,i.update_time)</if>
<if test="updateBy != null and updateBy != ''">and i.update_by like concat('%', #{updateBy}, '%')</if>
and i.del_flag = '0'
ORDER BY i.create_time DESC
</where>
</select>

@ -1790,9 +1790,11 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
count = count + Integer.parseInt(data.getAttr2());
}
}else {
if (!map.containsKey(data.getAttr1())){
map.put(data.getAttr1(), "0");
}
}
}
map.put("count", Integer.toString(count));
result.add(map);
}

@ -70,6 +70,7 @@
left join qc_check_type q on q.id = qct.check_type
left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0'
<where>
qct.order_no is not null
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''">and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''">and qct.order_no = #{orderNo}</if>

@ -935,7 +935,7 @@
qct.material_code materialCode,qct.material_name materialName,
bpa.cpk_type cpkType,sdd.dict_label cpkTypeName,
qct.order_no workorderCode,qct.income_batch_no batchNo,pow.workorder_code_sap workorderCodeSap,
qctd.rule_name ruleName,
CONCAT(qpt.project_type_name, '-', qctd.rule_name) ruleName,
qctd.actual_value actualValue
from qc_check_task qct
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
@ -943,9 +943,11 @@
left join base_product_attached bpa on concat('0000000',bpa.product_code) = qct.material_code
left join pro_order_workorder pow on pow.workorder_code = qct.order_no
left join lanju_op_cloud.dbo.sys_dict_data sdd on sdd.dict_value = bpa.cpk_type and sdd.dict_type= 'qms_category'
LEFT JOIN qc_check_project qcp ON qcp.id = qctd.project_id
LEFT JOIN qc_project_type qpt ON qpt.project_type_code = qcp.project_type
where qctd.project_id = #{projectId} and qct.check_type = #{checkType}
and qctd.actual_value is not null
and qctd.del_flag = '0' and qct.del_flag = '0' and be.del_flag = '0' and pow.del_flag = '0'
and qctd.del_flag = '0' and qct.del_flag = '0'
<if test="checkLoc != null ">and qct.check_loc = #{checkLoc}</if>
<if test="cpkType != null ">and bpa.cpk_type = #{cpkType}</if>
<if test="workorderCodeSap != null ">and pow.workorder_code_sap like concat('%',#{workorderCodeSap},'%')</if>
@ -1416,7 +1418,7 @@
SELECT
ISNULL(tc.class_name,'其他') defectSubclass,
FORMAT ( qct.create_time, 'yyyy-MM-dd' ) attr1,
SUM(td.noOk_quality) attr2,
ISNULL( SUM ( td.noOk_quality ), 0 ) attr2,
SUM(qct.sample_quality) attr3
FROM qc_check_task qct
LEFT JOIN qc_check_task_defect td ON qct.record_id = td.belong_to

Loading…
Cancel
Save