jsk
This commit is contained in:
parent
40b0dbaefd
commit
e483647500
|
|
@ -114,8 +114,8 @@ public class InquiryController extends BaseController {
|
|||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("ims:inquiry:remove")
|
||||
@SysLog(title = "询价单", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除询价单")
|
||||
@PostMapping("/del/{inquiryIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] inquiryIds) {
|
||||
return toAjax(inquiryService.deleteInquiryByInquiryIds(inquiryIds));
|
||||
@PostMapping("/del/{inquiryId}")
|
||||
public AjaxResult remove(@PathVariable Long inquiryId) {
|
||||
return toAjax(inquiryService.deleteInquiryByInquiryId(inquiryId));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.bonus.canteen.core.ims.domain.Inquiry;
|
||||
import com.bonus.canteen.core.ims.domain.InquiryDetail;
|
||||
|
|
@ -45,10 +46,10 @@ public class QuoteController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询报价详情列表")
|
||||
//@RequiresPermissions("ims:quote:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Quote quote) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody @Valid Inquiry inquiry) {
|
||||
startPage();
|
||||
List<Quote> list = quoteService.selectQuoteList(quote);
|
||||
List<Inquiry> list = quoteService.selectInquiryList(inquiry);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ public interface InquiryMapper {
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteInquiryByInquiryId(Long inquiryId);
|
||||
|
||||
public int deleteInquirySupplierByInquiryId(Long inquiryId);
|
||||
public int deleteInquiryDetailByInquiryId(Long inquiryId);
|
||||
/**
|
||||
* 批量删除询价单
|
||||
*
|
||||
|
|
@ -67,5 +68,4 @@ public interface InquiryMapper {
|
|||
*/
|
||||
public int deleteInquiryByInquiryIds(Long[] inquiryIds);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.ims.domain.Inquiry;
|
||||
import com.bonus.canteen.core.ims.domain.InquiryDetail;
|
||||
import com.bonus.canteen.core.ims.domain.Quote;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -62,4 +63,6 @@ public interface QuoteMapper {
|
|||
*/
|
||||
public int deleteQuoteByQuoteIds(Long[] quoteIds);
|
||||
public int delQuote(@Param("inquiryId") Long inquiryId,@Param("supplierId") String supplierId);
|
||||
|
||||
public List<Inquiry> selectInquiryList(Inquiry inquiry);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,4 +62,6 @@ public interface IQuoteService {
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteQuoteByQuoteId(Long quoteId);
|
||||
|
||||
public List<Inquiry> selectInquiryList(Inquiry inquiry);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,12 @@ public class InquiryServiceImpl implements IInquiryService {
|
|||
*/
|
||||
@Override
|
||||
public int deleteInquiryByInquiryIds(Long[] inquiryIds) {
|
||||
return inquiryMapper.deleteInquiryByInquiryIds(inquiryIds);
|
||||
try{
|
||||
inquiryMapper.deleteInquiryByInquiryIds(inquiryIds);
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -173,6 +178,13 @@ public class InquiryServiceImpl implements IInquiryService {
|
|||
*/
|
||||
@Override
|
||||
public int deleteInquiryByInquiryId(Long inquiryId) {
|
||||
return inquiryMapper.deleteInquiryByInquiryId(inquiryId);
|
||||
try{
|
||||
inquiryMapper.deleteInquiryByInquiryId(inquiryId);
|
||||
inquiryMapper.deleteInquirySupplierByInquiryId(inquiryId);
|
||||
inquiryMapper.deleteInquiryDetailByInquiryId(inquiryId);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,4 +129,9 @@ public class QuoteServiceImpl implements IQuoteService {
|
|||
public int deleteQuoteByQuoteId(Long quoteId) {
|
||||
return quoteMapper.deleteQuoteByQuoteId(quoteId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Inquiry> selectInquiryList(Inquiry inquiry) {
|
||||
return quoteMapper.selectInquiryList(inquiry);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -247,6 +247,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<delete id="deleteInquiryByInquiryId" parameterType="Long">
|
||||
delete from ims_inquiry where inquiry_id = #{inquiryId}
|
||||
</delete>
|
||||
<delete id="deleteInquirySupplierByInquiryId" parameterType="Long">
|
||||
delete from ims_inquiry_supplier where inquiry_id =#{inquiryId}
|
||||
</delete>
|
||||
<delete id="deleteInquiryDetailByInquiryId" parameterType="Long">
|
||||
delete from ims_inquiry_detail where inquiry_id =#{inquiryId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInquiryByInquiryIds" parameterType="String">
|
||||
delete from ims_inquiry where inquiry_id in
|
||||
|
|
@ -254,4 +260,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{inquiryId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -15,6 +15,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.Inquiry" id="InquiryResult">
|
||||
<result property="inquiryId" column="inquiry_id" />
|
||||
<result property="areaId" column="area_id" />
|
||||
<result property="inquiryCode" column="inquiry_code" />
|
||||
<result property="title" column="title" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="bidTime" column="bid_time" />
|
||||
<result property="requestArrivalTime" column="request_arrival_time" />
|
||||
<result property="inquiryNotes" column="inquiry_notes" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="linkMan" column="link_man" />
|
||||
<result property="address" column="address" />
|
||||
<result property="bidTotalPrice" column="bid_total_price" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="supplierIdstr" column="supplier_ids" />
|
||||
<result property="area" column="area" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="supplierNames" column="supplier_names" />
|
||||
</resultMap>
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.InquiryDetail" id="InquiryDetailResult">
|
||||
<result property="inquiryId" column="inquiry_id" />
|
||||
<result property="areaId" column="area_id" />
|
||||
|
|
@ -177,4 +202,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<delete id="delQuote" >
|
||||
delete from ims_quote where inquiry_id=#{inquiryId} and inquiry_supplier_id=#{supplierId}
|
||||
</delete>
|
||||
|
||||
<select id="selectInquiryList" parameterType="com.bonus.canteen.core.ims.domain.Inquiry" resultMap="InquiryResult">
|
||||
select aa.inquiry_id, aa.area_id, aa.inquiry_code, aa.title, aa.start_time, aa.end_time, aa.status, aa.bid_time,
|
||||
aa.request_arrival_time, aa.inquiry_notes, aa.phone, aa.link_man, aa.address, aa.bid_total_price, aa.supplier_id,
|
||||
bb.area_name as area, aa.create_by, aa.create_time, aa.update_by, aa.update_time
|
||||
from ims_inquiry aa
|
||||
left join basic_area bb on aa.area_id=bb.area_id
|
||||
where aa.status>1
|
||||
<where>
|
||||
<if test="areaId != null "> and aa.area_id = #{areaId}</if>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
and (aa.inquiry_code like CONCAT('%',#{searchValue},'%') or aa.title like CONCAT('%',#{searchValue},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="inquiryState != null and inquiryState != '' and inquiryState == '1'"> and aa.status = 1 </if>
|
||||
<if test="inquiryState != null and inquiryState != '' and inquiryState == '2'"> and aa.status = 3 </if>
|
||||
<if test="inquiryState != null and inquiryState != '' and inquiryState == '3'"> and aa.status = 4 </if>
|
||||
<if test="inquiryState != null and inquiryState != '' and inquiryState == '4'"> and aa.status = 5 </if>
|
||||
<if test="status != null and status != '' and status == '1'"> and aa.status = 4 </if>
|
||||
<if test="status != null and status != '' and status == '2'"> and aa.status = 5 </if>
|
||||
<if test="orderStatus != null and orderStatus != '' and orderStatus == '1'"> and aa.status = 1 </if>
|
||||
<if test="orderStatus != null and orderStatus != '' and orderStatus == '2'"> and aa.status != 1</if>
|
||||
<if test="startTime != null "> and aa.start_time >= #{startTime} </if>
|
||||
<if test="endTime != null "> and #{endTime}>=aa.start_time </if>
|
||||
|
||||
</where>
|
||||
group by aa.inquiry_id
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue