Browse Source

批量维护工作日历是否包含 2023年3月7日 sxm

master
[li_she] 3 years ago
parent
commit
c3779c474b
  1. 1
      src/main/java/com/gaotao/modules/base/entity/CalendarData.java
  2. 96
      src/main/resources/mapper/base/BaseMapper.xml

1
src/main/java/com/gaotao/modules/base/entity/CalendarData.java

@ -57,6 +57,7 @@ public class CalendarData {
private String scheduledDate;//排产的时间 LR 2022-03-21
private String isIncluding; //是否包含 sxm 2023-03-07
}

96
src/main/resources/mapper/base/BaseMapper.xml

@ -9,15 +9,17 @@
<if test="site != null and site != ''">
AND site = #{site}
</if>
<if test="calendarId != null and calendarId != ''">
AND CalendarID LIKE #{calendarId}
AND CalendarID ${isIncluding} #{calendarId}
</if>
<if test="calendarDesc != null and calendarDesc != ''">
AND CalendarDesc ${isIncluding} #{calendarDesc}
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="calendarDesc != null and calendarDesc != ''">
AND CalendarDesc LIKE #{calendarDesc}
</if>
</where>
</select>
@ -421,7 +423,8 @@
T.CostTypeDesc,
T.Active,
T.BatchCreatedMethod,
T.CheckPercentage,T.InspectFlag
T.CheckPercentage,
T.InspectFlag
from PartFamily as T
where T.Site in (Select Site from AccessSite where upper(UserID) = #{user})
@ -435,9 +438,11 @@
T.CostTypeDesc,
T.Active,
T.BatchCreatedMethod,
T.CheckPercentage,T.InspectFlag
T.CheckPercentage,
T.InspectFlag
from PartFamily as T
where T.Site = #{site} and T.FamilyID = #{familyID}
where T.Site = #{site}
and T.FamilyID = #{familyID}
</select>
<select id="checkAccessSite" resultType="com.gaotao.modules.base.entity.AccessSiteData">
Select UserID, Site
@ -460,7 +465,8 @@
SET Site=#{site},
FamilyName=#{familyName},
Active=#{active},
CheckPercentage=#{checkPercentage},InspectFlag=#{inspectFlag}
CheckPercentage=#{checkPercentage},
InspectFlag=#{inspectFlag}
where FamilyID = #{familyID}
and Site = #{site}
</update>
@ -1798,7 +1804,8 @@
<!--修改标签自定义的信息-->
<update id="updateLabelSetting" parameterType="LabelSettingData">
UPDATE ReportFileList SET ReportFamily = #{labelType}, Reportfile = #{labelName}, ReportType = #{labelClass}, Remark = #{remark}
UPDATE ReportFileList SET ReportFamily = #{labelType}, Reportfile = #{labelName}, ReportType = #{labelClass},
Remark = #{remark}
<where>
AND ReportID = #{labelNo}
</where>
@ -1813,8 +1820,10 @@
</delete>
<!--查询标签的默认配置信息-->
<select id="getDefaultLabelSettingList" parameterType="DefaultLabelSettingData" resultType="DefaultLabelSettingData">
SELECT rfd.ReportFamily labelType, rfd.ReportID labelNo, rfl.ReportType labelClass, rfl.Reportfile labelName, rfd.Remark remark,
<select id="getDefaultLabelSettingList" parameterType="DefaultLabelSettingData"
resultType="DefaultLabelSettingData">
SELECT rfd.ReportFamily labelType, rfd.ReportID labelNo, rfl.ReportType labelClass, rfl.Reportfile labelName,
rfd.Remark remark,
rfd.SubReportFlag subLabelFlag, rfd.ParentReportID parentLabelNo FROM ReportFileDefDefault rfd
LEFT JOIN ReportFileList rfl ON rfl.ReportID = rfd.ReportID
<where>
@ -1840,7 +1849,8 @@
<!--修改默认标签配置信息-->
<update id="updateDefaultLabelSetting" parameterType="DefaultLabelSettingData">
UPDATE ReportFileDefDefault SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark = #{remark}
UPDATE ReportFileDefDefault SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark =
#{remark}
<where>
AND ReportID = #{labelNo} AND ReportFamily = #{labelType} AND FamilyID = '*'
</where>
@ -1855,9 +1865,12 @@
</delete>
<!--查询标签的客制化配置信息-->
<select id="getCustomerLabelSettingList" parameterType="CustomerLabelSettingData" resultType="CustomerLabelSettingData">
SELECT rfc.ReportFamily labelType, rfc.CustomerID customerId, dbo.Get_CustomerDesc(rfc.Site, rfc.CustomerID) customerDesc, rfc.ReportID labelNo,
rfl.Reportfile labelName, rfl.ReportType labelClass, rfc.Site site, rfc.Remark remark, rfc.SubReportFlag subLabelFlag, rfc.ParentReportID parentLabelNo
<select id="getCustomerLabelSettingList" parameterType="CustomerLabelSettingData"
resultType="CustomerLabelSettingData">
SELECT rfc.ReportFamily labelType, rfc.CustomerID customerId, dbo.Get_CustomerDesc(rfc.Site, rfc.CustomerID)
customerDesc, rfc.ReportID labelNo,
rfl.Reportfile labelName, rfl.ReportType labelClass, rfc.Site site, rfc.Remark remark, rfc.SubReportFlag
subLabelFlag, rfc.ParentReportID parentLabelNo
FROM ReportFileDefCustomer rfc
LEFT JOIN ReportFileList rfl ON rfl.ReportID = rfc.ReportID AND rfl.ReportFamily = rfc.ReportFamily
<where>
@ -1880,13 +1893,15 @@
<!--插入客制化标签配置信息-->
<insert id="insertCustomerLabelSetting" parameterType="CustomerLabelSettingData">
INSERT INTO ReportFileDefCustomer(Site, CustomerID, FamilyID, ReportFamily, ReportID, Remark, SubReportFlag, ParentReportID)
INSERT INTO ReportFileDefCustomer(Site, CustomerID, FamilyID, ReportFamily, ReportID, Remark, SubReportFlag,
ParentReportID)
VALUES (#{site}, #{customerId}, '*', #{labelType}, #{labelNo}, #{remark}, #{subLabelFlag}, #{parentLabelNo})
</insert>
<!--修改客制化标签配置信息-->
<update id="updateCustomerLabelSetting" parameterType="CustomerLabelSettingData">
UPDATE ReportFileDefCustomer SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark = #{remark}
UPDATE ReportFileDefCustomer SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark =
#{remark}
<where>
AND ReportID = #{labelNo} AND CustomerID = #{customerId} AND FamilyID = '*'
</where>
@ -1902,7 +1917,8 @@
<!--查询标签的客制化配置信息-->
<select id="getUserLabelPrinters" parameterType="UserLabelPrinterData" resultType="UserLabelPrinterData">
SELECT rfp.UserID userId, ssu.user_display userDisplay, rfp.ReportID labelNo, rfl.Reportfile labelName, rfl.ReportType labelClass,
SELECT rfp.UserID userId, ssu.user_display userDisplay, rfp.ReportID labelNo, rfl.Reportfile labelName,
rfl.ReportType labelClass,
rfp.NewPrinterName printerName, rfp.IPAddress ipAddress
FROM ReportFileList_UserPrinter rfp
LEFT JOIN sys_user ssu ON ssu.username = rfp.UserID
@ -1962,7 +1978,8 @@
<!--获取标签打印参数配置信息-->
<select id="getLabelParameterList" parameterType="LabelParameterData" resultType="LabelParameterData">
SELECT ReportID labelNo, ItemNo itemNo, ShowSeqNo showSeqNo, ParameterDesc parameterDesc, ParameterName parameterName,
SELECT ReportID labelNo, ItemNo itemNo, ShowSeqNo showSeqNo, ParameterDesc parameterDesc, ParameterName
parameterName,
ValueType_DB valueTypeDb, ValueType valueType, OptionValue optionValue, DefaultValue defaultValue
FROM ReportParameters
<where>
@ -1981,7 +1998,8 @@
<!--修改标签打印参数的信息-->
<update id="updateLabelPrintParameter" parameterType="LabelParameterData">
UPDATE ReportParameters SET OptionValue = #{optionValue}, DefaultValue = #{defaultValue}, ShowSeqNo = #{showSeqNo}
UPDATE ReportParameters SET OptionValue = #{optionValue}, DefaultValue = #{defaultValue}, ShowSeqNo =
#{showSeqNo}
<where>
AND ReportID = #{labelNo} AND ItemNo = #{itemNo}
</where>
@ -1998,7 +2016,8 @@
<!--查询标签内容定义列表-->
<select id="getLabelContentList" parameterType="LabelContentData" resultType="LabelContentData">
SELECT ItemNo itemNo, ShowSeqNo showSeqNo, ItemDesc itemDesc, ObjectName objectName, ObjectGroup objectGroup,
DBFieldName dbFieldName, SequenceNoflag sequenceNoFlag, SequenceBits sequenceBits, [Interval] intervalValue, ReportID labelNo
DBFieldName dbFieldName, SequenceNoflag sequenceNoFlag, SequenceBits sequenceBits, [Interval] intervalValue,
ReportID labelNo
FROM ReportContentItem
<where>
AND ReportID = #{labelNo}
@ -2054,15 +2073,25 @@
<insert id="copyLabelAllContentsWithOther" parameterType="LabelSettingData">
INSERT INTO ReportContentItem(ReportID, ItemNo, ShowSeqNo, ItemDesc, ObjectName, ObjectGroup,
DBFieldName, SequenceNoflag, SequenceBits, [Interval])
SELECT #{labelNo}, ItemNo, ShowSeqNo, ItemDesc, ObjectName, ObjectGroup,
DBFieldName, SequenceNoflag, SequenceBits, [Interval]
FROM ReportContentItem WHERE ReportID = #{newLabelNo}
SELECT #{labelNo},
ItemNo,
ShowSeqNo,
ItemDesc,
ObjectName,
ObjectGroup,
DBFieldName,
SequenceNoflag,
SequenceBits,
[Interval]
FROM ReportContentItem
WHERE ReportID = #{newLabelNo}
</insert>
<!--获取要用的标签内容-->
<select id="getUsedLabelContent" parameterType="LabelContentData" resultType="LabelContentData">
SELECT ItemNo itemNo, ShowSeqNo showSeqNo, ItemDesc itemDesc, ObjectName objectName, ObjectGroup objectGroup,
DBFieldName dbFieldName, SequenceNoflag sequenceNoFlag, SequenceBits sequenceBits, [Interval] intervalValue, ReportID labelNo
DBFieldName dbFieldName, SequenceNoflag sequenceNoFlag, SequenceBits sequenceBits, [Interval] intervalValue,
ReportID labelNo
FROM ReportContentItem
<where>
AND ReportID = #{labelNo} AND ItemNo != #{itemNo}
@ -2121,9 +2150,20 @@
<insert id="saveCalendarExceptionShift">
INSERT INTO Calendar_Exception_Shift(Site, CalendarID, ShiftNo, ScheduleDate, ShiftDesc, StartExactTime, EndExactTime, StartTime, EndTime)
SELECT site,#{calendarId},ShiftNo,#{scheduledate} , ShiftDesc, StartExactTime, EndExactTime, StartTime, EndTime FROM Calendar_DateType_Shift
WHERE DateType = #{datetype} AND site = #{site}
INSERT INTO Calendar_Exception_Shift(Site, CalendarID, ShiftNo, ScheduleDate, ShiftDesc, StartExactTime,
EndExactTime, StartTime, EndTime)
SELECT site,
#{calendarId},
ShiftNo,
#{scheduledate},
ShiftDesc,
StartExactTime,
EndExactTime,
StartTime,
EndTime
FROM Calendar_DateType_Shift
WHERE DateType = #{datetype}
AND site = #{site}
</insert>
<delete id="deleteCalendarExceptionShift">

Loading…
Cancel
Save