Przeglądaj źródła

工艺工程参数页面 数据完善

hbx 2 dni temu
rodzic
commit
ed955e44e8

+ 0 - 8
src/main/java/com/jeesite/modules/mes/web/MesProductCmtController.java

@@ -8,8 +8,6 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.jeesite.common.lang.StringUtils;
-import com.jeesite.modules.mes.req.MesSearchDateReq;
-import com.jeesite.modules.mes.util.CommonUitl;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -55,18 +53,12 @@ public class MesProductCmtController extends BaseController {
 	@RequiresPermissions("mes:mesProductCmt:view")
 	@RequestMapping(value = {"list", ""})
 	public String list(MesProductCmt mesProductCmt, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductCmt.setCreateDate_gte(dateMap.getStartDate());
-		mesProductCmt.setCreateDate_lte(dateMap.getEndtDate());
 		model.addAttribute("mesProductCmt", mesProductCmt);
 		return "modules/mes/mesProductCmtList";
 	}
 	@RequiresPermissions("mes:mesProductCmt:view")
 	@RequestMapping(value = {"list2", ""})
 	public String list2(MesProductCmt mesProductCmt, Model model) {
-//		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-//		mesProductCmt.setCreateDate_gte(dateMap.getStartDate());
-//		mesProductCmt.setCreateDate_lte(dateMap.getEndtDate());
 		model.addAttribute("mesProductCmt", mesProductCmt);
 		return "modules/mes/mesProductCmtList2";
 	}

+ 0 - 11
src/main/java/com/jeesite/modules/mes/web/MesProductCncParamController.java

@@ -8,8 +8,6 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.jeesite.common.lang.StringUtils;
-import com.jeesite.modules.mes.req.MesSearchDateReq;
-import com.jeesite.modules.mes.util.CommonUitl;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -55,9 +53,6 @@ public class MesProductCncParamController extends BaseController {
 	@RequiresPermissions("mes:mesProductCncParam:view")
 	@RequestMapping(value = {"list", ""})
 	public String list(MesProductCncParam mesProductCncParam, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductCncParam.setCreateDate_gte(dateMap.getStartDate());
-		mesProductCncParam.setCreateDate_lte(dateMap.getEndtDate());
 		mesProductCncParam.setOprno("OP040");
 		model.addAttribute("mesProductCncParam", mesProductCncParam);
 		return "modules/mes/mesProductCncParamList";
@@ -65,9 +60,6 @@ public class MesProductCncParamController extends BaseController {
 	@RequiresPermissions("mes:mesProductCncParam:view")
 	@RequestMapping(value = {"list2", ""})
 	public String list2(MesProductCncParam mesProductCncParam, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductCncParam.setCreateDate_gte(dateMap.getStartDate());
-		mesProductCncParam.setCreateDate_lte(dateMap.getEndtDate());
 		mesProductCncParam.setOprno("OP150");
 		model.addAttribute("mesProductCncParam", mesProductCncParam);
 		return "modules/mes/mesProductCncParamList";
@@ -75,9 +67,6 @@ public class MesProductCncParamController extends BaseController {
 	@RequiresPermissions("mes:mesProductCncParam:view")
 	@RequestMapping(value = {"list3", ""})
 	public String list3(MesProductCncParam mesProductCncParam, Model model) {
-//		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-//		mesProductCncParam.setCreateDate_gte(dateMap.getStartDate());
-//		mesProductCncParam.setCreateDate_lte(dateMap.getEndtDate());
 		model.addAttribute("mesProductCncParam", mesProductCncParam);
 		return "modules/mes/mesProductCncParamList2";
 	}

+ 0 - 7
src/main/java/com/jeesite/modules/mes/web/MesProductProdController.java

@@ -9,7 +9,6 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.jeesite.common.lang.StringUtils;
 import com.jeesite.modules.mes.entity.MesProductFsw;
-import com.jeesite.modules.mes.req.MesSearchDateReq;
 import com.jeesite.modules.mes.util.CommonUitl;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -59,18 +58,12 @@ public class MesProductProdController extends BaseController {
 	@RequiresPermissions("mes:mesProductProd:view")
 	@RequestMapping(value = {"list", ""})
 	public String list(MesProductProd mesProductProd, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductProd.setDateTime_gte(dateMap.getStartDate());
-		mesProductProd.setDateTime_lte(dateMap.getEndtDate());
 		model.addAttribute("mesProductProd", mesProductProd);
 		return "modules/mes/mesProductProdList";
 	}
 	@RequiresPermissions("mes:mesProductProd:view")
 	@RequestMapping(value = {"list2", ""})
 	public String list2(MesProductProd mesProductProd, Model model) {
-//		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-//		mesProductProd.setDateTime_gte(dateMap.getStartDate());
-//		mesProductProd.setDateTime_lte(dateMap.getEndtDate());
 		model.addAttribute("mesProductProd", mesProductProd);
 		return "modules/mes/mesProductProdList2";
 	}

+ 0 - 14
src/main/java/com/jeesite/modules/mes/web/MesProductQmController.java

@@ -11,9 +11,7 @@ import com.alibaba.fastjson.JSON;
 import com.jeesite.common.lang.ObjectUtils;
 import com.jeesite.common.lang.StringUtils;
 import com.jeesite.modules.mes.entity.MesProductQmwy;
-import com.jeesite.modules.mes.req.MesSearchDateReq;
 import com.jeesite.modules.mes.resp.CommonResp;
-import com.jeesite.modules.mes.util.CommonUitl;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.tomcat.util.codec.binary.Base64;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -64,9 +62,6 @@ public class MesProductQmController extends BaseController {
 	@RequiresPermissions("mes:mesProductQm:view")
 	@RequestMapping(value = {"list", ""})
 	public String list(MesProductQm mesProductQm, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductQm.setTestTime_gte(dateMap.getStartDate());
-		mesProductQm.setTestTime_lte(dateMap.getEndtDate());
 		mesProductQm.setOprno("OP160");
 		model.addAttribute("mesProductQm", mesProductQm);
 		return "modules/mes/mesProductQmList";
@@ -74,9 +69,6 @@ public class MesProductQmController extends BaseController {
 	@RequiresPermissions("mes:mesProductQm:view")
 	@RequestMapping(value = {"list2", ""})
 	public String list2(MesProductQm mesProductQm, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductQm.setTestTime_gte(dateMap.getStartDate());
-		mesProductQm.setTestTime_lte(dateMap.getEndtDate());
 		mesProductQm.setOprno("OP165");
 		model.addAttribute("mesProductQm", mesProductQm);
 		return "modules/mes/mesProductQmList";
@@ -84,9 +76,6 @@ public class MesProductQmController extends BaseController {
 	@RequiresPermissions("mes:mesProductQm:view")
 	@RequestMapping(value = {"list3", ""})
 	public String list3(MesProductQm mesProductQm, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductQm.setTestTime_gte(dateMap.getStartDate());
-		mesProductQm.setTestTime_lte(dateMap.getEndtDate());
 		mesProductQm.setOprno("OP235");
 		model.addAttribute("mesProductQm", mesProductQm);
 		return "modules/mes/mesProductQmList";
@@ -94,9 +83,6 @@ public class MesProductQmController extends BaseController {
 	@RequiresPermissions("mes:mesProductQm:view")
 	@RequestMapping(value = {"list5", ""})
 	public String list5(MesProductQm mesProductQm, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductQm.setTestTime_gte(dateMap.getStartDate());
-		mesProductQm.setTestTime_lte(dateMap.getEndtDate());
 		mesProductQm.setOprno("OP210");
 		model.addAttribute("mesProductQm", mesProductQm);
 		return "modules/mes/mesProductQmList";

+ 0 - 7
src/main/java/com/jeesite/modules/mes/web/MesProductYgslController.java

@@ -10,7 +10,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.jeesite.common.lang.StringUtils;
 import com.jeesite.modules.mes.entity.MesProduct;
 import com.jeesite.modules.mes.entity.MesProductProd;
-import com.jeesite.modules.mes.req.MesSearchDateReq;
 import com.jeesite.modules.mes.util.CommonUitl;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -60,18 +59,12 @@ public class MesProductYgslController extends BaseController {
 	@RequiresPermissions("mes:mesProductYgsl:view")
 	@RequestMapping(value = {"list", ""})
 	public String list(MesProductYgsl mesProductYgsl, Model model) {
-		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-		mesProductYgsl.setTighteningDate_gte(dateMap.getStartDate());
-		mesProductYgsl.setTighteningDate_lte(dateMap.getEndtDate());
 		model.addAttribute("mesProductYgsl", mesProductYgsl);
 		return "modules/mes/mesProductYgslList";
 	}
 	@RequiresPermissions("mes:mesProductYgsl:view")
 	@RequestMapping(value = {"list2", ""})
 	public String list2(MesProductYgsl mesProductYgsl, Model model) {
-//		MesSearchDateReq dateMap = CommonUitl.getSearchDate();
-//		mesProductYgsl.setTighteningDate_gte(dateMap.getStartDate());
-//		mesProductYgsl.setTighteningDate_lte(dateMap.getEndtDate());
 		model.addAttribute("mesProductYgsl", mesProductYgsl);
 		return "modules/mes/mesProductYgslList2";
 	}

+ 12 - 3
src/main/resources/mappings/modules/mes/MesProductCmtDao.xml

@@ -6,14 +6,23 @@
 	<select id="findList" resultType="com.jeesite.modules.mes.entity.MesProductCmt">
 		SELECT ${sqlMap.column.toSql()}
 		FROM ${sqlMap.table.toSql()}
+		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
+			INNER JOIN (
+				SELECT MAX(a.id) AS id
+				FROM ${sqlMap.table.toSql()}
+				<where>
+					${sqlMap.where.toSql()}
+					AND a.sn IS NOT NULL
+					AND a.sn != ''
+				</where>
+				GROUP BY ${sqlMap.groupByColumn}
+			) latest ON latest.id = a.id
+		</if>
 		<where>
 			${sqlMap.where.toSql()}
 			AND a.sn IS NOT NULL
 			AND a.sn != ''
 		</where>
-		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
-			GROUP BY ${sqlMap.groupByColumn}
-		</if>
 		ORDER BY ${sqlMap.order.toSql()}
 	</select>
 

+ 10 - 3
src/main/resources/mappings/modules/mes/MesProductCncParamDao.xml

@@ -5,12 +5,19 @@
 	<select id="findList" resultType="com.jeesite.modules.mes.entity.MesProductCncParam">
 		SELECT ${sqlMap.column.toSql()}
 		FROM ${sqlMap.table.toSql()}
+		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
+			INNER JOIN (
+				SELECT MAX(a.id) AS id
+				FROM ${sqlMap.table.toSql()}
+				<where>
+					${sqlMap.where.toSql()}
+				</where>
+				GROUP BY ${sqlMap.groupByColumn}
+			) latest ON latest.id = a.id
+		</if>
 		<where>
 			${sqlMap.where.toSql()}
 		</where>
-		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
-			GROUP BY ${sqlMap.groupByColumn}
-		</if>
 		ORDER BY ${sqlMap.order.toSql()}
 	</select>
 

+ 10 - 3
src/main/resources/mappings/modules/mes/MesProductFswDao.xml

@@ -5,12 +5,19 @@
 	<select id="findList" resultType="com.jeesite.modules.mes.entity.MesProductFsw">
 		SELECT ${sqlMap.column.toSql()}
 		FROM ${sqlMap.table.toSql()}
+		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
+			INNER JOIN (
+				SELECT MAX(a.id) AS id
+				FROM ${sqlMap.table.toSql()}
+				<where>
+					${sqlMap.where.toSql()}
+				</where>
+				GROUP BY ${sqlMap.groupByColumn}
+			) latest ON latest.id = a.id
+		</if>
 		<where>
 			${sqlMap.where.toSql()}
 		</where>
-		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
-			GROUP BY ${sqlMap.groupByColumn}
-		</if>
 		ORDER BY ${sqlMap.order.toSql()}
 	</select>
 

+ 10 - 3
src/main/resources/mappings/modules/mes/MesProductProdDao.xml

@@ -5,12 +5,19 @@
 	<select id="findList" resultType="com.jeesite.modules.mes.entity.MesProductProd">
 		SELECT ${sqlMap.column.toSql()}
 		FROM ${sqlMap.table.toSql()}
+		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
+			INNER JOIN (
+				SELECT MAX(a.id) AS id
+				FROM ${sqlMap.table.toSql()}
+				<where>
+					${sqlMap.where.toSql()}
+				</where>
+				GROUP BY ${sqlMap.groupByColumn}
+			) latest ON latest.id = a.id
+		</if>
 		<where>
 			${sqlMap.where.toSql()}
 		</where>
-		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
-			GROUP BY ${sqlMap.groupByColumn}
-		</if>
 		ORDER BY ${sqlMap.order.toSql()}
 	</select>
 

+ 10 - 3
src/main/resources/mappings/modules/mes/MesProductQmDao.xml

@@ -6,12 +6,19 @@
 	<select id="findList" resultType="com.jeesite.modules.mes.entity.MesProductQm">
 		SELECT ${sqlMap.column.toSql()}
 		FROM ${sqlMap.table.toSql()}
+        <if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
+            INNER JOIN (
+                SELECT MAX(a.id) AS id
+                FROM ${sqlMap.table.toSql()}
+                <where>
+                    ${sqlMap.where.toSql()}
+                </where>
+                GROUP BY ${sqlMap.groupByColumn}
+            ) latest ON latest.id = a.id
+        </if>
 		<where>
 			${sqlMap.where.toSql()}
 		</where>
-        <if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
-            GROUP BY ${sqlMap.groupByColumn}
-        </if>
 		ORDER BY ${sqlMap.order.toSql()}
 	</select>
 

+ 10 - 3
src/main/resources/mappings/modules/mes/MesProductYgslDao.xml

@@ -5,12 +5,19 @@
 	<select id="findList" resultType="com.jeesite.modules.mes.entity.MesProductYgsl">
 		SELECT ${sqlMap.column.toSql()}
 		FROM ${sqlMap.table.toSql()}
+		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
+			INNER JOIN (
+				SELECT MAX(a.id) AS id
+				FROM ${sqlMap.table.toSql()}
+				<where>
+					${sqlMap.where.toSql()}
+				</where>
+				GROUP BY ${sqlMap.groupByColumn}
+			) latest ON latest.id = a.id
+		</if>
 		<where>
 			${sqlMap.where.toSql()}
 		</where>
-		<if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
-			GROUP BY ${sqlMap.groupByColumn}
-		</if>
 		ORDER BY ${sqlMap.order.toSql()}
 	</select>
 

+ 10 - 3
src/main/resources/mappings/modules/mes/MesProductYtDao.xml

@@ -5,12 +5,19 @@
 	<select id="findList" resultType="com.jeesite.modules.mes.entity.MesProductYt">
 		SELECT ${sqlMap.column.toSql()}
 		FROM ${sqlMap.table.toSql()}
+        <if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
+            INNER JOIN (
+                SELECT MAX(a.id) AS id
+                FROM ${sqlMap.table.toSql()}
+                <where>
+                    ${sqlMap.where.toSql()}
+                </where>
+                GROUP BY ${sqlMap.groupByColumn}
+            ) latest ON latest.id = a.id
+        </if>
 		<where>
 			${sqlMap.where.toSql()}
 		</where>
-        <if test="sqlMap.groupByColumn != null and sqlMap.groupByColumn != ''">
-            GROUP BY ${sqlMap.groupByColumn}
-        </if>
 		ORDER BY ${sqlMap.order.toSql()}
 	</select>