diff --git a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/base/controller/SynchronousController.java b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/base/controller/SynchronousController.java index 6b876a5..7a490f8 100644 --- a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/base/controller/SynchronousController.java +++ b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/base/controller/SynchronousController.java @@ -8,9 +8,11 @@ import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibr import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.service.ICoscoCategoryLibraryService; import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.service.ICoscoCategoryLibrarySupplierApplyService; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork; +import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeApply; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierexit; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessWorkCategoryService; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessWorkService; +import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoSupplierBaseService; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoSupplierexitService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -39,6 +41,8 @@ public class SynchronousController { @Autowired private ICoscoBlacklistService coscoBlacklistService; + @Autowired + private ICoscoSupplierBaseService coscoSupplierBaseService; @@ -96,4 +100,13 @@ public class SynchronousController { } + /** + * 供应商变更审批回调接口 + */ + @PostMapping("/supplierChangeApprove") + public BaseResponse supplierChangeApprove(@RequestBody CoscoSupplierChangeApply vo) { + return BaseResponse.success(coscoSupplierBaseService.updateCoscoSupplierBase(vo)); + } + + } diff --git a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/ICoscoSupplierBaseService.java b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/ICoscoSupplierBaseService.java index a25ea7b..640096e 100644 --- a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/ICoscoSupplierBaseService.java +++ b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/ICoscoSupplierBaseService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BlackSupplierVo; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase; +import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeApply; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierVo; import java.util.List; @@ -44,10 +45,9 @@ public interface ICoscoSupplierBaseService { /** * 修改中远海运_供应商_基本信息 * - * @param coscoSupplierBase 中远海运_供应商_基本信息 * @return 结果 */ - public int updateCoscoSupplierBase(CoscoSupplierBase coscoSupplierBase); + public Boolean updateCoscoSupplierBase(CoscoSupplierChangeApply vo); /** * 批量删除中远海运_供应商_基本信息 diff --git a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoAccessWorkCategoryServiceImpl.java b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoAccessWorkCategoryServiceImpl.java index 66587c6..eea9242 100644 --- a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoAccessWorkCategoryServiceImpl.java +++ b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoAccessWorkCategoryServiceImpl.java @@ -174,6 +174,11 @@ public class CoscoAccessWorkCategoryServiceImpl implements ICoscoAccessWorkCateg //先验证一下主任务表数据状态 CoscoAccessWork coscoAccessWorkData = coscoAccessWorkMapper.selectCoscoAccessWorkById(vo.getId()); + + if(coscoAccessWorkData == null){ + return true; + } + if(CoscoType.APPROVE_STATUS_TG.equals(coscoAccessWorkData.getApproveStatus()) || CoscoType.APPROVE_STATUS_BH.equals(coscoAccessWorkData.getApproveStatus()) ){ return true; diff --git a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoAccessWorkServiceImpl.java b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoAccessWorkServiceImpl.java index 0826f39..1eec45a 100644 --- a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoAccessWorkServiceImpl.java +++ b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoAccessWorkServiceImpl.java @@ -505,6 +505,11 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService { //先验证一下主任务表数据状态 CoscoAccessWork coscoAccessWorkData = coscoAccessWorkMapper.selectCoscoAccessWorkById(vo.getId()); + + if(coscoAccessWorkData == null){ + return true; + } + if(CoscoType.APPROVE_STATUS_TG.equals(coscoAccessWorkData.getApproveStatus()) || CoscoType.APPROVE_STATUS_BH.equals(coscoAccessWorkData.getApproveStatus()) ){ return true; diff --git a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierBaseServiceImpl.java b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierBaseServiceImpl.java index 164e08e..0f7611d 100644 --- a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierBaseServiceImpl.java +++ b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierBaseServiceImpl.java @@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.chinaunicom.mall.ebtp.common.util.PropertyUtils; import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoIdUtil; +import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoType; import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BlackSupplierVo; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.*; import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.*; @@ -54,6 +55,12 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService { @Autowired private CoscoSupplierChangeBankMapper coscoSupplierChangeBankMapper; + //变更 + @Autowired + private CoscoSupplierChangeApplyMapper coscoSupplierChangeApplyMapper; + + + @Override public IPage getPage(CoscoSupplierBase coscoSupplierBase) { // 创建分页对象(当前页,每页大小) @@ -259,15 +266,117 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService { } /** - * 修改中远海运_供应商_基本信息 + * 变更中远海运_供应商_基本信息 * - * @param coscoSupplierBase 中远海运_供应商_基本信息 * @return 结果 */ @Override - public int updateCoscoSupplierBase(CoscoSupplierBase coscoSupplierBase) { + @Transactional + public Boolean updateCoscoSupplierBase(CoscoSupplierChangeApply vo) { + String appid = vo.getId();//任务主体id + CoscoSupplierChangeApply coscoSupplierChangeApply = coscoSupplierChangeApplyMapper.selectCoscoSupplierChangeApplyById(appid); + if(coscoSupplierChangeApply == null){ + return true; + } + //先验证一下主任务表数据状态 + if(CoscoType.APPROVE_STATUS_TG.equals(coscoSupplierChangeApply.getApproveStatus()) || + CoscoType.APPROVE_STATUS_BH.equals(coscoSupplierChangeApply.getApproveStatus()) ){ + return true; + } + //新基本信息 + CoscoSupplierChangeBase newCoscoSupplierBase = coscoSupplierChangeBaseMapper.selectBySupplierChangeApplyId(appid); + + //老基本信息 + CoscoSupplierBase coscoSupplierBase = coscoSupplierBaseMapper.selectCoscoSupplierBaseById(coscoSupplierChangeApply.getSupplierId()); + String supplierId = coscoSupplierBase.getId(); + String createBy = coscoSupplierBase.getCreateBy(); + String updateBy = coscoSupplierBase.getUpdateBy(); + BeanUtil.copyProperties(newCoscoSupplierBase,coscoSupplierBase); + coscoSupplierBase.setId(supplierId); coscoSupplierBase.setUpdateTime(CoscoDateUtils.getNowDate()); - return coscoSupplierBaseMapper.updateCoscoSupplierBase(coscoSupplierBase); + coscoSupplierBase.setLastUpdateTime(CoscoDateUtils.getNowDate()); + coscoSupplierBaseMapper.updateCoscoSupplierBase(coscoSupplierBase); + + //删除在新增新资质 + coscoSupplierQualificationsMapper.deleteCoscoSupplierQualificationsById(supplierId); + + CoscoSupplierChangeQualifications coscoSupplierChangeQualifications2 = new CoscoSupplierChangeQualifications(); + coscoSupplierChangeQualifications2.setSupplierId(newCoscoSupplierBase.getId()); + List newCoscoSupplierChangeQualificationsList = + coscoSupplierChangeQualificationsMapper.selectCoscoSupplierChangeQualificationsList(coscoSupplierChangeQualifications2); + for(CoscoSupplierChangeQualifications newQualifications : newCoscoSupplierChangeQualificationsList){ + CoscoSupplierQualifications oldQualifications = new CoscoSupplierQualifications(); + BeanUtil.copyProperties(newQualifications,oldQualifications); + String yId = CoscoIdUtil.getId(); + oldQualifications.setId(yId); + oldQualifications.setSupplierId(supplierId); + oldQualifications.setCreateBy(createBy); + oldQualifications.setCreateTime(CoscoDateUtils.getNowDate()); + oldQualifications.setUpdateBy(updateBy); + oldQualifications.setUpdateTime(CoscoDateUtils.getNowDate()); + oldQualifications.setLastUpdateTime(CoscoDateUtils.getNowDate()); + coscoSupplierQualificationsMapper.insertCoscoSupplierQualifications(oldQualifications); + + //把新id,添加到变更表 + CoscoSupplierChangeQualifications coscoSupplierChangeQualifications = new CoscoSupplierChangeQualifications(); + coscoSupplierChangeQualifications.setSupplierQualificationsId(yId); + coscoSupplierChangeQualifications.setId(newQualifications.getId()); + coscoSupplierChangeQualificationsMapper.updateCoscoSupplierChangeQualifications(coscoSupplierChangeQualifications); + } + + //新开票信息 + coscoSupplierInvoiceMapper.deleteCoscoSupplierInvoiceById(supplierId); + + CoscoSupplierChangeInvoice newInvoice = coscoSupplierChangeInvoiceMapper.selectBySupplierChangeApplyId(appid); + CoscoSupplierInvoice oldInvoice = new CoscoSupplierInvoice(); + BeanUtil.copyProperties(newInvoice,oldInvoice); + + oldInvoice.setId(CoscoIdUtil.getId()); + oldInvoice.setSupplierId(supplierId); + oldInvoice.setCreateBy(createBy); + oldInvoice.setCreateTime(CoscoDateUtils.getNowDate()); + oldInvoice.setUpdateBy(updateBy); + oldInvoice.setUpdateTime(CoscoDateUtils.getNowDate()); + oldInvoice.setLastUpdateTime(CoscoDateUtils.getNowDate()); + coscoSupplierInvoiceMapper.insertCoscoSupplierInvoice(oldInvoice); + + + + //新银行 + coscoSupplierBankMapper.deleteCoscoSupplierBankById(supplierId); + + CoscoSupplierChangeBank newBank = new CoscoSupplierChangeBank(); + newBank.setSupplierId(newCoscoSupplierBase.getId()); + List newBankList = + coscoSupplierChangeBankMapper.selectCoscoSupplierChangeBankList(newBank); + for(CoscoSupplierChangeBank coscoSupplierChangeBank : newBankList){ + CoscoSupplierBank coscoSupplierBank = new CoscoSupplierBank(); + BeanUtil.copyProperties(coscoSupplierChangeBank,coscoSupplierBank); + String bankId = CoscoIdUtil.getId(); + coscoSupplierBank.setId(bankId); + coscoSupplierBank.setSupplierId(supplierId); + coscoSupplierBank.setCreateBy(createBy); + coscoSupplierBank.setCreateTime(CoscoDateUtils.getNowDate()); + coscoSupplierBank.setUpdateBy(updateBy); + coscoSupplierBank.setUpdateTime(CoscoDateUtils.getNowDate()); + coscoSupplierBank.setLastUpdateTime(CoscoDateUtils.getNowDate()); + coscoSupplierBankMapper.insertCoscoSupplierBank(coscoSupplierBank); + + CoscoSupplierChangeBank coscoSupplierChangeBank1 = new CoscoSupplierChangeBank(); + coscoSupplierChangeBank1.setId(coscoSupplierChangeBank.getId()); + coscoSupplierChangeBank1.setSupplierBankId(bankId); + coscoSupplierChangeBankMapper.updateCoscoSupplierChangeBank(coscoSupplierChangeBank1); + } + + //修改审批状态 + CoscoSupplierChangeApply coscoSupplierChangeApply1 = new CoscoSupplierChangeApply(); + coscoSupplierChangeApply1.setId(coscoSupplierChangeApply.getId()); + coscoSupplierChangeApply1.setApproveStatus(vo.getApproveStatus()); + coscoSupplierChangeApply1.setUpdateTime(CoscoDateUtils.getNowDate()); + coscoSupplierChangeApply1.setLastUpdateTime(CoscoDateUtils.getNowDate()); + coscoSupplierChangeApplyMapper.updateCoscoSupplierChangeApply(coscoSupplierChangeApply1); + + return true; } /** diff --git a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierChangeApplyServiceImpl.java b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierChangeApplyServiceImpl.java index 8ae2b77..e4bf0d8 100644 --- a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierChangeApplyServiceImpl.java +++ b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierChangeApplyServiceImpl.java @@ -57,9 +57,9 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange CoscoSupplierChangeApply coscoSupplierChangeApply = coscoSupplierChangeApplyMapper.selectCoscoSupplierChangeApplyById(appid); //查询当前任务的上一条任务 - CoscoSupplierChangeApply coscoSupplierChangeApply1 = coscoSupplierChangeApplyMapper.selectBySupplierId(coscoSupplierChangeApply.getSupplierId()); + CoscoSupplierChangeApply oldCoscoSupplierChangeApply = coscoSupplierChangeApplyMapper.selectBySupplierId(coscoSupplierChangeApply.getSupplierId()); //如果是空,说明是第一次提交变更 - if(coscoSupplierChangeApply1 == null){ + if(oldCoscoSupplierChangeApply == null){ //基础信息比对结果 CoscoSupplierChangeBase coscoSupplierChangeBase = new CoscoSupplierChangeBase(); coscoSupplierChangeBase.setSupplierId(coscoSupplierChangeApply.getSupplierId()); @@ -110,6 +110,62 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange + diffVo.setCoscoSupplierChangeApply(coscoSupplierChangeApply); + diffVo.setSupplierChangeDiffResult(selectDiff); + diffVo.setQualificationsMap(qualificationsMap); + diffVo.setInvoiceChangeDiffVo(invoiceChangeDiffVo); + diffVo.setBankListMap(bankListMap); + }else{ + //基础信息比对结果 + CoscoSupplierChangeBase coscoSupplierChangeBase = new CoscoSupplierChangeBase(); + coscoSupplierChangeBase.setSupplierChangeApplyIdOld(oldCoscoSupplierChangeApply.getId()); + coscoSupplierChangeBase.setSupplierChangeApplyId(appid); + SupplierChangeDiffResult selectDiff = coscoSupplierChangeBaseMapper.selectDiff(coscoSupplierChangeBase); + + //老基本信息 + CoscoSupplierChangeBase oldCoscoSupplierBase = coscoSupplierChangeBaseMapper.selectBySupplierChangeApplyId(oldCoscoSupplierChangeApply.getId()); + //新基本信息 + CoscoSupplierChangeBase newCoscoSupplierBase = coscoSupplierChangeBaseMapper.selectBySupplierChangeApplyId(appid); + + + //原资质 + CoscoSupplierChangeQualifications coscoSupplierChangeQualifications = new CoscoSupplierChangeQualifications(); + coscoSupplierChangeQualifications.setSupplierId(oldCoscoSupplierBase.getId()); + List oldCoscoSupplierChangeQualificationsList = + coscoSupplierChangeQualificationsMapper.selectCoscoSupplierChangeQualificationsList(coscoSupplierChangeQualifications); + + //新资质 + CoscoSupplierChangeQualifications coscoSupplierChangeQualifications2 = new CoscoSupplierChangeQualifications(); + coscoSupplierChangeQualifications2.setSupplierId(newCoscoSupplierBase.getId()); + List newCoscoSupplierChangeQualificationsList = + coscoSupplierChangeQualificationsMapper.selectCoscoSupplierChangeQualificationsList(coscoSupplierChangeQualifications2); + //资质对比 + Map qualificationsMap = qualificationsDiff(oldCoscoSupplierChangeQualificationsList,newCoscoSupplierChangeQualificationsList); + + + //开票信息比对 + CoscoSupplierChangeInvoice invoice = new CoscoSupplierChangeInvoice(); + invoice.setOldSupplierId(oldCoscoSupplierBase.getId()); + invoice.setNewSupplierId(newCoscoSupplierBase.getId()); + InvoiceChangeDiffVo invoiceChangeDiffVo = coscoSupplierChangeInvoiceMapper.selectInvoiceDitt(invoice); + + + //原银行 + CoscoSupplierChangeBank oldBank = new CoscoSupplierChangeBank(); + oldBank.setSupplierId(oldCoscoSupplierBase.getId()); + List oldBankList = + coscoSupplierChangeBankMapper.selectCoscoSupplierChangeBankList(oldBank); + + //新银行 + CoscoSupplierChangeBank newBank = new CoscoSupplierChangeBank(); + newBank.setSupplierId(newCoscoSupplierBase.getId()); + List newBankList = + coscoSupplierChangeBankMapper.selectCoscoSupplierChangeBankList(newBank); + //资质对比 + Map bankListMap = bankDiff(oldBankList,newBankList); + + + diffVo.setCoscoSupplierChangeApply(coscoSupplierChangeApply); diffVo.setSupplierChangeDiffResult(selectDiff); diffVo.setQualificationsMap(qualificationsMap); diff --git a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierexitServiceImpl.java b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierexitServiceImpl.java index ffcc94e..64b2e4a 100644 --- a/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierexitServiceImpl.java +++ b/src/main/java/com/chinaunicom/zyhy/ebtp/supplier/coscosupplier/service/impl/CoscoSupplierexitServiceImpl.java @@ -131,6 +131,9 @@ public class CoscoSupplierexitServiceImpl implements ICoscoSupplierexitService { public Boolean updateCoscoSupplierexit(CoscoSupplierexit vo) { //先验证一下主任务表数据状态 CoscoSupplierexit coscoSupplierexit = coscoSupplierexitMapper.selectCoscoSupplierexitById(vo.getId()); + if(coscoSupplierexit == null){ + return true; + } if(CoscoType.APPROVE_STATUS_TG.equals(coscoSupplierexit.getApproveStatus()) || CoscoType.APPROVE_STATUS_BH.equals(coscoSupplierexit.getApproveStatus()) ){ return true; diff --git a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierBankMapper.xml b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierBankMapper.xml index cd222fc..2b21f1c 100644 --- a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierBankMapper.xml +++ b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierBankMapper.xml @@ -191,8 +191,8 @@ - update cosco_supplier_bank set del_flag = 2 - where id = #{id} + update cosco_supplier_bank set del_flag = 'deleted' + where supplier_id = #{supplierId} diff --git a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierBaseMapper.xml b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierBaseMapper.xml index af21926..0de320f 100644 --- a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierBaseMapper.xml +++ b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierBaseMapper.xml @@ -4,99 +4,56 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - select id, - supplier_type, - licence_accessory, - licence_date, - enterprise_type, - name, - name_en, - social_credit_code, - `range`, - reg_address, - work_address, - parent_company_investor, - legal_person, - id_card, - capital, - contacts_name, - contacts_phone, - contacts_type, - contacts_email, - telephone, - nation, - vat, - taxpayer_id, - currency, - person_name, - person_phone, - person_bank, - person_account, - remark, - access_status, - blacklist_status, - greylist_status, - fillin_status, - fillin_by, - sap_code, - del_flag, - create_by, - create_time, - update_by, - update_time, - last_update_time + select id, supplier_type, licence_accessory, licence_date, enterprise_type, name, name_en, social_credit_code, `range`, reg_address, work_address, parent_company_investor, legal_person, id_card, capital, contacts_name, contacts_phone, contacts_type, contacts_email, telephone, nation, vat, taxpayer_id, currency, person_name, person_phone, person_bank, person_account, remark, access_status, blacklist_status, greylist_status, fillin_status, fillin_by, sap_code, del_flag, create_by, create_time, update_by, update_time, last_update_time from cosco_supplier_base - and del_flag = 'normal' @@ -122,7 +79,7 @@ and social_credit_code = #{vo.socialCreditCode} - and range = #{vo.range} + and `range` = #{vo.range} and reg_address = #{vo.regAddress} @@ -207,362 +164,347 @@ - - - and supplier_type = #{supplierType} - - - and licence_accessory = #{licenceAccessory} - - - and licence_date = #{licenceDate} - - - and enterprise_type = #{enterpriseType} - - - and name like concat('%', #{name}, '%') - - - and name_en = #{nameEn} - - - and social_credit_code = #{socialCreditCode} - - - and range = #{range} - - - and reg_address = #{regAddress} - - - and work_address = #{workAddress} - - - and parent_company_investor = #{parentCompanyInvestor} - - - and legal_person = #{legalPerson} - - - and id_card = #{idCard} - - - and capital = #{capital} - - - and contacts_name like concat('%', #{contactsName}, '%') - - - and contacts_phone = #{contactsPhone} - - - and contacts_type = #{contactsType} - - - and contacts_email = #{contactsEmail} - - - and telephone = #{telephone} - - - and nation = #{nation} - - - and vat = #{vat} - - - and taxpayer_id = #{taxpayerId} - - - and currency = #{currency} - - - and person_name like concat('%', #{personName}, '%') - - - and person_phone = #{personPhone} - - - and person_bank = #{personBank} - - - and person_account = #{personAccount} - - - and access_status = #{accessStatus} - - - and blacklist_status = #{blacklistStatus} - - - and greylist_status = #{greylistStatus} - - - and fillin_status = #{fillinStatus} - - - and fillin_by = #{fillinBy} - - - and sap_code = #{sapCode} - - - and last_update_time = #{lastUpdateTime} - + and del_flag = 'normal' + + and supplier_type = #{supplierType} + + + and licence_accessory = #{licenceAccessory} + + + and licence_date = #{licenceDate} + + + and enterprise_type = #{enterpriseType} + + + and name like concat('%', #{name}, '%') + + + and name_en = #{nameEn} + + + and social_credit_code = #{socialCreditCode} + + + and `range` = #{range} + + + and reg_address = #{regAddress} + + + and work_address = #{workAddress} + + + and parent_company_investor = #{parentCompanyInvestor} + + + and legal_person = #{legalPerson} + + + and id_card = #{idCard} + + + and capital = #{capital} + + + and contacts_name like concat('%', #{contactsName}, '%') + + + and contacts_phone = #{contactsPhone} + + + and contacts_type = #{contactsType} + + + and contacts_email = #{contactsEmail} + + + and telephone = #{telephone} + + + and nation = #{nation} + + + and vat = #{vat} + + + and taxpayer_id = #{taxpayerId} + + + and currency = #{currency} + + + and person_name like concat('%', #{personName}, '%') + + + and person_phone = #{personPhone} + + + and person_bank = #{personBank} + + + and person_account = #{personAccount} + + + and access_status = #{accessStatus} + + + and blacklist_status = #{blacklistStatus} + + + and greylist_status = #{greylistStatus} + + + and fillin_status = #{fillinStatus} + + + and fillin_by = #{fillinBy} + + + and sap_code = #{sapCode} + + + and last_update_time = #{lastUpdateTime} + - + insert into cosco_supplier_base - id, - supplier_type, - licence_accessory, - licence_date, - enterprise_type, - name, - name_en, - social_credit_code, - `range`, - reg_address, - work_address, - parent_company_investor, - legal_person, - id_card, - capital, - contacts_name, - contacts_phone, - contacts_type, - contacts_email, - telephone, - nation, - vat, - taxpayer_id, - currency, - person_name, - person_phone, - person_bank, - person_account, - remark, - access_status, - blacklist_status, - greylist_status, - fillin_status, - fillin_by, - sap_code, - del_flag, - create_by, - create_time, - update_by, - update_time, - last_update_time, + id, + supplier_type, + licence_accessory, + licence_date, + enterprise_type, + name, + name_en, + social_credit_code, + `range`, + reg_address, + work_address, + parent_company_investor, + legal_person, + id_card, + capital, + contacts_name, + contacts_phone, + contacts_type, + contacts_email, + telephone, + nation, + vat, + taxpayer_id, + currency, + person_name, + person_phone, + person_bank, + person_account, + remark, + access_status, + blacklist_status, + greylist_status, + fillin_status, + fillin_by, + sap_code, + del_flag, + create_by, + create_time, + update_by, + update_time, + last_update_time, - #{id}, - #{supplierType}, - #{licenceAccessory}, - #{licenceDate}, - #{enterpriseType}, - #{name}, - #{nameEn}, - #{socialCreditCode}, - #{range}, - #{regAddress}, - #{workAddress}, - #{parentCompanyInvestor}, - #{legalPerson}, - #{idCard}, - #{capital}, - #{contactsName}, - #{contactsPhone}, - #{contactsType}, - #{contactsEmail}, - #{telephone}, - #{nation}, - #{vat}, - #{taxpayerId}, - #{currency}, - #{personName}, - #{personPhone}, - #{personBank}, - #{personAccount}, - #{remark}, - #{accessStatus}, - #{blacklistStatus}, - #{greylistStatus}, - #{fillinStatus}, - #{fillinBy}, - #{sapCode}, - #{delFlag}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{lastUpdateTime}, + #{id}, + #{supplierType}, + #{licenceAccessory}, + #{licenceDate}, + #{enterpriseType}, + #{name}, + #{nameEn}, + #{socialCreditCode}, + #{range}, + #{regAddress}, + #{workAddress}, + #{parentCompanyInvestor}, + #{legalPerson}, + #{idCard}, + #{capital}, + #{contactsName}, + #{contactsPhone}, + #{contactsType}, + #{contactsEmail}, + #{telephone}, + #{nation}, + #{vat}, + #{taxpayerId}, + #{currency}, + #{personName}, + #{personPhone}, + #{personBank}, + #{personAccount}, + #{remark}, + #{accessStatus}, + #{blacklistStatus}, + #{greylistStatus}, + #{fillinStatus}, + #{fillinBy}, + #{sapCode}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{lastUpdateTime}, insert into cosco_supplier_base - ( id, supplier_type, licence_accessory, licence_date, enterprise_type, name, name_en, social_credit_code, range, - reg_address, work_address, parent_company_investor, legal_person, id_card, capital, contacts_name, - contacts_phone, contacts_type, contacts_email, telephone, nation, vat, taxpayer_id, currency, person_name, - person_phone, person_bank, person_account, remark, access_status, blacklist_status, greylist_status, - fillin_status, fillin_by, sap_code, del_flag, create_by, create_time, update_by, update_time, last_update_time) + ( id, supplier_type, licence_accessory, licence_date, enterprise_type, name, name_en, social_credit_code, `range`, reg_address, work_address, parent_company_investor, legal_person, id_card, capital, contacts_name, contacts_phone, contacts_type, contacts_email, telephone, nation, vat, taxpayer_id, currency, person_name, person_phone, person_bank, person_account, remark, access_status, blacklist_status, greylist_status, fillin_status, fillin_by, sap_code, del_flag, create_by, create_time, update_by, update_time, last_update_time) values - ( #{item.id}, #{item.supplierType}, #{item.licenceAccessory}, #{item.licenceDate}, #{item.enterpriseType}, - #{item.name}, #{item.nameEn}, #{item.socialCreditCode}, #{item.range}, #{item.regAddress}, - #{item.workAddress}, #{item.parentCompanyInvestor}, #{item.legalPerson}, #{item.idCard}, #{item.capital}, - #{item.contactsName}, #{item.contactsPhone}, #{item.contactsType}, #{item.contactsEmail}, #{item.telephone}, - #{item.nation}, #{item.vat}, #{item.taxpayerId}, #{item.currency}, #{item.personName}, #{item.personPhone}, - #{item.personBank}, #{item.personAccount}, #{item.remark}, #{item.accessStatus}, #{item.blacklistStatus}, - #{item.greylistStatus}, #{item.fillinStatus}, #{item.fillinBy}, #{item.sapCode}, #{item.delFlag}, - #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime}) + ( #{item.id}, #{item.supplierType}, #{item.licenceAccessory}, #{item.licenceDate}, #{item.enterpriseType}, #{item.name}, #{item.nameEn}, #{item.socialCreditCode}, #{item.range}, #{item.regAddress}, #{item.workAddress}, #{item.parentCompanyInvestor}, #{item.legalPerson}, #{item.idCard}, #{item.capital}, #{item.contactsName}, #{item.contactsPhone}, #{item.contactsType}, #{item.contactsEmail}, #{item.telephone}, #{item.nation}, #{item.vat}, #{item.taxpayerId}, #{item.currency}, #{item.personName}, #{item.personPhone}, #{item.personBank}, #{item.personAccount}, #{item.remark}, #{item.accessStatus}, #{item.blacklistStatus}, #{item.greylistStatus}, #{item.fillinStatus}, #{item.fillinBy}, #{item.sapCode}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime}) - + update cosco_supplier_base - supplier_type = - #{supplierType}, - - licence_accessory = - #{licenceAccessory}, - - licence_date = - #{licenceDate}, - - enterprise_type = - #{enterpriseType}, - - name = - #{name}, - - name_en = - #{nameEn}, - - social_credit_code = - #{socialCreditCode}, - - range = - #{range}, - - reg_address = - #{regAddress}, - - work_address = - #{workAddress}, - - parent_company_investor = - #{parentCompanyInvestor}, - - legal_person = - #{legalPerson}, - - id_card = - #{idCard}, - - capital = - #{capital}, - - contacts_name = - #{contactsName}, - - contacts_phone = - #{contactsPhone}, - - contacts_type = - #{contactsType}, - - contacts_email = - #{contactsEmail}, - - telephone = - #{telephone}, - - nation = - #{nation}, - - vat = - #{vat}, - - taxpayer_id = - #{taxpayerId}, - - currency = - #{currency}, - - person_name = - #{personName}, - - person_phone = - #{personPhone}, - - person_bank = - #{personBank}, - - person_account = - #{personAccount}, - - remark = - #{remark}, - - access_status = - #{accessStatus}, - - blacklist_status = - #{blacklistStatus}, - - greylist_status = - #{greylistStatus}, - - fillin_status = - #{fillinStatus}, - - fillin_by = - #{fillinBy}, - - sap_code = - #{sapCode}, - - del_flag = - #{delFlag}, - - create_by = - #{createBy}, - - create_time = - #{createTime}, - - update_by = - #{updateBy}, - - update_time = - #{updateTime}, - - last_update_time = - #{lastUpdateTime}, - + supplier_type = + #{supplierType}, + + licence_accessory = + #{licenceAccessory}, + + licence_date = + #{licenceDate}, + + enterprise_type = + #{enterpriseType}, + + name = + #{name}, + + name_en = + #{nameEn}, + + social_credit_code = + #{socialCreditCode}, + + `range` = + #{range}, + + reg_address = + #{regAddress}, + + work_address = + #{workAddress}, + + parent_company_investor = + #{parentCompanyInvestor}, + + legal_person = + #{legalPerson}, + + id_card = + #{idCard}, + + capital = + #{capital}, + + contacts_name = + #{contactsName}, + + contacts_phone = + #{contactsPhone}, + + contacts_type = + #{contactsType}, + + contacts_email = + #{contactsEmail}, + + telephone = + #{telephone}, + + nation = + #{nation}, + + vat = + #{vat}, + + taxpayer_id = + #{taxpayerId}, + + currency = + #{currency}, + + person_name = + #{personName}, + + person_phone = + #{personPhone}, + + person_bank = + #{personBank}, + + person_account = + #{personAccount}, + + remark = + #{remark}, + + access_status = + #{accessStatus}, + + blacklist_status = + #{blacklistStatus}, + + greylist_status = + #{greylistStatus}, + + fillin_status = + #{fillinStatus}, + + fillin_by = + #{fillinBy}, + + sap_code = + #{sapCode}, + + del_flag = + #{delFlag}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + last_update_time = + #{lastUpdateTime}, + where id = #{id} - update cosco_supplier_base - set del_flag = 2 + update cosco_supplier_base set del_flag = 2 where id = #{id} diff --git a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierChangeBankMapper.xml b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierChangeBankMapper.xml index ecdd31d..1872e6b 100644 --- a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierChangeBankMapper.xml +++ b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierChangeBankMapper.xml @@ -147,6 +147,9 @@ supplier_change_apply_id = #{supplierChangeApplyId}, + supplier_bank_id = + #{supplierBankId}, + where id = #{id} diff --git a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierChangeQualificationsMapper.xml b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierChangeQualificationsMapper.xml index a4f681f..6740fae 100644 --- a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierChangeQualificationsMapper.xml +++ b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierChangeQualificationsMapper.xml @@ -138,6 +138,10 @@ supplier_change_apply_id = #{supplierChangeApplyId}, + supplier_qualifications_id = + #{supplierQualificationsId}, + + where id = #{id} diff --git a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierInvoiceMapper.xml b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierInvoiceMapper.xml index 883458c..dad332c 100644 --- a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierInvoiceMapper.xml +++ b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierInvoiceMapper.xml @@ -172,8 +172,8 @@ - update cosco_supplier_invoice set del_flag = 2 - where id = #{id} + update cosco_supplier_invoice set del_flag = 'deleted' + where supplier_id = #{supplierId} diff --git a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierQualificationsMapper.xml b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierQualificationsMapper.xml index 5bf1eec..3e34c3d 100644 --- a/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierQualificationsMapper.xml +++ b/src/main/resources/com/chinaunicom/zyhy/ebtp/supplier/base/dao/mapper/CoscoSupplierQualificationsMapper.xml @@ -172,8 +172,8 @@ - update cosco_supplier_qualifications set del_flag = 2 - where id = #{id} + update cosco_supplier_qualifications set del_flag = 'deleted' + where supplier_id = #{supplierId}