Browse Source

修改:添加供应商审核节点字段,修改查询语句方法返回为SysSupplierVo对象。

dev
zhangsiqi 4 months ago
parent
commit
538710a006
  1. 7
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java
  2. 123
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSupplier.java
  3. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierMapper.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java
  5. 11
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java
  6. 143
      ruoyi-admin/src/main/resources/mapper/system/SysSupplierMapper.xml

7
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java

@ -18,6 +18,7 @@ import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.system.domain.SysSalesOrderVo; import com.ruoyi.system.domain.SysSalesOrderVo;
import com.ruoyi.system.domain.SysSupplier; import com.ruoyi.system.domain.SysSupplier;
import com.ruoyi.system.domain.Vo.SysSupplierVo;
import com.ruoyi.system.domain.exportDto.SysSupplierDto; import com.ruoyi.system.domain.exportDto.SysSupplierDto;
import com.ruoyi.system.service.ISysDictTypeService; import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
@ -89,7 +90,7 @@ public class SysSupplierController extends BaseController
{ {
try { try {
startPage(); startPage();
List<SysSupplier> list = sysSupplierService.selectSysSupplierList(sysSupplier); List<SysSupplierVo> list = sysSupplierService.selectSysSupplierList(sysSupplier);
SysUser curUser = ShiroUtils.getSysUser(); SysUser curUser = ShiroUtils.getSysUser();
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
Long userId = curUser.getUserId(); Long userId = curUser.getUserId();
@ -99,7 +100,7 @@ public class SysSupplierController extends BaseController
if (curUser.getUserName().contains("admin")) { if (curUser.getUserName().contains("admin")) {
SysSupplier sysSupplier2 = new SysSupplier(); SysSupplier sysSupplier2 = new SysSupplier();
startPage(); startPage();
List<SysSupplier> list2 = sysSupplierService.selectSysSupplierList(sysSupplier2); List<SysSupplierVo> list2 = sysSupplierService.selectSysSupplierList(sysSupplier2);
return getDataTable(list2); return getDataTable(list2);
} }
//如果主管审批,查看当前自己部门的审核 //如果主管审批,查看当前自己部门的审核
@ -115,7 +116,7 @@ public class SysSupplierController extends BaseController
if (roleKeys.contains("cgjlRole")) { if (roleKeys.contains("cgjlRole")) {
sysSupplier.setCreateBy(curUser.getLoginName()); sysSupplier.setCreateBy(curUser.getLoginName());
startPage(); startPage();
List<SysSupplier> list2 = sysSupplierService.selectSysSupplierList(sysSupplier); List<SysSupplierVo> list2 = sysSupplierService.selectSysSupplierList(sysSupplier);
return getDataTable(list2); return getDataTable(list2);
} }
return getDataTable(list); return getDataTable(list);

123
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSupplier.java

@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/** /**
* 供应商资料对象 sys_supplier * 供应商资料对象 sys_supplier
* *
@ -151,9 +153,33 @@ public class SysSupplier extends BaseEntity
@Excel(name = "税率") @Excel(name = "税率")
private String taxRate; private String taxRate;
private String firstAddTime; /** 流程实例ID */
private String instanceId;
/** 流程实例类型 */
private String instanceType;
/** 提交流程实例ID */
private String submitInstanceId;
/** 作废流程实例ID */
private String cancelInstanceId;
/** 恢复流程实例ID */
private String restoreInstanceId;
/** 申请人 */
private String applyTitle;
/** 申请人 */
private String applyUser;
private String updateInfoTime; /** 申请时间 */
private Date applyTime;
// private String firstAddTime;
//
// private String updateInfoTime;
private Long photoAttachId; private Long photoAttachId;
@ -164,6 +190,80 @@ public class SysSupplier extends BaseEntity
private String removeFileIdStr; private String removeFileIdStr;
private String delFlag;
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public String getInstanceType() {
return instanceType;
}
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}
public String getSubmitInstanceId() {
return submitInstanceId;
}
public void setSubmitInstanceId(String submitInstanceId) {
this.submitInstanceId = submitInstanceId;
}
public String getCancelInstanceId() {
return cancelInstanceId;
}
public void setCancelInstanceId(String cancelInstanceId) {
this.cancelInstanceId = cancelInstanceId;
}
public String getRestoreInstanceId() {
return restoreInstanceId;
}
public void setRestoreInstanceId(String restoreInstanceId) {
this.restoreInstanceId = restoreInstanceId;
}
public String getApplyTitle() {
return applyTitle;
}
public void setApplyTitle(String applyTitle) {
this.applyTitle = applyTitle;
}
public String getApplyUser() {
return applyUser;
}
public void setApplyUser(String applyUser) {
this.applyUser = applyUser;
}
public Date getApplyTime() {
return applyTime;
}
public void setApplyTime(Date applyTime) {
this.applyTime = applyTime;
}
public Long getPhotoAttachId() { public Long getPhotoAttachId() {
return photoAttachId; return photoAttachId;
} }
@ -235,23 +335,6 @@ public class SysSupplier extends BaseEntity
public void setPurchaseBuyer(String purchaseBuyer) { public void setPurchaseBuyer(String purchaseBuyer) {
this.purchaseBuyer = purchaseBuyer; this.purchaseBuyer = purchaseBuyer;
} }
public String getFirstAddTime() {
return firstAddTime;
}
public void setFirstAddTime(String firstAddTime) {
this.firstAddTime = firstAddTime;
}
public String getUpdateInfoTime() {
return updateInfoTime;
}
public void setUpdateInfoTime(String updateInfoTime) {
this.updateInfoTime = updateInfoTime;
}
public void setSupplierId(Long supplierId) public void setSupplierId(Long supplierId)
{ {
this.supplierId = supplierId; this.supplierId = supplierId;
@ -578,8 +661,6 @@ public class SysSupplier extends BaseEntity
.append("financialContact", getFinancialContact()) .append("financialContact", getFinancialContact())
.append("confirmTax", getConfirmTax()) .append("confirmTax", getConfirmTax())
.append("taxRate", getTaxRate()) .append("taxRate", getTaxRate())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.toString(); .toString();
} }
} }

13
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierMapper.java

@ -1,6 +1,7 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysSupplier; import com.ruoyi.system.domain.SysSupplier;
import com.ruoyi.system.domain.Vo.SysSupplierVo;
import java.util.List; import java.util.List;
@ -18,7 +19,7 @@ public interface SysSupplierMapper
* @param supplierId 供应商资料ID * @param supplierId 供应商资料ID
* @return 供应商资料 * @return 供应商资料
*/ */
public SysSupplier selectSysSupplierById(Long supplierId); public SysSupplierVo selectSysSupplierById(Long supplierId);
/** /**
* 查询供应商资料列表 * 查询供应商资料列表
@ -26,7 +27,7 @@ public interface SysSupplierMapper
* @param sysSupplier 供应商资料 * @param sysSupplier 供应商资料
* @return 供应商资料集合 * @return 供应商资料集合
*/ */
public List<SysSupplier> selectSysSupplierList(SysSupplier sysSupplier); public List<SysSupplierVo> selectSysSupplierList(SysSupplier sysSupplier);
/** /**
* 新增供应商资料 * 新增供应商资料
@ -76,4 +77,12 @@ public interface SysSupplierMapper
* 关联退换货 入库后退货-选择供应商-无供应商 * 关联退换货 入库后退货-选择供应商-无供应商
* */ * */
List<SysSupplier> getSupplierCodes(); List<SysSupplier> getSupplierCodes();
Integer deleteSysSupplierBySupplierCodes(String[] supplierCodes);
Integer deleteSysSupplierBySupplierCode(String supplierCode);
Integer updateSysSupplierBySupplierCode(String delFlag,String sysSupplierCode);
Integer updateSysSupplierBySupplierCodes(String delFlag,SysSupplier[] sysSupplierCodes);
} }

