生产日报表人员调动

master
zhaoxiaolin 7 months ago
parent 422aaae354
commit 156ed0e831

@ -5,9 +5,18 @@ import java.math.BigDecimal;
public class QuantityDto { public class QuantityDto {
private Long quantityFeedbackSum; private Long quantityFeedbackSum;
private BigDecimal workTime; private BigDecimal workTime;
private Long useMan; private BigDecimal useMan;
private String workorderCode; private String workorderCode;
private String machineCode; private String machineCode;
private BigDecimal totalWorkTime;
public BigDecimal getTotalWorkTime() {
return totalWorkTime;
}
public void setTotalWorkTime(BigDecimal totalWorkTime) {
this.totalWorkTime = totalWorkTime;
}
public Long getQuantityFeedbackSum() { public Long getQuantityFeedbackSum() {
return quantityFeedbackSum; return quantityFeedbackSum;
@ -25,11 +34,11 @@ public class QuantityDto {
this.workTime = workTime; this.workTime = workTime;
} }
public Long getUseMan() { public BigDecimal getUseMan() {
return useMan; return useMan;
} }
public void setUseMan(Long useMan) { public void setUseMan(BigDecimal useMan) {
this.useMan = useMan; this.useMan = useMan;
} }

@ -48,7 +48,7 @@ public class MesDailyReportVo extends BaseEntity {
//计划产量 //计划产量
// 标准用人 // 标准用人
@Excel(name = "标准用人") @Excel(name = "标准用人")
private Long useMan; private BigDecimal useMan;
// 标准效率 // 标准效率
@Excel(name = "产线标准效率") @Excel(name = "产线标准效率")
private BigDecimal efficiency; private BigDecimal efficiency;
@ -393,11 +393,11 @@ public class MesDailyReportVo extends BaseEntity {
this.quantitySplit = quantitySplit; this.quantitySplit = quantitySplit;
} }
public Long getUseMan() { public BigDecimal getUseMan() {
return useMan; return useMan;
} }
public void setUseMan(Long useMan) { public void setUseMan(BigDecimal useMan) {
this.useMan = useMan; this.useMan = useMan;
} }

@ -434,7 +434,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
// 实际工时 // 实际工时
BigDecimal workTime = BigDecimal.ZERO; BigDecimal workTime = BigDecimal.ZERO;
// 实际用人 // 实际用人
Long useMan = 0L; BigDecimal useMan = BigDecimal.ZERO;
if (sonMesReport != null && sonMesReport != null) { if (sonMesReport != null && sonMesReport != null) {
sumQua = sonMesReport.getQuantityFeedbackSum(); sumQua = sonMesReport.getQuantityFeedbackSum();
realQua = parentMesReport.getQuantityFeedbackSum(); realQua = parentMesReport.getQuantityFeedbackSum();
@ -464,9 +464,8 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
.divide(workTime,2,BigDecimal.ROUND_HALF_UP); .divide(workTime,2,BigDecimal.ROUND_HALF_UP);
dto.setProductivity(productivity.toString()+"%"); dto.setProductivity(productivity.toString()+"%");
// 总工时 实际用人*实际工时 // 总工时 实际用人*实际工时
BigDecimal totalWorkTime = new BigDecimal(useMan)
.multiply(workTime); dto.setTotalWorkTime(sonMesReport.getTotalWorkTime().toString());
dto.setTotalWorkTime(totalWorkTime.toString());
// 标准人均效率 实际产量/标准用人/标准工时 // 标准人均效率 实际产量/标准用人/标准工时
BigDecimal manAvgStandard = new BigDecimal(realQua) BigDecimal manAvgStandard = new BigDecimal(realQua)
.divide(new BigDecimal(dto.getManStandard()),4,BigDecimal.ROUND_HALF_UP) .divide(new BigDecimal(dto.getManStandard()),4,BigDecimal.ROUND_HALF_UP)
@ -474,7 +473,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
dto.setManAvgStandard(manAvgStandard.toString()); dto.setManAvgStandard(manAvgStandard.toString());
// 实际人均效率 实际产量/总工时 // 实际人均效率 实际产量/总工时
BigDecimal manAvgActual = new BigDecimal(realQua) BigDecimal manAvgActual = new BigDecimal(realQua)
.divide(totalWorkTime,2,BigDecimal.ROUND_HALF_UP); .divide(sonMesReport.getTotalWorkTime(),2,BigDecimal.ROUND_HALF_UP);
dto.setManAvgActual(manAvgActual.toString()); dto.setManAvgActual(manAvgActual.toString());
// 人均效率达成率 实际人均效率/标准人均效率 // 人均效率达成率 实际人均效率/标准人均效率
BigDecimal manAvgDo = manAvgActual BigDecimal manAvgDo = manAvgActual

@ -715,7 +715,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select select
sum(quantity_feedback) quantityFeedbackSum, sum(quantity_feedback) quantityFeedbackSum,
sum(work_time) workTime, sum(work_time) workTime,
max(use_man) useMan ROUND(sum(work_time*use_man)/sum(work_time), 2) useMan,
sum(work_time*use_man) totalWorkTime
from mes_report_work from mes_report_work
where parent_order = #{workorderCode} and del_flag = '0' and machine_code = #{machineCode} where parent_order = #{workorderCode} and del_flag = '0' and machine_code = #{machineCode}
</select> </select>

@ -146,5 +146,7 @@ public interface IProOrderService {
String checkRepeatBatchCodes(SplitOrderDTO splitOrderDTO); String checkRepeatBatchCodes(SplitOrderDTO splitOrderDTO);
List<ProOrder> getCanProductLine(); ProOrder getCanProductLine(ProOrder proOrder);
R autoSplitOrder(ProOrder proOrder);
} }

@ -105,6 +105,24 @@ public class QcStaticTable extends BaseEntity {
private List<HashMap> dxData; private List<HashMap> dxData;
private List<HashMap> details; private List<HashMap> details;
private String[] projectNoArray; private String[] projectNoArray;
private BigDecimal upperDiff;
private BigDecimal downDiff;
public BigDecimal getUpperDiff() {
return upperDiff;
}
public void setUpperDiff(BigDecimal upperDiff) {
this.upperDiff = upperDiff;
}
public BigDecimal getDownDiff() {
return downDiff;
}
public void setDownDiff(BigDecimal downDiff) {
this.downDiff = downDiff;
}
public String getShiftId() { public String getShiftId() {
return shiftId; return shiftId;

@ -77,4 +77,6 @@ public interface QcStaticTableMapper {
List<QcStaticTable> getDLTableTitle(QcStaticTable qcStaticTable); List<QcStaticTable> getDLTableTitle(QcStaticTable qcStaticTable);
List<QcStaticTable> getProjectList(String checkType); List<QcStaticTable> getProjectList(String checkType);
QcStaticTable getUpAndDown(QcStaticTable qcStaticTable);
} }

@ -541,6 +541,20 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
dxData.add(result); dxData.add(result);
} }
dto.setDxData(dxData); dto.setDxData(dxData);
//给折线图取上下限制
if(qcStaticTable.getProjectNoArray()!=null){
qcStaticTable.setProjectNo(qcStaticTable.getProjectNoArray()[0]);
QcStaticTable upandown = qcStaticTableMapper.getUpAndDown(qcStaticTable);
if(upandown!=null){
dto.setUpperDiff(upandown.getUpperDiff());
dto.setDownDiff(upandown.getDownDiff());
}else{
dto.setUpperDiff(BigDecimal.ZERO);
dto.setDownDiff(BigDecimal.ZERO);
}
}
return dto; return dto;
} }

@ -436,8 +436,8 @@
left join base_equipment be on be.equipment_code = pow.workorder_name and be.equipment_type_code = 'equ_type_bzx' left join base_equipment be on be.equipment_code = pow.workorder_name and be.equipment_type_code = 'equ_type_bzx'
where pow.del_flag = '0' where pow.del_flag = '0'
and pow.status = #{status} and pow.parent_order = '0' and pow.status = #{status} and pow.parent_order = '0'
and (pow.product_date = CONVERT(varchar(10),GETDATE(), 120) <!--and (pow.product_date = CONVERT(varchar(10),GETDATE(), 120)-->
or pow.product_date = CONVERT(varchar(10),DATEADD(DAY, -1, GETDATE()), 120)) and pow.product_date >= CONVERT(varchar(10),DATEADD(DAY, -1, GETDATE()), 120)
</select> </select>
<select id="getOrderWorksW3" resultType="com.op.quality.domain.QcCheckTaskProduce"> <select id="getOrderWorksW3" resultType="com.op.quality.domain.QcCheckTaskProduce">
select top 1 select top 1

@ -196,7 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into qc_check_task( insert into qc_check_task(
record_id,check_no,income_batch_no,order_no, record_id,check_no,income_batch_no,order_no,
material_code,material_name,quality,unit, material_code,material_name,quality,unit,
supplier_code,supplier_name,income_time, supplier_code,supplier_name,income_time,check_loc,
check_status, check_status,
create_by,create_time,factory_code,del_flag, create_by,create_time,factory_code,del_flag,
check_type,noOk_quality,sample_quality,type_code,order_type check_type,noOk_quality,sample_quality,type_code,order_type
@ -204,7 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select select
#{recordId},concat(check_no,FORMAT(GETDATE(),'HHmmss')),income_batch_no ,order_no , #{recordId},concat(check_no,FORMAT(GETDATE(),'HHmmss')),income_batch_no ,order_no ,
material_code,material_name,quality ,unit , material_code,material_name,quality ,unit ,
supplier_code,supplier_name,income_time, supplier_code,supplier_name,income_time,check_loc,
'0', '0',
#{createBy},#{createTime},factory_code,del_flag, #{createBy},#{createTime},factory_code,del_flag,
check_type,noOk_quality,sample_quality,type_code ,'reCheckCS' check_type,noOk_quality,sample_quality,type_code ,'reCheckCS'

@ -394,4 +394,10 @@
where qctp.type_id = #{checkType} and qctp.property_code = '1' where qctp.type_id = #{checkType} and qctp.property_code = '1'
and qctp.material_code is null and qcp.rule_name is not null and qctp.material_code is null and qcp.rule_name is not null
</select> </select>
<select id="getUpAndDown" resultType="com.op.quality.domain.QcStaticTable">
select ISNULL(upper_diff,0) upperDiff,
ISNULL(down_diff, 0) downDiff
from qc_check_type_project where project_id = #{projectNo}
and type_id = #{checkType}
</select>
</mapper> </mapper>

Loading…
Cancel
Save