临时任务统计报表维护新增列

master
yinq 2 years ago
parent c1b1068cc5
commit 198737bef8

@ -212,7 +212,18 @@ public class TemporaryFix extends Model<TemporaryFix> {
@ExcelColumn(value = "updatedTime")
private LocalDateTime updatedTime;
/**
*
*/
@ExcelColumn(value = "其他种类单据号")
@TableField("OTHER_KINDS_NUMBER")
private String otherKindsNumber;
@TableField(exist = false)
@ExcelColumn(value = "SEQ")
private Integer SEQ;
}

@ -108,6 +108,17 @@ public class TemporaryFixServiceImpl extends ServiceImpl<TemporaryFixMapper, Tem
for (TemporaryFix temporaryFix : temporaryFixList) {
if (StringUtils.isBlank(temporaryFix.getUploadCenter()) || StringUtils.isBlank(temporaryFix.getUploadUser())){
return R.failed("请导入正确的上传车间或上传人员且不为空");
}else if (StringUtils.isBlank(temporaryFix.getEntrustUnit())){
if (temporaryFix.getEntrustUnit().equals("制造中心") || temporaryFix.getEntrustUnit().equals("市场部") || temporaryFix.getEntrustUnit().equals("外协")){
if (StringUtils.isBlank(temporaryFix.getDutyPerson())){
return R.failed("委托/联系单位:" + temporaryFix.getEntrustUnit() + ",请填写“责任主体/人/原因”后再进行导入" );
}else if (StringUtils.isBlank(temporaryFix.getProjectNumber())){
return R.failed("委托/联系单位:" + temporaryFix.getEntrustUnit() + ",请填写“项目号”后再进行导入" );
}
}
}else if (StringUtils.isBlank(temporaryFix.getQualityReviewNumber()) && StringUtils.isBlank(temporaryFix.getWorkContactNumber())
&& StringUtils.isBlank(temporaryFix.getOtherKindsNumber())){
return R.failed("请至少填写一个再进行导入:质量评审单号、工作联络单号、其他种类单据号" );
}
}
boolean result = this.saveBatch(temporaryFixList);

