修复已知问题

This commit is contained in:
2023-08-28 15:07:37 +08:00
parent 0beec730e8
commit 7264d82019
38 changed files with 6035 additions and 790 deletions

View File

@ -1,6 +1,8 @@
package com.ailanyin.mapper;
import com.ailanyin.model.HxModelYearPlan;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -12,9 +14,12 @@ import java.util.List;
public interface HxModelYearPlanMapper {
int checkIsExist(HxModelYearPlan hxModelYearPlan);
List<HxModelYearPlan> selectList(HxModelYearPlan hxModelYearPlan);
List<HxModelYearPlan> select(HxModelYearPlan hxModelYearPlan);
void insertSelective(HxModelYearPlan hxModelYearPlan);
void updateSelective(HxModelYearPlan hxModelYearPlan);
String selectTargetTotal(@Param("year") String year,@Param("model") String productModel);
}

View File

@ -1,6 +1,8 @@
package com.ailanyin.mapper;
import com.ailanyin.model.HxMonthFactoryPlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -9,8 +11,10 @@ import java.util.List;
* @version 1.0
* @since 2021/12/22 0022 下午 16:30
*/
@Mapper
public interface HxMonthFactoryPlanMapper {
List<HxMonthFactoryPlan> selectList(HxMonthFactoryPlan hxMonthFactoryPlan);
List<HxMonthFactoryPlan> select(HxMonthFactoryPlan hxMonthFactoryPlan);
void updateSelective(HxMonthFactoryPlan hxMonthFactoryPlan);

View File

@ -1,6 +1,7 @@
package com.ailanyin.mapper;
import com.ailanyin.model.HxMonthPlan;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -17,4 +18,25 @@ public interface HxMonthPlanMapper {
void updateSelective(HxMonthPlan hxMonthPlan);
void insertSelective(HxMonthPlan hxMonthPlan);
@Select("select \"month\", \"product_model\" as \"model\",\"ascription\",\n" +
"\"real_deliver\" as \"realDeliver\",\n" +
"\"real_assembly\" as \"realAssemble\",\n" +
"\"real_charge\" as \"realCharge\",\n" +
"\"forecast_deliver\" as \"targetDeliver\",\n" +
"\"forecast_assembly\" as \"targetAssemble\",\n" +
"\"forecast_charge\" as \"targetCharge\"\n" +
"from ROOT.\"hx_production_plan\"\n" +
"where \"month\" = #{month}")
List<HxMonthPlan> selectByMonth(HxMonthPlan hxMonthPlan);
@Select("select \"month\", \"product_model\" as \"model\",\"ascription\",\n" +
"\"real_deliver\" as \"realDeliver\",\n" +
"\"real_assembly\" as \"realAssemble\",\n" +
"\"real_charge\" as \"realCharge\",\n" +
"\"forecast_deliver\" as \"targetDeliver\",\n" +
"\"forecast_assembly\" as \"targetAssemble\",\n" +
"\"forecast_charge\" as \"targetCharge\"\n" +
"from ROOT.\"hx_production_plan\"")
List<HxMonthPlan> selectAll(HxMonthPlan hxMonthPlan);
}

View File

@ -2,6 +2,7 @@ package com.ailanyin.mapper;
import com.ailanyin.model.HxProductCompletionOverview;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -49,4 +50,6 @@ public interface HxProductCompletionOverviewMapper {
* @param id id
*/
void delHxProductCompletionOverviewById(Long id);
List<HxProductCompletionOverview> selectList(HxProductCompletionOverview completionOverview);
}

View File

@ -3,6 +3,7 @@ package com.ailanyin.mapper;
import com.ailanyin.model.HxProductionResponsibility;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
@ -47,4 +48,10 @@ public interface HxProductionResponsibilityMapper {
void insertSelective(HxProductionResponsibility productionResponsibility);
Map getRateByYear(String year);
@Select("select \"translate_name\" as \"translateName\",sum(\"completed_task_number\") as \"completedTaskNumber\"\n" +
"from ROOT.\"hx_production_responsibility\"\n" +
"where \"month\" like #{year}\n" +
"group by \"translate_name\"")
List<Map> getCategoryAndTotal(String year);
}

View File

@ -1,6 +1,9 @@
package com.ailanyin.mapper;
import com.ailanyin.model.HxYearDuty;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -9,6 +12,7 @@ import java.util.List;
* @version 1.0
* @since 2021/12/22 0022 下午 14:40
*/
@Mapper
public interface HxYearDutyMapper {
int checkIsExist(HxYearDuty hxYearDuty);
@ -17,4 +21,7 @@ public interface HxYearDutyMapper {
void updateSelective(HxYearDuty hxYearDuty);
void insertSelective(HxYearDuty hxYearDuty);
@Select("select sum(\"assembly\") from ROOT.\"actual_production_base\" where \"month\" like #{year} and \"model\" = #{model}")
Integer selectRealTotal(@Param("year") String year, @Param("model") String model);
}

View File

@ -28,24 +28,27 @@ public class HxProductionPlan implements Serializable {
@ApiModelProperty(value = "绝热数量")
@Excel(name = "实际绝热数量", width = 20)
private String realAdiabat;
@Excel(name = "预测绝热数量", width = 20)
private String forecastAdiabat;
@ApiModelProperty(value = "装药数量")
@Excel(name = "实际装药数量", width = 20)
private String realCharge;
@Excel(name = "实际总装数量", width = 20)
private String realAssembly;
@Excel(name = "实际交付数量", width = 20)
private String realDeliver;
@ApiModelProperty(value = "装药数量")
@Excel(name = "预测绝热数量", width = 20)
private String forecastAdiabat;
@Excel(name = "预测装药数量", width = 20)
private String forecastCharge;
@ApiModelProperty(value = "总装数量")
@Excel(name = "实际总装数量", width = 20)
private String realAssembly;
@Excel(name = "预测总装数量", width = 20)
private String forecastAssembly;
@ApiModelProperty(value = "交付数量")
@Excel(name = "实际交付数量", width = 20)
private String realDeliver;
@Excel(name = "预测交付数量", width = 20)
private String forecastDeliver;
@ -61,5 +64,9 @@ public class HxProductionPlan implements Serializable {
@Excel(name = "生产数量", width = 20)
private String productionNumber;
@ApiModelProperty(value = "计划归属")
@Excel(name = "计划归属", width = 20)
private String ascription;
private static final long serialVersionUID = 1L;
}

View File

@ -17,6 +17,10 @@ public class HxResponsibilityStatus implements Serializable {
private Long id;
@ApiModelProperty(value = "月份")
@Excel(name = "月份", width = 20)
private String month;
@ApiModelProperty(value = "责任令内容")
@Excel(name = "责任令内容", width = 20)
private String responsibilityContent;

View File

@ -35,6 +35,10 @@ public class HxWorkHomeInfo implements Serializable {
@Excel(name = "车间名称", width = 20)
private String workshop;
@ApiModelProperty(value = "是否正在作业")
@Excel(name = "是否正在作业(是/否)", width = 25)
private String workFlag;
@ApiModelProperty(value = "作业内容")
@Excel(name = "作业内容", width = 20)
private String jobContent;
@ -49,7 +53,11 @@ public class HxWorkHomeInfo implements Serializable {
private boolean flag = false;
private List<Map> userList;
@ApiModelProperty(value = "作业人员")
@Excel(name = "作业人员", width = 30)
private String users;
private List<String> userList;
private static final long serialVersionUID = 1L;
}

View File

@ -26,6 +26,18 @@
"id", "year", "product_model", "real_charge", "target_charge", "charge_rate", "real_deliver",
"target_deliver", "deliver_rate"
</sql>
<select id="select" resultMap="BaseResultMap">
select "product_model" as "productModel",
sum("real_charge") as "realCharge",
sum("real_deliver") as "realDeliver"
from ROOT."hx_production_plan"
where "month" LIKE #{year}
group BY "hx_production_plan"."product_model"
</select>
<select id="selectTargetTotal" resultType="string">
select sum("total") from ROOT."production_responsibility_base" where "year" = #{year} and "model" = #{model}
</select>
<select id="selectList" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated

View File

@ -30,6 +30,19 @@
"real_assemble", "target_assemble", "bad_reason", "insulate_rate", "charge_rate",
"assemble_rate"
</sql>
<select id="select" resultMap="BaseResultMap">
select "month",
sum("real_adiabat") as "realInsulate",
sum("real_assembly") as "realAssemble",
sum("real_charge") as "realCharge",
sum("forecast_adiabat") as "targetInsulate",
sum("forecast_assembly") as "targetAssemble",
sum("forecast_charge") as "targetCharge"
from ROOT."hx_production_plan"
where "ascription" = '厂计划' and "month" = #{month}
group BY "month"
</select>
<select id="selectList" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated

View File

@ -14,6 +14,10 @@
"id", "product_name", "actual_delivery_quantity", "target_delivery_quantity", "completion_rate","month",
"create_time"
</sql>
<select id="selectList" resultMap="BaseResultMap">
select "month","model" as "productName","deliver" as "actualDeliveryQuantity" from ROOT."actual_production_base"
</select>
<select id="selectHxProductCompletionOverviewList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />

View File

@ -21,6 +21,7 @@
<result column="forecast_deliver" jdbcType="VARCHAR" property="forecastDeliver" />
<result column="review" jdbcType="VARCHAR" property="review" />
<result column="settlement" jdbcType="VARCHAR" property="settlement" />
<result column="ascription" jdbcType="VARCHAR" property="ascription" />
</resultMap>
<sql id="Base_Column_List">
<!--
@ -41,7 +42,8 @@
"real_deliver",
"forecast_deliver",
"review",
"settlement"
"settlement",
"ascription"
</sql>
<select id="selectList" resultMap="BaseResultMap">
<!--
@ -132,6 +134,9 @@
<if test="settlement != null">
"settlement",
</if>
<if test="ascription != null">
"ascription",
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -176,6 +181,9 @@
<if test="settlement != null">
#{settlement,jdbcType=VARCHAR},
</if>
<if test="ascription != null">
#{ascription,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateSelective" parameterType="com.ailanyin.model.HxProductionPlan">
@ -219,6 +227,9 @@
<if test="settlement != null">
"settlement" = #{settlement,jdbcType=VARCHAR},
</if>
<if test="ascription != null">
"ascription" = #{ascription,jdbcType=VARCHAR},
</if>
</set>
where "month" = #{month,jdbcType=VARCHAR} and "product_model" = #{productModel,jdbcType=VARCHAR}
</update>

View File

@ -130,7 +130,7 @@
<select id="selectGeneralFactory" resultType="map">
select "month",sum("plan_number") as "total",sum("complete_number") as "completed",
sum("complete_number")/sum("plan_number") as "rate"
sum("complete_number")/sum("plan_number")*100 as "rate"
from ROOT."hx_quality_plan"
group BY "month"
order by "month" ASC
@ -138,7 +138,7 @@
<select id="selectDept" resultType="map">
select "dept_name" as "deptName",sum("plan_number") as "total",sum("complete_number") as "completed",
sum("complete_number")/sum("plan_number") as "rate"
sum("complete_number")/sum("plan_number")*100 as "rate"
from ROOT."hx_quality_plan"
group BY "dept_name"
</select>

View File

@ -12,6 +12,7 @@
<result column="progress_status" jdbcType="VARCHAR" property="progressStatus" />
<result column="completion_status" jdbcType="VARCHAR" property="completionStatus" />
<result column="dept_name" jdbcType="VARCHAR" property="deptName" />
<result column="month" jdbcType="VARCHAR" property="month" />
</resultMap>
<sql id="Base_Column_List">
<!--
@ -19,7 +20,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Dec 14 02:43:38 UTC 2021.
-->
"id", "responsibility_content", "progress_status", "completion_status", "dept_name"
"id", "responsibility_content", "progress_status", "completion_status", "dept_name","month"
</sql>
<select id="selectHxResponsibilityStatusList" resultMap="BaseResultMap">
select
@ -69,6 +70,9 @@
<if test="deptName != null">
"dept_name",
</if>
<if test="month != null">
"month",
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -86,6 +90,9 @@
<if test="deptName != null">
#{deptName,jdbcType=VARCHAR},
</if>
<if test="month != null">
#{month,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateSelective" parameterType="com.ailanyin.model.HxResponsibilityStatus">
@ -94,7 +101,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Dec 14 02:43:38 UTC 2021.
-->
update "hx_responsibility_status"
update ROOT."hx_responsibility_status"
<set>
<if test="progressStatus != null">
"progress_status" = #{progressStatus,jdbcType=VARCHAR},
@ -103,7 +110,7 @@
"completion_status" = #{completionStatus,jdbcType=VARCHAR},
</if>
</set>
where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent}
where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent} and "month" = #{month}
</update>
<update id="updateByPrimaryKey" parameterType="com.ailanyin.model.HxResponsibilityStatus">
<!--
@ -120,14 +127,13 @@
</update>
<select id="getTotalAndRate" resultType="map">
select count("id") as "total",convert(float,(select count("id")
from ROOT."hx_responsibility_status" where "completion_status" = '已完成'))/convert(float,count("id")) * 100 as "rate"
from ROOT."hx_responsibility_status"
select count("id") as "total",convert(float,(count("id"))/convert(float,(select count(1) from ROOT."hx_responsibility_status"))) * 100 as "rate"
from ROOT."hx_responsibility_status" where "completion_status" = '已完成'
</select>
<select id="checkIsExist" resultType="int">
select count("id") from ROOT."hx_responsibility_status"
where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent}
where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent} and "month" = #{month}
limit 1
</select>
</mapper>

View File

@ -15,6 +15,8 @@
<result column="job_content" jdbcType="VARCHAR" property="jobContent" />
<result column="error_info" jdbcType="VARCHAR" property="errorInfo" />
<result column="av_address" jdbcType="VARCHAR" property="avAddress" />
<result column="users" jdbcType="VARCHAR" property="users" />
<result column="work_flag" jdbcType="VARCHAR" property="workFlag" />
</resultMap>
<sql id="Base_Column_List">
<!--
@ -23,7 +25,7 @@
This element was generated on Thu Dec 23 10:21:10 UTC 2021.
-->
"id", "work_home_name", "abscissa", "ordinate", "workshop", "job_content", "error_info",
"av_address"
"av_address","work_flag","users"
</sql>
<select id="selectList" resultMap="BaseResultMap">
<!--
@ -99,6 +101,12 @@
<if test="avAddress != null">
"av_address",
</if>
<if test="users != null">
"users",
</if>
<if test="workFlag != null">
"work_flag",
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -125,6 +133,12 @@
<if test="avAddress != null">
#{avAddress,jdbcType=VARCHAR},
</if>
<if test="users != null">
#{users,jdbcType=VARCHAR},
</if>
<if test="workFlag != null">
#{workFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateSelective" parameterType="com.ailanyin.model.HxWorkHomeInfo">
@ -156,6 +170,12 @@
<if test="avAddress != null">
"av_address" = #{avAddress,jdbcType=VARCHAR},
</if>
<if test="users != null">
"users" = #{users,jdbcType=VARCHAR},
</if>
<if test="workFlag != null">
"work_flag" = #{workFlag,jdbcType=VARCHAR},
</if>
</set>
where "work_home_name" = #{workHomeName,jdbcType=VARCHAR}
</update>