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. 138
      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 scheduledDate;//排产的时间 LR 2022-03-21
private String isIncluding; //是否包含 sxm 2023-03-07
} }

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

@ -9,15 +9,17 @@
<if test="site != null and site != ''"> <if test="site != null and site != ''">
AND site = #{site} AND site = #{site}
</if> </if>
<if test="calendarId != null and calendarId != ''"> <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>
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND status = #{status} AND status = #{status}
</if> </if>
<if test="calendarDesc != null and calendarDesc != ''">
AND CalendarDesc LIKE #{calendarDesc}
</if>
</where> </where>
</select> </select>
@ -421,7 +423,8 @@
T.CostTypeDesc, T.CostTypeDesc,
T.Active, T.Active,
T.BatchCreatedMethod, T.BatchCreatedMethod,
T.CheckPercentage,T.InspectFlag
T.CheckPercentage,
T.InspectFlag
from PartFamily as T from PartFamily as T
where T.Site in (Select Site from AccessSite where upper(UserID) = #{user}) where T.Site in (Select Site from AccessSite where upper(UserID) = #{user})
@ -435,9 +438,11 @@
T.CostTypeDesc, T.CostTypeDesc,
T.Active, T.Active,
T.BatchCreatedMethod, T.BatchCreatedMethod,
T.CheckPercentage,T.InspectFlag
T.CheckPercentage,
T.InspectFlag
from PartFamily as T from PartFamily as T
where T.Site = #{site} and T.FamilyID = #{familyID}
where T.Site = #{site}
and T.FamilyID = #{familyID}
</select> </select>
<select id="checkAccessSite" resultType="com.gaotao.modules.base.entity.AccessSiteData"> <select id="checkAccessSite" resultType="com.gaotao.modules.base.entity.AccessSiteData">
Select UserID, Site Select UserID, Site
@ -452,15 +457,16 @@
and Site = #{site} and Site = #{site}
</select> </select>
<insert id="savePartFamily" parameterType="com.gaotao.modules.base.entity.PartFamilyData"> <insert id="savePartFamily" parameterType="com.gaotao.modules.base.entity.PartFamilyData">
INSERT INTO PartFamily (FamilyID, Site, FamilyName, Active, CheckPercentage,InspectFlag)
values (#{familyID}, #{site}, #{familyName}, #{active}, #{checkPercentage},#{inspectFlag})
INSERT INTO PartFamily (FamilyID, Site, FamilyName, Active, CheckPercentage, InspectFlag)
values (#{familyID}, #{site}, #{familyName}, #{active}, #{checkPercentage}, #{inspectFlag})
</insert> </insert>
<update id="editPartFamily" parameterType="com.gaotao.modules.base.entity.PartFamilyData"> <update id="editPartFamily" parameterType="com.gaotao.modules.base.entity.PartFamilyData">
UPDATE PartFamily UPDATE PartFamily
SET Site=#{site}, SET Site=#{site},
FamilyName=#{familyName}, FamilyName=#{familyName},
Active=#{active}, Active=#{active},
CheckPercentage=#{checkPercentage},InspectFlag=#{inspectFlag}
CheckPercentage=#{checkPercentage},
InspectFlag=#{inspectFlag}
where FamilyID = #{familyID} where FamilyID = #{familyID}
and Site = #{site} and Site = #{site}
</update> </update>
@ -986,9 +992,9 @@
Remark=#{remark} Remark=#{remark}
</set> </set>
WHERE partNo = #{partNo} WHERE partNo = #{partNo}
and site = #{site}
and revNo = #{revNo}
and ItemNo = #{itemNo}
and site = #{site}
and revNo = #{revNo}
and ItemNo = #{itemNo}
</update> </update>
<delete id="deleteRoutingDetail" parameterType="com.gaotao.modules.base.entity.RoutingDetailData"> <delete id="deleteRoutingDetail" parameterType="com.gaotao.modules.base.entity.RoutingDetailData">
@ -1107,7 +1113,7 @@
update RoutingTool update RoutingTool
SET ToolQty=#{toolQty}, SET ToolQty=#{toolQty},
Remark=#{remark}, Remark=#{remark},
ToolID = #{newToolId}
ToolID = #{newToolId}
WHERE Site = #{site} WHERE Site = #{site}
and PartNo = #{partNo} and PartNo = #{partNo}
and ToolID = #{toolID} and ToolID = #{toolID}
@ -1786,21 +1792,22 @@
SELECT ReportID labelNo, ReportFamily labelType, Reportfile labelName, ReportType labelClass, Remark remark SELECT ReportID labelNo, ReportFamily labelType, Reportfile labelName, ReportType labelClass, Remark remark
FROM ReportFileList FROM ReportFileList
<where> <where>
AND ReportID = #{labelNo}
AND ReportID = #{labelNo}
</where> </where>
</select> </select>
<!--插入标签自定义的数据--> <!--插入标签自定义的数据-->
<insert id="insertLabelSetting" parameterType="LabelSettingData"> <insert id="insertLabelSetting" parameterType="LabelSettingData">
INSERT INTO ReportFileList(ReportID, ReportFamily, Reportfile, ReportType, Remark) INSERT INTO ReportFileList(ReportID, ReportFamily, Reportfile, ReportType, Remark)
VALUES(#{labelNo}, #{labelType}, #{labelName}, #{labelClass}, #{remark})
VALUES (#{labelNo}, #{labelType}, #{labelName}, #{labelClass}, #{remark})
</insert> </insert>
<!--修改标签自定义的信息--> <!--修改标签自定义的信息-->
<update id="updateLabelSetting" parameterType="LabelSettingData"> <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> <where>
AND ReportID = #{labelNo}
AND ReportID = #{labelNo}
</where> </where>
</update> </update>
@ -1813,8 +1820,10 @@
</delete> </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 rfd.SubReportFlag subLabelFlag, rfd.ParentReportID parentLabelNo FROM ReportFileDefDefault rfd
LEFT JOIN ReportFileList rfl ON rfl.ReportID = rfd.ReportID LEFT JOIN ReportFileList rfl ON rfl.ReportID = rfd.ReportID
<where> <where>
@ -1835,12 +1844,13 @@
<!--插入默认标签配置信息--> <!--插入默认标签配置信息-->
<insert id="insertDefaultLabelSetting" parameterType="DefaultLabelSettingData"> <insert id="insertDefaultLabelSetting" parameterType="DefaultLabelSettingData">
INSERT INTO ReportFileDefDefault(FamilyID, ReportFamily, ReportID, Remark, SubReportFlag, ParentReportID) INSERT INTO ReportFileDefDefault(FamilyID, ReportFamily, ReportID, Remark, SubReportFlag, ParentReportID)
VALUES('*', #{labelType}, #{labelNo}, #{remark}, #{subLabelFlag}, #{parentLabelNo})
VALUES ('*', #{labelType}, #{labelNo}, #{remark}, #{subLabelFlag}, #{parentLabelNo})
</insert> </insert>
<!--修改默认标签配置信息--> <!--修改默认标签配置信息-->
<update id="updateDefaultLabelSetting" parameterType="DefaultLabelSettingData"> <update id="updateDefaultLabelSetting" parameterType="DefaultLabelSettingData">
UPDATE ReportFileDefDefault SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark = #{remark}
UPDATE ReportFileDefDefault SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark =
#{remark}
<where> <where>
AND ReportID = #{labelNo} AND ReportFamily = #{labelType} AND FamilyID = '*' AND ReportID = #{labelNo} AND ReportFamily = #{labelType} AND FamilyID = '*'
</where> </where>
@ -1855,9 +1865,12 @@
</delete> </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 FROM ReportFileDefCustomer rfc
LEFT JOIN ReportFileList rfl ON rfl.ReportID = rfc.ReportID AND rfl.ReportFamily = rfc.ReportFamily LEFT JOIN ReportFileList rfl ON rfl.ReportID = rfc.ReportID AND rfl.ReportFamily = rfc.ReportFamily
<where> <where>
@ -1880,13 +1893,15 @@
<!--插入客制化标签配置信息--> <!--插入客制化标签配置信息-->
<insert id="insertCustomerLabelSetting" parameterType="CustomerLabelSettingData"> <insert id="insertCustomerLabelSetting" parameterType="CustomerLabelSettingData">
INSERT INTO ReportFileDefCustomer(Site, CustomerID, FamilyID, ReportFamily, ReportID, Remark, SubReportFlag, ParentReportID)
VALUES(#{site}, #{customerId}, '*', #{labelType}, #{labelNo}, #{remark}, #{subLabelFlag}, #{parentLabelNo})
INSERT INTO ReportFileDefCustomer(Site, CustomerID, FamilyID, ReportFamily, ReportID, Remark, SubReportFlag,
ParentReportID)
VALUES (#{site}, #{customerId}, '*', #{labelType}, #{labelNo}, #{remark}, #{subLabelFlag}, #{parentLabelNo})
</insert> </insert>
<!--修改客制化标签配置信息--> <!--修改客制化标签配置信息-->
<update id="updateCustomerLabelSetting" parameterType="CustomerLabelSettingData"> <update id="updateCustomerLabelSetting" parameterType="CustomerLabelSettingData">
UPDATE ReportFileDefCustomer SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark = #{remark}
UPDATE ReportFileDefCustomer SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark =
#{remark}
<where> <where>
AND ReportID = #{labelNo} AND CustomerID = #{customerId} AND FamilyID = '*' AND ReportID = #{labelNo} AND CustomerID = #{customerId} AND FamilyID = '*'
</where> </where>
@ -1902,7 +1917,8 @@
<!--查询标签的客制化配置信息--> <!--查询标签的客制化配置信息-->
<select id="getUserLabelPrinters" parameterType="UserLabelPrinterData" resultType="UserLabelPrinterData"> <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 rfp.NewPrinterName printerName, rfp.IPAddress ipAddress
FROM ReportFileList_UserPrinter rfp FROM ReportFileList_UserPrinter rfp
LEFT JOIN sys_user ssu ON ssu.username = rfp.UserID LEFT JOIN sys_user ssu ON ssu.username = rfp.UserID
@ -1940,7 +1956,7 @@
<!--插入用户的标签打印机参数--> <!--插入用户的标签打印机参数-->
<insert id="insertUserLabelPrinter" parameterType="UserLabelPrinterData"> <insert id="insertUserLabelPrinter" parameterType="UserLabelPrinterData">
INSERT INTO ReportFileList_UserPrinter(ReportID, UserID, PrinterName, IPAddress, NewPrinterName) INSERT INTO ReportFileList_UserPrinter(ReportID, UserID, PrinterName, IPAddress, NewPrinterName)
VALUES(#{labelNo}, #{userId}, '', #{ipAddress}, #{printerName})
VALUES (#{labelNo}, #{userId}, '', #{ipAddress}, #{printerName})
</insert> </insert>
@ -1962,7 +1978,8 @@
<!--获取标签打印参数配置信息--> <!--获取标签打印参数配置信息-->
<select id="getLabelParameterList" parameterType="LabelParameterData" resultType="LabelParameterData"> <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 ValueType_DB valueTypeDb, ValueType valueType, OptionValue optionValue, DefaultValue defaultValue
FROM ReportParameters FROM ReportParameters
<where> <where>
@ -1975,13 +1992,14 @@
<insert id="insertLabelPrintParameter" parameterType="LabelParameterData"> <insert id="insertLabelPrintParameter" parameterType="LabelParameterData">
INSERT INTO ReportParameters(ReportID, ItemNo, ShowSeqNo, ParameterDesc, ParameterName, ValueType_DB, INSERT INTO ReportParameters(ReportID, ItemNo, ShowSeqNo, ParameterDesc, ParameterName, ValueType_DB,
ValueType, OptionValue, DefaultValue) ValueType, OptionValue, DefaultValue)
VALUES(#{labelNo}, #{itemNo}, #{showSeqNo}, #{parameterDesc}, #{parameterName}, #{valueTypeDb},
#{valueType}, #{optionValue}, #{defaultValue})
VALUES (#{labelNo}, #{itemNo}, #{showSeqNo}, #{parameterDesc}, #{parameterName}, #{valueTypeDb},
#{valueType}, #{optionValue}, #{defaultValue})
</insert> </insert>
<!--修改标签打印参数的信息--> <!--修改标签打印参数的信息-->
<update id="updateLabelPrintParameter" parameterType="LabelParameterData"> <update id="updateLabelPrintParameter" parameterType="LabelParameterData">
UPDATE ReportParameters SET OptionValue = #{optionValue}, DefaultValue = #{defaultValue}, ShowSeqNo = #{showSeqNo}
UPDATE ReportParameters SET OptionValue = #{optionValue}, DefaultValue = #{defaultValue}, ShowSeqNo =
#{showSeqNo}
<where> <where>
AND ReportID = #{labelNo} AND ItemNo = #{itemNo} AND ReportID = #{labelNo} AND ItemNo = #{itemNo}
</where> </where>
@ -1998,7 +2016,8 @@
<!--查询标签内容定义列表--> <!--查询标签内容定义列表-->
<select id="getLabelContentList" parameterType="LabelContentData" resultType="LabelContentData"> <select id="getLabelContentList" parameterType="LabelContentData" resultType="LabelContentData">
SELECT ItemNo itemNo, ShowSeqNo showSeqNo, ItemDesc itemDesc, ObjectName objectName, ObjectGroup objectGroup, 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 FROM ReportContentItem
<where> <where>
AND ReportID = #{labelNo} AND ReportID = #{labelNo}
@ -2010,8 +2029,8 @@
<insert id="insertLabelContent" parameterType="LabelContentData"> <insert id="insertLabelContent" parameterType="LabelContentData">
INSERT INTO ReportContentItem(ReportID, ItemNo, ShowSeqNo, ItemDesc, ObjectName, ObjectGroup, INSERT INTO ReportContentItem(ReportID, ItemNo, ShowSeqNo, ItemDesc, ObjectName, ObjectGroup,
DBFieldName, SequenceNoflag, SequenceBits, [Interval]) DBFieldName, SequenceNoflag, SequenceBits, [Interval])
VALUES(#{labelNo}, #{itemNo}, #{showSeqNo}, #{itemDesc}, #{objectName}, #{objectGroup},
#{dbFieldName}, #{sequenceNoFlag}, #{sequenceBits}, #{intervalValue})
VALUES (#{labelNo}, #{itemNo}, #{showSeqNo}, #{itemDesc}, #{objectName}, #{objectGroup},
#{dbFieldName}, #{sequenceNoFlag}, #{sequenceBits}, #{intervalValue})
</insert> </insert>
<!--修改标签的打印参数--> <!--修改标签的打印参数-->
@ -2054,15 +2073,25 @@
<insert id="copyLabelAllContentsWithOther" parameterType="LabelSettingData"> <insert id="copyLabelAllContentsWithOther" parameterType="LabelSettingData">
INSERT INTO ReportContentItem(ReportID, ItemNo, ShowSeqNo, ItemDesc, ObjectName, ObjectGroup, INSERT INTO ReportContentItem(ReportID, ItemNo, ShowSeqNo, ItemDesc, ObjectName, ObjectGroup,
DBFieldName, SequenceNoflag, SequenceBits, [Interval]) 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> </insert>
<!--获取要用的标签内容--> <!--获取要用的标签内容-->
<select id="getUsedLabelContent" parameterType="LabelContentData" resultType="LabelContentData"> <select id="getUsedLabelContent" parameterType="LabelContentData" resultType="LabelContentData">
SELECT ItemNo itemNo, ShowSeqNo showSeqNo, ItemDesc itemDesc, ObjectName objectName, ObjectGroup objectGroup, 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 FROM ReportContentItem
<where> <where>
AND ReportID = #{labelNo} AND ItemNo != #{itemNo} AND ReportID = #{labelNo} AND ItemNo != #{itemNo}
@ -2100,7 +2129,7 @@
<!--插入标签流水号信息--> <!--插入标签流水号信息-->
<insert id="insertLabelSerialInfo" parameterType="LabelContentSerialInfoData"> <insert id="insertLabelSerialInfo" parameterType="LabelContentSerialInfoData">
INSERT INTO ReportFile_SeqInfo(ReportID, ItemNo, KeyInfo, LastSeqNo) INSERT INTO ReportFile_SeqInfo(ReportID, ItemNo, KeyInfo, LastSeqNo)
VALUES(#{labelNo}, #{itemNo}, #{keyInfo}, #{lastSeqNo})
VALUES (#{labelNo}, #{itemNo}, #{keyInfo}, #{lastSeqNo})
</insert> </insert>
<!--修改标签流水号信息--> <!--修改标签流水号信息-->
@ -2121,15 +2150,26 @@
<insert id="saveCalendarExceptionShift"> <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> </insert>
<delete id="deleteCalendarExceptionShift"> <delete id="deleteCalendarExceptionShift">
DELETE Calendar_Exception_Shift
WHERE site = #{site}
AND CalendarID = #{calendarId}
AND scheduledate = #{scheduledate}
DELETE Calendar_Exception_Shift
WHERE site = #{site}
AND CalendarID = #{calendarId}
AND scheduledate = #{scheduledate}
</delete> </delete>
</mapper> </mapper>
Loading…
Cancel
Save