Browse Source

修改ptsbug

liujiankang 7 years ago
parent
commit
ed70867560

+ 4 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machinePartsMapper.xml

@@ -40,7 +40,7 @@
             <if test="produceId != null and produceId != ''">
                 t.produce_id = #{produceId}
             </if>
-            <if test="componentsStatus != null and componentsStatus != ''">
+            <if test="componentsStatus != null">
                 AND t.components_status = #{componentsStatus}
             </if>
             <if test="componentsNo != null and componentsNo != ''">
@@ -112,10 +112,10 @@
             <if test="componentsName != null and componentsName != ''" >
                 components_name = #{componentsName},
             </if>
-            <if test="componentsType != null and componentsType != ''" >
+            <if test="componentsType != null" >
                 components_type = #{componentsType},
             </if>
-            <if test="componentsCost != null and componentsCost != ''" >
+            <if test="componentsCost != null" >
                 components_cost = #{componentsCost},
             </if>
             <if test="componentsWeight != null and componentsWeight != ''" >
@@ -130,7 +130,7 @@
             <if test="componentsImg != null and componentsImg != ''" >
                 components_img = #{componentsImg},
             </if>
-            <if test="componentsStatus != null and componentsStatus != ''" >
+            <if test="componentsStatus != null" >
                 components_status = #{componentsStatus},
             </if>
             <if test="componentsDesc != null and componentsDesc != ''" >

+ 2 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachinePartsController.java

@@ -157,8 +157,8 @@ public class AdminMachinePartsController {
                 components.getComponentsStatus() != ptsComponents.getComponentsStatus() ||
                 components.getProduceId() != components.getProduceId()){
             ptsComponents.setComponentsId(null);
-            components =  machinePartsService.getmachineParts(ptsComponents);
-            if(components != null){
+            PtsComponents components2 =  machinePartsService.getmachineParts(ptsComponents);
+            if(components2 != null){
                 responseJson.setReturnCode(501);
                 return responseJson;
             }