5
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java

@ -1,6 +1,7 @@
package com.ruoyi.system.service; package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysSupplier; import com.ruoyi.system.domain.SysSupplier;
import com.ruoyi.system.domain.Vo.SysSupplierVo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@ -28,7 +29,7 @@ public interface ISysSupplierService
* @param sysSupplier 供应商资料 * @param sysSupplier 供应商资料
* @return 供应商资料集合 * @return 供应商资料集合
*/ */
public List<SysSupplier> selectSysSupplierList(SysSupplier sysSupplier); public List<SysSupplierVo> selectSysSupplierList(SysSupplier sysSupplier);
/** /**
* 新增供应商资料 * 新增供应商资料
@ -71,7 +72,7 @@ public interface ISysSupplierService
Object getId(); Object getId();
public List<SysSupplier> selectSysSupplierListAll(); public List<SysSupplierVo> selectSysSupplierListAll();
/** /**
* 关联退换货 入库后退货-选择供应商-无供应商 * 关联退换货 入库后退货-选择供应商-无供应商

11
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java

@ -7,6 +7,7 @@ import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysAttach; import com.ruoyi.system.domain.SysAttach;
import com.ruoyi.system.domain.SysSupplier; import com.ruoyi.system.domain.SysSupplier;
import com.ruoyi.system.domain.Vo.SysSupplierVo;
import com.ruoyi.system.mapper.SysSupplierMapper; import com.ruoyi.system.mapper.SysSupplierMapper;
import com.ruoyi.system.service.ISysAttachFileService; import com.ruoyi.system.service.ISysAttachFileService;
import com.ruoyi.system.service.ISysAttachService; import com.ruoyi.system.service.ISysAttachService;
@ -49,7 +50,7 @@ public class SysSupplierServiceImpl implements ISysSupplierService
* @return 供应商资料 * @return 供应商资料
*/ */
@Override @Override
public SysSupplier selectSysSupplierById(Long supplierId) public SysSupplierVo selectSysSupplierById(Long supplierId)
{ {
return sysSupplierMapper.selectSysSupplierById(supplierId); return sysSupplierMapper.selectSysSupplierById(supplierId);
} }
@ -61,7 +62,7 @@ public class SysSupplierServiceImpl implements ISysSupplierService
* @return 供应商资料 * @return 供应商资料
*/ */
@Override @Override
public List<SysSupplier> selectSysSupplierList(SysSupplier sysSupplier) public List<SysSupplierVo> selectSysSupplierList(SysSupplier sysSupplier)
{ {
return sysSupplierMapper.selectSysSupplierList(sysSupplier); return sysSupplierMapper.selectSysSupplierList(sysSupplier);
} }
@ -140,7 +141,7 @@ public class SysSupplierServiceImpl implements ISysSupplierService
} }
@Override @Override
public List selectSysSupplierBycode() { public List<SysSupplier> selectSysSupplierBycode() {
return sysSupplierMapper.selectSysSupplierBycode(); return sysSupplierMapper.selectSysSupplierBycode();
} }
@ -158,7 +159,7 @@ public class SysSupplierServiceImpl implements ISysSupplierService
return redisCache.generateBillNo("GYS"); return redisCache.generateBillNo("GYS");
} }
@Override @Override
public List<SysSupplier> selectSysSupplierListAll() { public List<SysSupplierVo> selectSysSupplierListAll() {
SysSupplier sysSupplier = new SysSupplier(); SysSupplier sysSupplier = new SysSupplier();
sysSupplier.setAuditStatus("1"); sysSupplier.setAuditStatus("1");
return sysSupplierMapper.selectSysSupplierList(sysSupplier); return sysSupplierMapper.selectSysSupplierList(sysSupplier);
@ -174,7 +175,6 @@ public class SysSupplierServiceImpl implements ISysSupplierService
return list; return list;
} }
/** /**
* 关联退换货 入库后退货-选择供应商-无供应商 * 关联退换货 入库后退货-选择供应商-无供应商
* */ * */
@ -184,4 +184,5 @@ public class SysSupplierServiceImpl implements ISysSupplierService
List<SysSupplier> list = sysSupplierMapper.getSupplierCodes(); List<SysSupplier> list = sysSupplierMapper.getSupplierCodes();
return list; return list;
} }
} }

