From 34a4da1c76088a474278f58759d63783a57757a0 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期五, 05 七月 2024 09:23:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml | 5
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml | 28 ++--
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 229 ++++++++++++++++++++++++++-----------
performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml | 22 ++-
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml | 36 +++--
5 files changed, 209 insertions(+), 111 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
index 1e188a4..0570e78 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -39,6 +39,8 @@
import com.yuanchu.mom.vo.SampleVo;
import org.apache.commons.io.IOUtils;
import org.apache.poi.xwpf.usermodel.*;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -46,6 +48,7 @@
import javax.annotation.Resource;
import java.io.*;
+import java.math.BigInteger;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
@@ -621,30 +624,6 @@
Set<String> delSet = new HashSet<>();
List<ExcelDto> excelDtos = JSON.parseArray(tem, ExcelDto.class);
List<ExcelDto> mcList = new ArrayList<>();
- /* int aaaa = excelDtos.get(excelDtos.size() - 1).getR();//杩欓噷鏄ā鐗堥噷闈㈢殑鎵�鏈夋娴嬮」鐨勯暱搴�,鍏堜互15涓」鐩垎椤�
- int bbbb = 17;
- int cccc = 0;
- for (int p = 0; p < aaaa; p++) {
- if (p % bbbb == 0) {
- for (int y = 0; y < excelDtos.size(); y++) {
- if (y == 0 || y == 1) {
- if (excelDtos.get(y).getV().getMc() != null && excelDtos.get(y).getV().getMc().getCs() != null && excelDtos.get(y).getV().getMc().getRs() != null) {
- mcList.add(excelDtos.get(y));
- }
- } else {
- try {
- excelDtos.get(y + cccc - 2);
- } catch (Exception e) {
- continue;
- }
- if (excelDtos.get(y + cccc - 2).getV().getMc() != null && excelDtos.get(y + cccc - 2).getV().getMc().getCs() != null && excelDtos.get(y + cccc - 2).getV().getMc().getRs() != null) {
- mcList.add(excelDtos.get(y + cccc - 2));
- }
- }
- }
- cccc += 17;
- }
- }*/
excelDtos.forEach(b -> {
if (b.getV().getMc() != null && b.getV().getMc().getCs() != null && b.getV().getMc().getRs() != null) {
mcList.add(b);
@@ -778,7 +757,11 @@
} else if (value.equals("璇曢獙鏂规硶")) {
textRenderData.setText(p.getMethodS());
} else if (value.equals("妫�楠岄」")) {
- textRenderData.setText(p.getInspectionItem() + "&" + p.getInspectionItemEn());
+ if (ObjectUtils.isEmpty(p.getInspectionItemEn())) {
+ textRenderData.setText(p.getInspectionItem());
+ } else {
+ textRenderData.setText(p.getInspectionItem() + "&" + p.getInspectionItemEn());
+ }
} else if (value.equals("妫�楠屽瓙椤�")) {
if (ObjectUtils.isEmpty(p.getInspectionItemSubclassEn())) {
textRenderData.setText(p.getInspectionItemSubclass());
@@ -823,7 +806,6 @@
textRenderData.setText(textRenderData.getText() + "鈭�" + jo1.get("mc"));
}
Style style = new Style();
-// style.setFontFamily(v.get("ff") == null ? "瀹嬩綋" : v.get("ff") + "");
style.setFontFamily("瀹嬩綋");
if (!((v.get("fc") + "").indexOf("rgb") > -1)) {
style.setColor(v.get("fc") == null ? "000000" : (v.get("fc") + "").replace("#", ""));
@@ -838,35 +820,74 @@
if (rowRenderData.getCells().size() != 0) {
rows.add(rowRenderData);
}
+ List<TableRenderData> tables1 = new ArrayList<>();
TableRenderData tableRenderData = new TableRenderData();
- tableRenderData.setRows(rows);
- int countSize = tableRenderData.getRows().get(0).getCells().size();
- for (RowRenderData row : tableRenderData.getRows()) {
- /*for (CellRenderData cell : row.getCells()) {
- System.out.print(cell.getParagraphs().get(0).getContents());
- }
- System.out.println("");*/
- if (row.getCells().size() != countSize) {
- throw new ErrorException("姣忚鍗曞厓鏍间笉鐩哥瓑");
- }
+ tableRenderData.setRows(new ArrayList<>());
+
+ double totalHeight = 0.0; // 鐢ㄤ簬璺熻釜褰撳墠琛ㄦ牸鐨勬�昏楂�
+ double heightThreshold = 8000.0; // 闃堝�硷紝渚嬪40cm*28px*15twips
+ List<RowRenderData> firstTwoRows = new ArrayList<>(); // 淇濆瓨鍓嶄袱琛屼互渚垮鍒跺埌鏂拌〃鏍�
+
+
+ // 淇濆瓨鍓嶄袱琛屼互渚垮鍒跺埌鏂拌〃鏍�
+ if (rows.size() >= 2) {
+ firstTwoRows.add(rows.get(0));
+ firstTwoRows.add(rows.get(1));
}
- TableStyle tableStyle = new TableStyle();
- tableStyle.setColWidths(new int[]{650, 1600, 2000, 750, 2800, 1100, 1100});
- tableStyle.setWidth("10000");
- tableStyle.setAlign(TableRowAlign.CENTER);
- BorderStyle borderStyle = new BorderStyle();
- borderStyle.setColor("000000");
- borderStyle.setType(XWPFTable.XWPFBorderType.THICK);
- borderStyle.setSize(14);
- tableStyle.setLeftBorder(borderStyle);
- tableStyle.setTopBorder(borderStyle);
- tableStyle.setRightBorder(borderStyle);
- tableStyle.setBottomBorder(borderStyle);
- tableRenderData.setTableStyle(tableStyle);
- Map<String, Object> table = new HashMap<>();
- table.put("table", tableRenderData);
- table.put("report", insReport);
- tables.add(table);
+
+ for (RowRenderData row : rows) {
+ double rowHeight = row.getRowStyle().getHeight(); // 鑾峰彇褰撳墠琛岀殑琛岄珮
+ totalHeight += rowHeight; // 鏇存柊鎬昏楂�
+
+ if (totalHeight >= heightThreshold) {
+ // 鍒涘缓鏂拌〃鏍煎苟澶嶅埗鍓嶄袱琛�
+ TableRenderData newTableRenderData = new TableRenderData();
+ newTableRenderData.setRows(new ArrayList<>(firstTwoRows));
+
+ TableStyle tableStyle = new TableStyle();
+ tableStyle.setColWidths(new int[]{650, 1600, 2000, 750, 2800, 1100, 1100});
+ tableStyle.setWidth("10000");
+ tableStyle.setAlign(TableRowAlign.CENTER);
+ BorderStyle borderStyle = new BorderStyle();
+ borderStyle.setColor("000000");
+ borderStyle.setType(XWPFTable.XWPFBorderType.THICK);
+ borderStyle.setSize(14);
+ tableStyle.setLeftBorder(borderStyle);
+ tableStyle.setTopBorder(borderStyle);
+ tableStyle.setRightBorder(borderStyle);
+ tableStyle.setBottomBorder(borderStyle);
+ tableRenderData.setTableStyle(tableStyle);
+ newTableRenderData.setTableStyle(tableStyle);
+
+ tables1.add(tableRenderData);
+ tableRenderData = newTableRenderData;
+ totalHeight = rowHeight;
+ }
+ tableRenderData.getRows().add(row);
+ }
+ if (!tableRenderData.getRows().isEmpty()) {
+ TableStyle tableStyle = new TableStyle();
+ tableStyle.setColWidths(new int[]{650, 1600, 2000, 750, 2800, 1100, 1100});
+ tableStyle.setWidth("10000");
+ tableStyle.setAlign(TableRowAlign.CENTER);
+ BorderStyle borderStyle = new BorderStyle();
+ borderStyle.setColor("000000");
+ borderStyle.setType(XWPFTable.XWPFBorderType.THICK);
+ borderStyle.setSize(14);
+ tableStyle.setLeftBorder(borderStyle);
+ tableStyle.setTopBorder(borderStyle);
+ tableStyle.setRightBorder(borderStyle);
+ tableStyle.setBottomBorder(borderStyle);
+ tableRenderData.setTableStyle(tableStyle);
+ tables1.add(tableRenderData);
+ }
+
+ tables1.forEach(table -> {
+ Map<String, Object> tableMap = new HashMap<>();
+ tableMap.put("table", table);
+ tableMap.put("report", insReport);
+ tables.add(tableMap);
+ });
});
});
String url;
@@ -1219,19 +1240,28 @@
} catch (IOException e) {
throw new RuntimeException(e);
}
- //澶勭悊鍚堝苟鍗曞厓鏍肩殑闂
+ // 澶勭悊鍚堝苟鍗曞厓鏍肩殑闂
String path = wordUrl + "/" + insReport.getCode().replace("/", "") + ".docx";
try {
FileInputStream stream = new FileInputStream(path);
XWPFDocument document = new XWPFDocument(stream);
List<XWPFTable> xwpfTables = document.getTables();
+
for (int i = 1; i < xwpfTables.size() - (deviceList == null ? 1 : 2); i++) {
Set<String> set1 = new HashSet<>();
Map<String, Map<String, Integer>> maps = new HashMap<>();
- for (int j = 0; j < xwpfTables.get(i).getRows().size(); j++) {
- for (int k = 0; k < xwpfTables.get(i).getRows().get(j).getTableCells().size(); k++) {
- if (xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().indexOf("鈭�") > -1) {
- String[] split = xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().split("鈭�");
+
+ XWPFTable table = xwpfTables.get(i);
+ for (int j = 0; j < table.getRows().size(); j++) {
+ XWPFTableRow row = table.getRow(j);
+ if (row == null) continue;
+
+ for (int k = 0; k < row.getTableCells().size(); k++) {
+ XWPFTableCell cell = row.getCell(k);
+ if (cell == null || cell.getText() == null) continue;
+
+ if (cell.getText().indexOf("鈭�") > -1) {
+ String[] split = cell.getText().split("鈭�");
if (set1.add(split[1])) {
Map<String, Integer> map = new HashMap<>();
map.put("sr", j);
@@ -1247,30 +1277,59 @@
map1.put("er", map1.get("er") + 1);
}
}
- String str = xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().split("鈭�")[0];
- xwpfTables.get(i).getRows().get(j).getTableCells().get(k).removeParagraph(0);
- xwpfTables.get(i).getRows().get(j).getTableCells().get(k).setText(str);
- xwpfTables.get(i).getRows().get(j).getTableCells().get(k).setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER);
- xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getParagraphArray(0).setAlignment(ParagraphAlignment.CENTER);
+
+ String str = split[0];
+ cell.removeParagraph(0);
+ cell.setText(str);
+ cell.setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER);
+
+ if (cell.getParagraphArray(0) != null) {
+ cell.getParagraphArray(0).setAlignment(ParagraphAlignment.CENTER);
+ }
}
}
}
- List<String> list = new ArrayList<>();
- for (String s : maps.keySet()) {
- list.add(s);
- }
+
+ List<String> list = new ArrayList<>(maps.keySet());
for (int a = list.size() - 1; a >= 0; a--) {
Map<String, Integer> v = maps.get(list.get(a));
- for (int j = 0; j < v.get("er") - v.get("sr") + 1; j++) {
+ /* for (int j = 0; j < v.get("er") - v.get("sr") + 1; j++) {
if (v.get("ec") > v.get("sc")) {
- TableTools.mergeCellsHorizonal(xwpfTables.get(i), v.get("sr") + j, v.get("sc"), v.get("ec"));
+ TableTools.mergeCellsHorizonal(table, v.get("sr") + j, v.get("sc"), v.get("ec"));
}
}
if (v.get("er") > v.get("sr")) {
- TableTools.mergeCellsVertically(xwpfTables.get(i), v.get("sc"), v.get("sr"), v.get("er"));
+ TableTools.mergeCellsVertically(table, v.get("sc"), v.get("sr"), v.get("er"));
+ }*/
+ for (int j = 0; j < v.get("er") - v.get("sr") + 1; j++) {
+ if (v.get("ec") > v.get("sc")) {
+ XWPFTableRow row = table.getRow(v.get("sr") + j);
+ if (row != null) {
+ for (int col = v.get("sc"); col <= v.get("ec"); col++) {
+ XWPFTableCell cell = row.getCell(col);
+ if (cell == null) {
+ row.createCell(); // 鍒涘缓鏂扮殑鍗曞厓鏍间互闃茬┖鎸囬拡寮傚父
+ }
+ }
+ TableTools.mergeCellsHorizonal(table, v.get("sr") + j, v.get("sc"), v.get("ec"));
+ }
+ }
+ }
+ if (v.get("er") > v.get("sr")) {
+ for (int rowIdx = v.get("sr"); rowIdx <= v.get("er"); rowIdx++) {
+ XWPFTableRow row = table.getRow(rowIdx);
+ if (row != null) {
+ XWPFTableCell cell = row.getCell(v.get("sc"));
+ if (cell == null) {
+ row.createCell(); // 鍒涘缓鏂扮殑鍗曞厓鏍间互闃茬┖鎸囬拡寮傚父
+ }
+ }
+ }
+ TableTools.mergeCellsVertically(table, v.get("sc"), v.get("sr"), v.get("er"));
}
}
}
+
FileOutputStream fileOutputStream = new FileOutputStream(path);
document.write(fileOutputStream);
fileOutputStream.close();
@@ -1300,10 +1359,38 @@
}
xwpfParagraph.setAlignment(ParagraphAlignment.CENTER);
}
+ /*if (k == 2 || k == 3 || k == 4) {
+ if (k == 2 && xwpfTables1.get(i).getRows().get(j).getTableCells().get(k-1).getText().contains("@@")) {
+ XWPFTableCell cell = xwpfTables1.get(i).getRow(j).getCell(k);
+ CTTblWidth tblWidth = cell.getCTTc().addNewTcPr().addNewTcW();
+ tblWidth.setType(STTblWidth.DXA);
+ tblWidth.setW(BigInteger.valueOf((int) (4.79 * 1440 / 2.54)));
+ }
+ if (k == 3 && xwpfTables1.get(i).getRows().get(j).getTableCells().get(k - 2).getText().contains("@@")) {
+ XWPFTableCell cell = xwpfTables1.get(i).getRow(j).getCell(k);
+ CTTblWidth tblWidth = cell.getCTTc().addNewTcPr().addNewTcW();
+ tblWidth.setType(STTblWidth.DXA);
+ tblWidth.setW(BigInteger.valueOf((int) (1.49 * 1440 / 2.54)));
+ }
+ if (k == 4 && xwpfTables1.get(i).getRows().get(j).getTableCells().get(k - 3).getText().contains("@@")) {
+ XWPFTableCell cell = xwpfTables1.get(i).getRow(j).getCell(k);
+ CTTblWidth tblWidth = cell.getCTTc().addNewTcPr().addNewTcW();
+ tblWidth.setType(STTblWidth.DXA);
+ tblWidth.setW(BigInteger.valueOf((int) (3.51 * 1440 / 2.54)));
+ }
+ }
+ if (xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).getText().contains("@@")) {
+ String text = xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).getText();
+ text = text.replace("@@","");
+ xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).removeParagraph(0);
+ XWPFParagraph xwpfParagraph = xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).addParagraph();
+ XWPFRun run = xwpfParagraph.createRun();
+ run.setText(text);
+ xwpfParagraph.setAlignment(ParagraphAlignment.CENTER);
+ }*/
}
}
}
- //澶勭悊妫�楠岀粨鏋滆法椤电殑闂
FileOutputStream fileOutputStream1 = new FileOutputStream(path);
document1.write(fileOutputStream1);
fileOutputStream1.close();
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml
index 2fced33..a57a4c3 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml
+++ b/performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml
@@ -49,12 +49,13 @@
select ach.*,name
FROM auxiliary_correction_hours ach
left join user on user.id=ach.name_user
- <if test="ids !=null and ids != ''">
+ WHERE name_user in(#{ids})
+ <!--<if test="ids !=null and ids != ''">
WHERE name_user in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>
+ </if>-->
) A
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
${ew.customSqlSegment}
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml
index 4b1b9e4..1e9a012 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml
+++ b/performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml
@@ -12,18 +12,19 @@
case
when reviewer_nonproductive_time is null then nonproductive_time
else reviewer_nonproductive_time end as manHour,
- date_time as month
+ date_time as month
from auxiliary_working_hours_day awhd
left join user on user.id = awhd.name_user
left join department_lims dl on depart_lims_id = dl.id
where date_time LIKE CONCAT('%', #{month}, '%')
and awhd.state='宸叉壒鍑�'
- <if test="ids !=null and ids != ''">
- and name_user in
- <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
- #{val}
- </foreach>
- </if>
+ and name_user in(#{ids})
+ <!-- <if test="ids !=null and ids != ''">
+ and name_user in
+ <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
+ #{val}
+ </foreach>
+ </if>-->
order by month
) A
group by A.name, A.month) C
@@ -33,18 +34,19 @@
B.manHours
from (
select user.name,
- date_time as month,
+ date_time as month,
sum(output_work_time) as manHours
from auxiliary_output_working_hours aowh
left join user on user.id = aowh.`check`
left join department_lims dl on depart_lims_id = dl.id
where date_time LIKE CONCAT('%', #{month}, '%')
- <if test="ids !=null and ids != ''">
+ and `check` in(#{ids})
+ <!--<if test="ids !=null and ids != ''">
and `check` in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>
+ </if>-->
group by user.name, month
order by user.name, month
) B
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
index 8210a83..228be28 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
+++ b/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
@@ -39,12 +39,13 @@
name
FROM auxiliary_output_working_hours aowh
left join user on user.id=aowh.`check`
- <if test="ids !=null and ids != ''">
+ WHERE `check` in(#{ids})
+ <!--<if test="ids !=null and ids != ''">
WHERE `check` in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>
+ </if>-->
) A
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
${ew.customSqlSegment}
@@ -54,12 +55,13 @@
select aowh.*,name
FROM auxiliary_output_working_hours aowh
left join user on user.id=aowh.`check`
- <if test="ids !=null and ids != ''">
- WHERE `check` in
- <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
- #{val}
- </foreach>
- </if>
+ WHERE `check` in(#{ids})
+ <!-- <if test="ids !=null and ids != ''">
+ WHERE `check` in
+ <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
+ #{val}
+ </foreach>
+ </if>-->
</select>
<select id="totalHours" resultType="java.util.Map">
select A.name,
@@ -73,24 +75,26 @@
left join user on user.id=aowh.`check`
left join department_lims dl on depart_lims_id=dl.id
where date_time LIKE CONCAT('%', #{month}, '%')
- <if test="ids !=null and ids != ''">
- and `check` in
- <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
+ and `check` in (#{ids})
+ <!--<if test="ids !=null and ids != ''">
+ and `check` in (#ids)
+ <foreach collection="ids" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>
- group by user.name,month
- order by month,user.name
+ </if>-->
+ group by user.name,date_time
+ order by user.name,date_time
)A
</select>
<select id="selectListByIds" resultType="com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours">
select * from auxiliary_output_working_hours
where 1=1
- <if test="ids !=null and ids != ''">
+ and `check` in(#{ids})
+ <!--<if test="ids !=null and ids != ''">
and `check` in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>
+ </if>-->
</select>
</mapper>
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
index 04cdf11..4a77ae2 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
+++ b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
@@ -31,12 +31,13 @@
select awhd.*,name
FROM auxiliary_working_hours_day awhd
left join user on name_user=user.id
- <if test="ids !=null and ids != ''">
+ WHERE name_user in(#{ids})
+ <!--<if test="ids !=null and ids != ''">
WHERE name_user in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>
+ </if>-->
) A
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
${ew.customSqlSegment}
@@ -46,22 +47,24 @@
select awhd.*,name
FROM auxiliary_working_hours_day awhd
left join user on name_user=user.id
- <if test="ids !=null and ids != ''">
+ WHERE name_user in(#{ids})
+ <!--<if test="ids !=null and ids != ''">
WHERE name_user in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>
+ </if>-->
</select>
<select id="selectListByIds" resultType="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay">
select * from auxiliary_working_hours_day
where 1=1
- <if test="ids !=null and ids != ''">
+ and name_user in(#{ids})
+ <!-- <if test="ids !=null and ids != ''">
and name_user in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>
+ </if>-->
</select>
<select id="totalHours" resultType="java.util.Map">
select A.name,
@@ -77,12 +80,13 @@
left join department_lims dl on depart_lims_id=dl.id
where date_time LIKE CONCAT('%', #{month}, '%')
and awhd.state='宸叉壒鍑�'
- <if test="ids !=null and ids != ''">
- and name_user in
- <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
- #{val}
- </foreach>
- </if>
+ and name_user in (#{ids})
+ <!-- <if test="ids !=null and ids != ''">
+ and name_user in
+ <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
+ #{val}
+ </foreach>
+ </if>-->
order by month,user.name
)A
group by A.name,A.month
--
Gitblit v1.9.3