Merge remote-tracking branch 'origin/master'

This commit is contained in:
Hawking 2023-05-16 22:49:20 +08:00
commit 40e5098a7e
4 changed files with 30 additions and 19 deletions

View File

@ -118,6 +118,9 @@ public class OrderDetailController extends BaseController {
@ResponseBody
public TableDataInfo list(OrderDetail orderDetail) {
startPage();
if(this.getSysUser().getDept().getParentId() != 101){
orderDetail.setDeptId(this.getSysUser().getDept().getParentId());
}
List<OrderDetail> orderDetails = orderDetailService.selectOrderDetailList(orderDetail);
Set<Long> customerIds = orderDetails.stream().map(OrderDetail::getCustomerId).collect(Collectors.toSet());

View File

@ -81,6 +81,9 @@ public class WorkerCertificationController extends BaseController
public TableDataInfo list(WorkerCertification workerCertification)
{
startPage();
if(this.getSysUser().getDept().getParentId() != 101){
workerCertification.setDeptId(this.getSysUser().getDept().getParentId());
}
List<WorkerCertification> list = workerCertificationService.selectWorkerCertificationList(workerCertification);
return getDataTable(list);
}

View File

@ -96,11 +96,15 @@
LEFT JOIN order_master om ON om.id = od.order_master_id
LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id
LEFT JOIN goods g ON g.goods_id = om.goods_id
left join worker w on od.worker_id = w.worker_id
</sql>
<select id="selectOrderDetailList" parameterType="com.ghy.order.domain.OrderDetail" resultMap="OrderDetailResult">
<include refid="selectOrderDetailMoreInfo"/>
<where>
<if test="deptId != null and deptId != ''">
AND w.dept_id = #{deptId}
</if>
<if test="code != null and code != ''">
AND od.code LIKE concat('%', #{code}, '%')
</if>

View File

@ -37,26 +37,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectWorkerCertificationList" parameterType="WorkerCertification" resultMap="WorkerCertificationResult">
<include refid="selectWorkerCertificationVo"/>
select worker_certification.* from worker_certification left join worker on worker_certification.worker_id = worker.worker_id
<where>
<if test="workerId != null and workerId != ''"> and worker_id = #{workerId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="idCardNum != null and idCardNum != ''"> and id_card_num = #{idCardNum}</if>
<if test="idCardUrl1 != null and idCardUrl1 != ''"> and id_card_url_1 = #{idCardUrl1}</if>
<if test="idCardUrl2 != null and idCardUrl2 != ''"> and id_card_url_2 = #{idCardUrl2}</if>
<if test="brandName != null and brandName != ''"> and brand_name like concat('%', #{brandName}, '%')</if>
<if test="companySize != null "> and company_size = #{companySize}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="businessLicenseNum != null and businessLicenseNum != ''"> and business_license_num = #{businessLicenseNum}</if>
<if test="businessLicenseUrl != null and businessLicenseUrl != ''"> and business_license_url = #{businessLicenseUrl}</if>
<if test="companyProvinceId != null "> and company_province_id = #{companyProvinceId}</if>
<if test="companyCityId != null "> and company_city_id = #{companyCityId}</if>
<if test="companyCountryId != null "> and company_country_id = #{companyCountryId}</if>
<if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
<if test="legalPersionName != null and legalPersionName != ''"> and legal_persion_name like concat('%', #{legalPersionName}, '%')</if>
<if test="legalPersionPhoneNum != null and legalPersionPhoneNum != ''"> and legal_persion_phone_num = #{legalPersionPhoneNum}</if>
<if test="otherServ != null and otherServ != ''"> and other_serv = #{otherServ}</if>
<if test="status != null "> and status = #{status}</if>
<if test="workerId != null and workerId != ''"> and worker_certification.worker_id = #{workerId}</if>
<if test="name != null and name != ''"> and worker_certification.name like concat('%', #{name}, '%')</if>
<if test="idCardNum != null and idCardNum != ''"> and worker_certification.id_card_num = #{idCardNum}</if>
<if test="idCardUrl1 != null and idCardUrl1 != ''"> and worker_certification.id_card_url_1 = #{idCardUrl1}</if>
<if test="idCardUrl2 != null and idCardUrl2 != ''"> and worker_certification.id_card_url_2 = #{idCardUrl2}</if>
<if test="brandName != null and brandName != ''"> and worker_certification.brand_name like concat('%', #{brandName}, '%')</if>
<if test="companySize != null "> and worker_certification.company_size = #{companySize}</if>
<if test="companyName != null and companyName != ''"> and worker_certification.company_name like concat('%', #{companyName}, '%')</if>
<if test="businessLicenseNum != null and businessLicenseNum != ''"> and worker_certification.business_license_num = #{businessLicenseNum}</if>
<if test="businessLicenseUrl != null and businessLicenseUrl != ''"> and worker_certification.business_license_url = #{businessLicenseUrl}</if>
<if test="companyProvinceId != null "> and worker_certification.company_province_id = #{companyProvinceId}</if>
<if test="companyCityId != null "> and worker_certification.company_city_id = #{companyCityId}</if>
<if test="companyCountryId != null "> and worker_certification.company_country_id = #{companyCountryId}</if>
<if test="companyAddress != null and companyAddress != ''"> and worker_certification.company_address = #{companyAddress}</if>
<if test="legalPersionName != null and legalPersionName != ''"> and worker_certification.legal_persion_name like concat('%', #{legalPersionName}, '%')</if>
<if test="legalPersionPhoneNum != null and legalPersionPhoneNum != ''"> and worker_certification.legal_persion_phone_num = #{legalPersionPhoneNum}</if>
<if test="otherServ != null and otherServ != ''"> and worker_certification.other_serv = #{otherServ}</if>
<if test="status != null "> and worker_certification.status = #{status}</if>
<if test="deptId != null and deptId != ''"> and worker.dept_id = #{deptId}</if>
</where>
</select>