143
ruoyi-admin/src/main/resources/mapper/system/SysSupplierMapper.xml

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysSupplierMapper"> <mapper namespace="com.ruoyi.system.mapper.SysSupplierMapper">
<resultMap type="SysSupplier" id="SysSupplierResult"> <resultMap type="SysSupplierVo" id="SysSupplierResult">
<result property="supplierId" column="supplier_id" /> <result property="supplierId" column="supplier_id" />
<result property="useStatus" column="use_status" /> <result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" /> <result property="auditStatus" column="audit_status" />
@ -41,10 +41,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="financialContact" column="financial_contact" /> <result property="financialContact" column="financial_contact" />
<result property="confirmTax" column="confirm_tax" /> <result property="confirmTax" column="confirm_tax" />
<result property="taxRate" column="tax_rate" /> <result property="taxRate" column="tax_rate" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
<result property="photoAttachId" column="photo_attach_id" /> <result property="photoAttachId" column="photo_attach_id" />
<result property="photoUrl" column="photo_url" /> <result property="photoUrl" column="photo_url" />
<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="remark" column="remark" />
<result property="instanceType" column="instance_type" />
<result property="instanceId" column="instance_id" />
<result property="restoreInstanceId" column="restore_instance_id" />
<result property="cancelInstanceId" column="cancel_instance_id" />
<result property="submitInstanceId" column="submit_instance_id" />
<result property="applyTitle" column="apply_title" />
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="delFlag" column="del_flag" />
</resultMap> </resultMap>
<sql id="selectSysSupplierVo"> <sql id="selectSysSupplierVo">
@ -56,7 +68,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_email, website, payment_terms, supplier_days, actual_payment_days, customer_email, website, payment_terms, supplier_days, actual_payment_days,
settlement_bank, exchange_settlement_account, deposit_bank, bank_account, settlement_bank, exchange_settlement_account, deposit_bank, bank_account,
rmb_registered_capital, Industry_code, merchandiser, merchandiser_telephone, rmb_registered_capital, Industry_code, merchandiser, merchandiser_telephone,
financial_contact, confirm_tax, tax_rate, first_add_time, update_info_time financial_contact, confirm_tax, tax_rate, photo_attach_id, photo_url, create_by,
create_time, update_by, update_time, remark,
instance_type, instance_id, restore_instance_id, cancel_instance_id, submit_instance_id,
apply_title, apply_user, apply_time,del_flag
from sys_supplier from sys_supplier
</sql> </sql>
@ -69,20 +84,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sup.customer_email, sup.website, sup.payment_terms, sup.supplier_days, sup.actual_payment_days, sup.customer_email, sup.website, sup.payment_terms, sup.supplier_days, sup.actual_payment_days,
sup.settlement_bank, sup.exchange_settlement_account, sup.deposit_bank, sup.bank_account, sup.settlement_bank, sup.exchange_settlement_account, sup.deposit_bank, sup.bank_account,
sup.rmb_registered_capital, sup.Industry_code, sup.merchandiser, sup.merchandiser_telephone, sup.rmb_registered_capital, sup.Industry_code, sup.merchandiser, sup.merchandiser_telephone,
sup.financial_contact, sup.confirm_tax, sup.tax_rate, sup.first_add_time, sup.update_info_time sup.financial_contact, sup.confirm_tax, sup.tax_rate, sup.first_add_time, sup.update_info_time,
sup.photo_attach_id, sup.create_by, sup.create_time, sup.update_by, sup.update_time, sup.remark,sup.del_flag,
sup.instance_type, sup.instance_id, sup.restore_instance_id, sup.cancel_instance_id, sup.submit_instance_id,
sup.apply_title, sup.apply_user, sup.apply_time,p.dict_value as instance_type_name,file.url as photo_url
from sys_supplier as sup from sys_supplier as sup
left join( left join(
select select dict_value,dict_label from sys_dict_data
att.rel_id where dict_type = 'processType'
,file.url ) as p on sup.instance_type = p.dict_value
,min(file.create_time) as create_time left join (
from sys_attach as att select att.rel_id,file.url,min(file.create_time) as create_time
left join sys_attach_file as file from sys_attach as att left join sys_attach_file as file on att.id = file.attach_id
on att.id = file.attach_id
where att.source_type = 'supplier' and att.source_sub_type = 'photo' where att.source_type = 'supplier' and att.source_sub_type = 'photo'
group by att.rel_id group by att.rel_id
)file ) as file on sup.supplier_id = file.rel_id
on sup.supplier_id = file.rel_id
<where> <where>
<if test="supplierCode != null and supplierCode != ''"> and sup.supplier_code like concat('%', #{supplierCode}, '%')</if> <if test="supplierCode != null and supplierCode != ''"> and sup.supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and sup.supplier_name like concat('%', #{supplierName}, '%')</if> <if test="supplierName != null and supplierName != ''"> and sup.supplier_name like concat('%', #{supplierName}, '%')</if>
@ -94,9 +110,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseName != null and enterpriseName != ''"> and sup.enterprise_name like concat('%', #{enterpriseName}, '%')</if> <if test="enterpriseName != null and enterpriseName != ''"> and sup.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="customerContact != null and customerContact != ''"> and sup.customer_contact like concat('%', #{customerContact}, '%')</if> <if test="customerContact != null and customerContact != ''"> and sup.customer_contact like concat('%', #{customerContact}, '%')</if>
<if test="merchandiser != null and merchandiser != ''"> and sup.merchandiser like concat('%', #{merchandiser}, '%')</if> <if test="merchandiser != null and merchandiser != ''"> and sup.merchandiser like concat('%', #{merchandiser}, '%')</if>
<if test="instanceId != null and instanceId != ''"> and sup.instance_id = #{instanceId}</if>
<if test="instanceType != null and instanceType != ''"> and sup.instance_type = #{instanceType}</if>
<if test="submitInstanceId != null and submitInstanceId != ''"> and sup.submit_instance_id = #{submitInstanceId}</if>
<if test="cancelInstanceId != null and cancelInstanceId != ''"> and sup.cancel_instance_id = #{cancelInstanceId}</if>
<if test="restoreInstanceId != null and restoreInstanceId != ''"> and sup.restore_instance_id = #{restoreInstanceId}</if>
<if test="applyTitle != null and applyTitle != ''"> and sup.apply_title = #{applyTitle}</if>
<if test="applyUser != null and applyUser != ''"> and sup.apply_user = #{applyUser}</if>
<if test="applyTime != null "> and sup.apply_time = #{applyTime}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and sup.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="keyword != null and keyword != ''"> and ((sup.supplierCode like concat('%',#{keyword},'%') or sup.suppplierName like concat('%',#{keyword},'%'))</if>
</where> </where>
order by sup.create_time,sup.supplier_id desc
</select> </select>
<select id="selectSysSupplierById" parameterType="Long" resultMap="SysSupplierResult"> <select id="selectSysSupplierById" parameterType="Long" resultMap="SysSupplierResult">
select sup.supplier_id, sup.supplier_code, sup.supplier_name, sup.export_sales, select sup.supplier_id, sup.supplier_code, sup.supplier_name, sup.export_sales,
sup.supplier_type, sup.use_status, sup.audit_status, sup.supplier_qualification, sup.purchase_buyer, sup.supplier_type, sup.use_status, sup.audit_status, sup.supplier_qualification, sup.purchase_buyer,
@ -106,24 +134,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sup.customer_email, sup.website, sup.payment_terms, sup.supplier_days, sup.actual_payment_days, sup.customer_email, sup.website, sup.payment_terms, sup.supplier_days, sup.actual_payment_days,
sup.settlement_bank, sup.exchange_settlement_account, sup.deposit_bank, sup.bank_account, sup.settlement_bank, sup.exchange_settlement_account, sup.deposit_bank, sup.bank_account,
sup.rmb_registered_capital, sup.Industry_code, sup.merchandiser, sup.merchandiser_telephone, sup.rmb_registered_capital, sup.Industry_code, sup.merchandiser, sup.merchandiser_telephone,
sup.financial_contact, sup.confirm_tax, sup.tax_rate, sup.first_add_time, sup.update_info_time sup.financial_contact, sup.confirm_tax, sup.tax_rate, sup.first_add_time, sup.update_info_time,
sup.photo_attach_id, sup.create_by, sup.create_time, sup.update_by, sup.update_time, sup.remark,sup.del_flag,
sup.instance_type, sup.instance_id, sup.restore_instance_id, sup.cancel_instance_id, sup.submit_instance_id,
sup.apply_title, sup.apply_user, sup.apply_time,p.dict_value as instance_type_name,file.url as photo_url
from sys_supplier as sup from sys_supplier as sup
left join( left join(
select select dict_value,dict_label from sys_dict_data
att.rel_id where dict_type = 'processType'
,file.url ) as p on sup.instance_type = p.dict_value
,min(file.create_time) as create_time left join (
select att.rel_id,file.url,min(file.create_time) as create_time
from sys_attach as att from sys_attach as att
left join sys_attach_file as file left join sys_attach_file as file on att.id = file.attach_id
on att.id = file.attach_id
where att.source_type = 'supplier' and att.source_sub_type = 'photo' where att.source_type = 'supplier' and att.source_sub_type = 'photo'
group by att.rel_id group by att.rel_id
)file ) as file on sup.supplier_id = file.rel_id where sup.supplier_id = #{supplierId}
on sup.supplier_id = file.rel_id
where sup.supplier_id = #{supplierId}
</select> </select>
<select id="selectSysSupplierBycode" resultMap="SysSupplierResult"> <select id="selectSysSupplierBycode" resultMap="SysSupplierResult">
select supplier_id,supplier_code,supplier_name from sys_supplier where audit_status = 1 <include refid="selectSysSupplierVo"/>
where audit_status = 1 and use_status = 1
</select> </select>
<select id="selectSysSupplierWithMaterial" resultMap="SysSupplierResult"> <select id="selectSysSupplierWithMaterial" resultMap="SysSupplierResult">
@ -178,7 +208,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="financialContact != null">financial_contact,</if> <if test="financialContact != null">financial_contact,</if>
<if test="confirmTax != null">confirm_tax,</if> <if test="confirmTax != null">confirm_tax,</if>
<if test="taxRate != null">tax_rate,</if> <if test="taxRate != null">tax_rate,</if>
audit_status,use_status,first_add_time, <if test="instanceId != null">instance_id,</if>
<if test="instanceType != null">instance_type,</if>
<if test="submitInstanceId != null">submit_instance_id,</if>
<if test="cancelInstanceId != null">cancel_instance_id,</if>
<if test="restoreInstanceId != null">restore_instance_id,</if>
<if test="applyTitle != null">apply_title,</if>
<if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if>
<if test="useStatus != null">use_status,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="createBy != null and createBy != ''" >create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null and remark != ''" >remark,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
@ -218,7 +260,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="financialContact != null">#{financialContact},</if> <if test="financialContact != null">#{financialContact},</if>
<if test="confirmTax != null">#{confirmTax},</if> <if test="confirmTax != null">#{confirmTax},</if>
<if test="taxRate != null">#{taxRate},</if> <if test="taxRate != null">#{taxRate},</if>
'1','1',CONCAT_WS(',',NOW(),update_info_time), <if test="instanceId != null">#{instanceId},</if>
<if test="instanceType != null">#{instanceType},</if>
<if test="submitInstanceId != null">#{submitInstanceId},</if>
<if test="cancelInstanceId != null">#{cancelInstanceId},</if>
<if test="restoreInstanceId != null">#{restoreInstanceId},</if>
<if test="applyTitle != null">#{applyTitle},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="auditStatus != null and auditStatus != ''">#{auditStatus},</if>
<if test="createBy != null and createBy != ''" >#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remark != null and remark != ''" >#{remark},</if>
</trim> </trim>
</insert> </insert>
@ -261,7 +315,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="financialContact != null">financial_contact = #{financialContact},</if> <if test="financialContact != null">financial_contact = #{financialContact},</if>
<if test="confirmTax != null">confirm_tax = #{confirmTax},</if> <if test="confirmTax != null">confirm_tax = #{confirmTax},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if> <if test="taxRate != null">tax_rate = #{taxRate},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time), <if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="instanceType != null">instance_type = #{instanceType},</if>
<if test="submitInstanceId != null">submit_instance_id = #{submitInstanceId},</if>
<if test="cancelInstanceId != null">cancel_instance_id = #{cancelInstanceId},</if>
<if test="restoreInstanceId != null">restore_instance_id = #{restoreInstanceId},</if>
<if test="applyTitle != null">apply_title = #{applyTitle},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="useStatus != null and useStatus != ''" >use_status = #{useStatus},</if>
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
<if test="remark != null and remark != ''" >remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''" >update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim> </trim>
where supplier_id = #{supplierId} where supplier_id = #{supplierId}
</update> </update>
@ -270,6 +336,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from sys_supplier where supplier_id = #{supplierId} delete from sys_supplier where supplier_id = #{supplierId}
</delete> </delete>
<delete id="deleteSysSupplierBySupplierCode" parameterType="Long">
delete from sys_supplier where supplier_code = #{supplierCode}
</delete>
<delete id="deleteSysSupplierByIds" parameterType="String"> <delete id="deleteSysSupplierByIds" parameterType="String">
delete from sys_supplier where supplier_id in delete from sys_supplier where supplier_id in
<foreach item="supplierId" collection="array" open="(" separator="," close=")"> <foreach item="supplierId" collection="array" open="(" separator="," close=")">
@ -277,4 +346,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<delete id="deleteSysSupplierBySupplierCodes" parameterType="String">
delete from sys_supplier where supplier_id in
<foreach item="supplierCode" collection="array" open="(" separator="," close=")">
#{supplierCode}
</foreach>
</delete>
<update id="updateSysSupplierBySupplierCode" parameterType="String">
update sys_supplier set del_falg = #{delFlag} where supplier_code = #{supplierCode}
</update>
<update id="updateSysSupplierBySupplierCodes" parameterType="String">
update sys_supplier set del_falg = #{delFlag} where supplier_code in
<foreach item="supplierCode" collection="array" open="(" separator="," close=")">
#{supplierCode}
</foreach>
</update>
</mapper> </mapper>
Loading…
Cancel
Save