@ -34,11 +34,13 @@
<result column="DUTY_CLASSIFY" property="dutyClassify" />
<result column="EMPLOY_PROPERTY" property="employProperty" />
<result column="CENTER_CODE" property="centerCode" />
<result column="OTHER_KINDS_NUMBER" property="otherKindsNumber" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, ENTRUST_DATE, ENTRUST_UNIT, DUTY_PERSON, DUTY_REASON, PROJECT_NUMBER, QUALITY_REVIEW_NUMBER, WORK_CONTACT_NUMBER, MATERIAL_CODE, MATERIAL_NAME, MAP_NO, AMOUNT, SINGLE_WORK_HOURS, TOTAL_WORK_HOURS, MACHINE_HOURS, OPERATOR, USE_DEVICE, DEVICE_TYPE, COST_CENTER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, UPLOAD_CENTER, UPLOAD_USER, CLASSIFY, DUTY_CLASSIFY, EMPLOY_PROPERTY, CENTER_CODE,row_number() over (ORDER BY CREATED_TIME DESC ) SEQ
HANDLE, SITE, ENTRUST_DATE, ENTRUST_UNIT, DUTY_PERSON, DUTY_REASON, PROJECT_NUMBER, QUALITY_REVIEW_NUMBER, WORK_CONTACT_NUMBER, MATERIAL_CODE, MATERIAL_NAME, MAP_NO, AMOUNT, SINGLE_WORK_HOURS, TOTAL_WORK_HOURS, MACHINE_HOURS, OPERATOR, USE_DEVICE, DEVICE_TYPE, COST_CENTER, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME,
UPLOAD_CENTER, UPLOAD_USER, CLASSIFY, DUTY_CLASSIFY, EMPLOY_PROPERTY, CENTER_CODE, OTHER_KINDS_NUMBER,row_number() over (ORDER BY CREATED_TIME DESC ) SEQ
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -102,6 +104,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</where>
</select>
@ -142,6 +145,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -190,6 +194,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -238,6 +243,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -286,6 +292,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -334,6 +341,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -382,6 +390,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -426,6 +435,7 @@
<if test="dutyClassify!=null">DUTY_CLASSIFY,</if>
<if test="employProperty!=null">EMPLOY_PROPERTY,</if>
<if test="centerCode!=null">CENTER_CODE,</if>
<if test="otherKindsNumber!=null">OTHER_KINDS_NUMBER,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
@ -458,6 +468,7 @@
<if test="dutyClassify!=null">#{dutyClassify},</if>
<if test="employProperty!=null">#{employProperty},</if>
<if test="centerCode!=null">#{centerCode},</if>
<if test="otherKindsNumber!=null">#{otherKindsNumber},</if>
</trim>
</insert>
@ -497,6 +508,7 @@
#{dutyClassify},
#{employProperty},
#{centerCode},
#{otherKindsNumber},
</trim>
</insert>
@ -532,6 +544,7 @@
<if test="et.dutyClassify!=null">DUTY_CLASSIFY=#{et.dutyClassify},</if>
<if test="et.employProperty!=null">EMPLOY_PROPERTY=#{et.employProperty},</if>
<if test="et.centerCode!=null">CENTER_CODE=#{et.centerCode},</if>
<if test="et.otherKindsNumber!=null">OTHER_KINDS_NUMBER=#{et.otherKindsNumber},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
@ -567,6 +580,7 @@
DUTY_CLASSIFY=#{et.dutyClassify},
EMPLOY_PROPERTY=#{et.employProperty},
CENTER_CODE=#{et.centerCode},
OTHER_KINDS_NUMBER=#{et.otherKindsNumber},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
@ -602,6 +616,7 @@
<if test="et.dutyClassify!=null">DUTY_CLASSIFY=#{et.dutyClassify},</if>
<if test="et.employProperty!=null">EMPLOY_PROPERTY=#{et.employProperty},</if>
<if test="et.centerCode!=null">CENTER_CODE=#{et.centerCode},</if>
<if test="et.otherKindsNumber!=null">OTHER_KINDS_NUMBER=#{et.otherKindsNumber},</if>
</trim>
<where>
<if test="ew!=null">
@ -636,6 +651,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -701,6 +717,7 @@
<if test="ew.entity.dutyClassify!=null"> AND DUTY_CLASSIFY=#{ew.entity.dutyClassify}</if>
<if test="ew.entity.employProperty!=null"> AND EMPLOY_PROPERTY=#{ew.entity.employProperty}</if>
<if test="ew.entity.centerCode!=null"> AND CENTER_CODE=#{ew.entity.centerCode}</if>
<if test="ew.entity.otherKindsNumber!=null"> AND OTHER_KINDS_NUMBER=#{ew.entity.otherKindsNumber}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}

@ -487,7 +487,7 @@
INNER JOIN RESOURCE_TYPE_RESOURCE WM ON WM.RESOURCE_BO = A.RESOURCE_BO
INNER JOIN RESOURCE_TYPE RT ON RT.HANDLE = WM.RESOURCE_TYPE_BO
LEFT JOIN Z_NWA_USER B ON A.SITE = B.SITE AND A.USER_ID = B.USER_NAME
WHERE A.SITE = #{site} AND RT.RESOURCE_TYPE = #{resourceType}
WHERE A.SITE = #{site} AND RT.RESOURCE_TYPE LIKE #{resourceType}
</select>
<select id="getTemporaryUser" resultType="com.foreverwin.mesnac.common.dto.UsrDto">
SELECT DISTINCT USER_ID USER_NAME,USER_DESCRIPTION FULL_NAME FROM Z_USER_RESOURCE

Loading…
Cancel
Save