计件工资、月度报表修改

master
Yangwl 7 months ago
parent 79cf66af1f
commit 845fc2fa00

@ -631,10 +631,9 @@ public class MesReportWorkController extends BaseController {
parammap.put("beginTime",beginTime);
parammap.put("endTime",endTime);
mesMonthReportVo.setParams(parammap);
List<Map> mapList = mesReportWorkService.getmonthProductionSut(mesMonthReportVo);
return success(mapList);
Map resultMap = mesReportWorkService.getmonthProductionSut(mesMonthReportVo);
return success(resultMap);
}
}

@ -6,6 +6,7 @@ import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;
/**
* mes_unitprice_report
@ -69,9 +70,9 @@ public class MesUnitpriceReport extends BaseEntity {
private BigDecimal result;
@Excel(name = "人数")
private String headCount;
@Excel(name = "平均工资")
// @Excel(name = "平均工资")
private String avgResult;
@Excel(name = "实际工资")
@Excel(name = "工时工资")
private String realWages;
@ -90,7 +91,6 @@ public class MesUnitpriceReport extends BaseEntity {
private String childprocessCode;
/**
* $column.columnComment
*/
@ -100,6 +100,7 @@ public class MesUnitpriceReport extends BaseEntity {
* $column.columnComment
*/
// @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
@Excel(name = "工时")
private String attr2;
public String getSapCode() {

@ -182,5 +182,9 @@ public interface MesReportWorkMapper {
List<QuantityDto> getSumQuantity(QuantityDto quantityDto);
//当月产线产量汇总
List<Map> getmonthProductionSut(MesMonthReportVo mesMonthReportVo);
//当月产线品类汇总
List<Map> getmonthProductionSutCategory(MesMonthReportVo mesMonthReportVo);
}

@ -137,5 +137,5 @@ public interface IMesReportWorkService {
List<MesDailyReportVo> getDailyReportNew(MesDailyReportVo mesDailyReportVo);
List<Map> getmonthProductionSut(MesMonthReportVo mesMonthReportVo);
Map getmonthProductionSut(MesMonthReportVo mesMonthReportVo);
}

@ -839,15 +839,19 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
@Override
@DS("#header.poolName")
public List<Map> getmonthProductionSut(MesMonthReportVo mesMonthReportVo) {
List<Map> mapList=new ArrayList<>();
public Map getmonthProductionSut(MesMonthReportVo mesMonthReportVo) {
Map map=new HashMap();
try {
mapList = mesReportWorkMapper.getmonthProductionSut(mesMonthReportVo);
List<Map> mapList_one=new ArrayList<>();
List<Map> mapList_two=new ArrayList<>();
mapList_one = mesReportWorkMapper.getmonthProductionSut(mesMonthReportVo);
mapList_two = mesReportWorkMapper.getmonthProductionSutCategory(mesMonthReportVo);
map.put("mapList_one",mapList_one);
map.put("mapList_two",mapList_two);
}catch (Exception e){
e.printStackTrace();
}
return mapList;
return map;
}
}

@ -930,6 +930,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getmonthProductionSut" statementType="CALLABLE" resultType="java.util.Map" parameterType="MesMonthReportVo">
{CALL GeneratePivotReport(#{params.beginTime, jdbcType=DATE}, #{params.endTime, jdbcType=DATE})}
</select>
<select id="getmonthProductionSutCategory" statementType="CALLABLE" resultType="java.util.Map" parameterType="MesMonthReportVo">
{CALL GeneratePivotReportCategory(#{params.beginTime, jdbcType=DATE}, #{params.endTime, jdbcType=DATE})}
</select>
<insert id="insertMesReportWork" parameterType="MesReportWork">
insert into mes_report_work

@ -44,16 +44,18 @@
mur.product_code,
mur.product_name,
mur.line_code,
mur.attr2 AS real_wages,
mur.attr2,
mur.remark,
be.sap_name as equipment_name,
mur.nick_name,
mur.childprocess_code,
mup.childprocess_name,
mur.attr1 AS total_quantity,
CAST(mur.attr2 AS DECIMAL) * 16 AS real_wages,
mup.attr1,
mup.attr1*mur.attr1 AS result,
COUNT(*) OVER (PARTITION BY mur.workorder_code_sap, mur.childprocess_code) AS head_count
COUNT(*) OVER (PARTITION BY mur.workorder_code_sap, mur.childprocess_code) AS head_count,
mur.create_time
FROM
mes_unitprice_report mur
LEFT JOIN
@ -82,12 +84,15 @@
<if test="lineCode != null and lineCode != ''">and mur.line_code like concat('%',
#{lineCode}, '%')
</if>
<if test="equipmentName != null and equipmentName != ''">and be.equipment_name like concat('%',
<if test="equipmentName != null and equipmentName != ''">and be.sap_name like concat('%',
#{equipmentName}, '%')
</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="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
and mur.create_time between #{params.beginTime} and #{params.endTime}
</if>
</where>
GROUP BY
mur.id,
@ -104,6 +109,7 @@
mur.childprocess_code,
mup.childprocess_name,
mrw.total_quantity,
mur.create_time,
mup.attr1;
</select>

Loading…
Cancel
Save