diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaPropInfoController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaPropInfoController.java index fadf7346..a1eb62c2 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaPropInfoController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaPropInfoController.java @@ -94,8 +94,8 @@ public class MaPropInfoController extends BaseController { }*/ Long fieldValue =maPropSet.getTypeId(); Long fieldValues =maPropSet.getPropId(); - if ( fieldValue != null || fieldValues !=null){ - return toAjax(maPropInfoService.insertMaPropSet(maPropSet)); + if (maPropSet.getPropName() != null){ + return toAjax(maPropInfoService.updateMaPropSet(maPropSet)); } /*List ben= maPropInfoService.checkPropIdUnique(maPropSet); for (MaPropSet s:ben) { @@ -105,7 +105,8 @@ public class MaPropInfoController extends BaseController { } }*/ - return toAjax(maPropInfoService.updateMaPropSet(maPropSet)); + return toAjax(maPropInfoService.insertMaPropSet(maPropSet)); + } /** diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaPropSet.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaPropSet.java index e5229839..b58a655e 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaPropSet.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaPropSet.java @@ -49,5 +49,5 @@ public class MaPropSet { */ private String companyId; - + private String propName; } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml index e3ee3f5c..64bda9c7 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml @@ -79,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.company_id = #{companyId} + ORDER BY a.pro_id DESC insert into bm_project_lot (