Browse Source

1.1.0 修改地块状态 问题

feature/v1.1.0
peihao 4 years ago
parent
commit
df26176ae8
  1. 5
      air/src/main/java/com/air/applets/controller/LandListedController.java
  2. 5
      air/src/main/resources/mapper/LandListedLonLatMapper.xml

5
air/src/main/java/com/air/applets/controller/LandListedController.java

@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.Period;
import java.util.List;
@ -100,8 +101,10 @@ public class LandListedController {
landListed.setTransactionStatus(LandListStatusEnum.DEAL_DONE.getCode());
}else if (localDate.isBefore(landListed.getAuctionDate())){
landListed.setTransactionStatus(LandListStatusEnum.LISTED.getCode());
}else if (!localDate.isBefore(landListed.getAuctionDate()) && StrUtil.equals(landListed.getDeal(),"0")){
}else if (localDate.isAfter(landListed.getAuctionDate()) && StrUtil.equals(landListed.getDeal(),"0")){
landListed.setTransactionStatus(LandListStatusEnum.PASS_BY.getCode());
}else if (Period.between(landListed.getAuctionDate(),localDate).getDays() == 0){
landListed.setTransactionStatus(LandListStatusEnum.LISTED.getCode());
}
return R.ok(landListed);
}

5
air/src/main/resources/mapper/LandListedLonLatMapper.xml

@ -8,12 +8,11 @@
insert into land_listed_lon_lat(
land_listed_id, anno_id, land_code, name, land_lon_lat, line_width, line_color,
line_opaqueness, fill_color, fill_opaqueness, status_cd, status_date, create_user_id,
create_date, update_user_id, update_date, remark, geom)
create_date, update_user_id, update_date, remark)
values(
#{landListedId}, #{annoId}, #{landCode}, #{name}, #{landLonLat}, #{lineWidth}, #{lineColor}
, #{lineOpaqueness}, #{fillColor}, #{fillOpaqueness}, #{statusCd}, now(), #{createUserId}
, now(), #{updateUserId}, now(), #{remark}, ST_GeometryFromText(#{geom})
)
, now(), #{updateUserId}, now(), #{remark})
</insert>
<select id="getLandListedLonLat" resultType="com.air.land.entity.LandListedLonLat">

Loading…
Cancel
Save