LAPTOP-063L2NVL\dong hace 5 años
padre
commit
ee2875abb7

+ 2 - 1
src/main/java/com/unissoft/grainManage/service/impl/GrainConditionRecordServiceImpl.java

@@ -118,7 +118,8 @@ public class GrainConditionRecordServiceImpl extends ServiceImpl<GrainConditionR
118 118
         //新增粮情检查
119 119
         String  checkChooseRecord = model.getCheckDescribe();
120 120
         System.out.println("检查项,选项"+checkChooseRecord);
121
-
121
+        String checkTime = model.getCheckTime().substring(0, 16);
122
+        model.setCheckTime(checkTime);
122 123
         grainConditionRecordMapper.insert(model);
123 124
         if(org.apache.commons.lang.StringUtils.isNotBlank(checkChooseRecord)) {
124 125
 

+ 1 - 1
src/main/java/com/unissoft/mapper/GrainConditionRecordMapper.xml

@@ -38,7 +38,7 @@
38 38
         FROM
39 39
             grain_condition_record gcr   left join grain_abnormal_describe gad on gcr.id = gad.grain_record_id
40 40
         WHERE
41
-            gcr.check_time = ( SELECT max( check_time ) FROM grain_condition_record WHERE check_person = gcr.check_person )
41
+            gcr.id = ( SELECT max( id ) FROM grain_condition_record WHERE check_person = gcr.check_person )
42 42
             and house_id = #{houseId} and depot_id = #{depotId}
43 43
         ORDER BY
44 44
             gcr.check_person