Commit 57378487 authored by gary's avatar gary

1、其他信息补充日志

// todo
1、机构国际化修改
parent 95d03507
...@@ -43,7 +43,13 @@ public enum OperationModule { ...@@ -43,7 +43,13 @@ public enum OperationModule {
Workflow(32), Workflow(32),
Stock(33), Stock(33),
/** 股权变更 */ /** 股权变更 */
ChangeEquity(34); ChangeEquity(34),
OrganizationInvoice(35),
OrganizationAccountingRate(36),
OrganizationReturnRate(37),
OrganizationApprovedLevyInfo(38),
OrganizationTaxOfficer(39),
OrganizationTaxRule(40);
private int value; private int value;
......
...@@ -16,6 +16,32 @@ public class LogMessage { ...@@ -16,6 +16,32 @@ public class LogMessage {
public static final String AddOrganization = "AddOrganization"; public static final String AddOrganization = "AddOrganization";
public static final String UpdateOrganization = "UpdateOrganization"; public static final String UpdateOrganization = "UpdateOrganization";
public static final String AddOrganizationInvoice = "AddOrganizationInvoice";
public static final String UpdateOrganizationInvoice = "UpdateOrganizationInvoice";
public static final String DeleteOrganizationInvoice = "DeleteOrganizationInvoice";
public static final String AddOrganizationAccountingRate = "AddOrganizationAccountingRate";
public static final String UpdateOrganizationAccountingRate = "UpdateOrganizationAccountingRate";
public static final String DeleteOrganizationAccountingRate = "DeleteOrganizationAccountingRate";
public static final String AddOrganizationReturnRate = "AddOrganizationReturnRate";
public static final String UpdateOrganizationReturnRate = "UpdateOrganizationReturnRate";
public static final String DeleteOrganizationReturnRate = "DeleteOrganizationReturnRate";
public static final String AddOrganizationApprovedLevyInfo = "AddOrganizationApprovedLevyInfo";
public static final String UpdateOrganizationApprovedLevyInfo = "UpdateOrganizationApprovedLevyInfo";
public static final String DeleteOrganizationApprovedLevyInfo = "DeleteOrganizationApprovedLevyInfo";
public static final String AddOrganizationTaxOfficer = "AddOrganizationTaxOfficer";
public static final String UpdateOrganizationTaxOfficer = "UpdateOrganizationTaxOfficer";
public static final String DeleteOrganizationTaxOfficer = "DeleteOrganizationTaxOfficer";
public static final String AddOrganizationTaxRule = "AddOrganizationTaxRule";
public static final String UpdateOrganizationTaxRule = "UpdateOrganizationTaxRule";
public static final String DeleteOrganizationTaxRule = "DeleteOrganizationTaxRule";
public static final String AddProject = "AddProject"; public static final String AddProject = "AddProject";
public static final String AddProjectServiceType = "AddProjectServiceType"; public static final String AddProjectServiceType = "AddProjectServiceType";
public static final String ProjectServiceType = "ProjectServiceType"; public static final String ProjectServiceType = "ProjectServiceType";
......
...@@ -5,41 +5,41 @@ import org.springframework.http.MediaType; ...@@ -5,41 +5,41 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.organization.*; import pwc.taxtech.atms.dto.organization.*;
import pwc.taxtech.atms.service.impl.OrgExtraServiceImpl; import pwc.taxtech.atms.service.impl.OrganizationExtraServiceImpl;
import java.util.List; import java.util.List;
@RestController @RestController
@RequestMapping("/api/v1/orgExtra") @RequestMapping("/api/v1/orgExtra")
public class OrgExtraController { public class OrganizationExtraController {
@Autowired @Autowired
private OrgExtraServiceImpl orgExtraServiceImpl; private OrganizationExtraServiceImpl organizationExtraServiceImpl;
// 机构其他信息-发票信息 // 机构其他信息-发票信息
@RequestMapping(value = "invoice/getListByOrgId", method = RequestMethod.GET) @RequestMapping(value = "invoice/getListByOrgId", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<OrganizationInvoiceDto> getInvoiceListByOrgId(@RequestParam("orgId") String orgId) { List<OrganizationInvoiceDto> getInvoiceListByOrgId(@RequestParam("orgId") String orgId) {
return orgExtraServiceImpl.getInvoiceListByOrgId(orgId); return organizationExtraServiceImpl.getInvoiceListByOrgId(orgId);
} }
@RequestMapping(value = "invoice/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "invoice/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> insertInvoice(@RequestBody List<OrganizationInvoiceDto> organizationInvoiceDtos) { OperationResultDto<Object> insertInvoice(@RequestBody List<OrganizationInvoiceDto> organizationInvoiceDtos) {
return orgExtraServiceImpl.insertAllInvoice(organizationInvoiceDtos); return organizationExtraServiceImpl.insertAllInvoice(organizationInvoiceDtos);
} }
@RequestMapping(value = "invoice/update", method = RequestMethod.POST) @RequestMapping(value = "invoice/update", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> updateInvoice(@RequestBody OrganizationInvoiceDto organizationInvoiceDto) { OperationResultDto<Object> updateInvoice(@RequestBody OrganizationInvoiceDto organizationInvoiceDto) {
return orgExtraServiceImpl.updateInvoice(organizationInvoiceDto); return organizationExtraServiceImpl.updateInvoice(organizationInvoiceDto);
} }
@RequestMapping(value = "invoice/delete", method = RequestMethod.POST) @RequestMapping(value = "invoice/delete", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> deleteInvoice(@RequestParam Long id) { OperationResultDto<Object> deleteInvoice(@RequestParam Long id) {
return orgExtraServiceImpl.deleteInvoice(id); return organizationExtraServiceImpl.deleteInvoice(id);
} }
// 机构其他信息-税种信息 // 机构其他信息-税种信息
...@@ -47,25 +47,25 @@ public class OrgExtraController { ...@@ -47,25 +47,25 @@ public class OrgExtraController {
@RequestMapping(value = "taxRule/getListByOrgId", method = RequestMethod.GET) @RequestMapping(value = "taxRule/getListByOrgId", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<OrganizationTaxRuleDto> getTaxRuleListByOrgId(@RequestParam("orgId") String orgId) { List<OrganizationTaxRuleDto> getTaxRuleListByOrgId(@RequestParam("orgId") String orgId) {
return orgExtraServiceImpl.getTaxRuleListByOrgId(orgId); return organizationExtraServiceImpl.getTaxRuleListByOrgId(orgId);
} }
@RequestMapping(value = "taxRule/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "taxRule/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> insertTaxRule(@RequestBody List<OrganizationTaxRuleDto> organizationTaxRuleDtos) { OperationResultDto<Object> insertTaxRule(@RequestBody List<OrganizationTaxRuleDto> organizationTaxRuleDtos) {
return orgExtraServiceImpl.insertAllTaxRule(organizationTaxRuleDtos); return organizationExtraServiceImpl.insertAllTaxRule(organizationTaxRuleDtos);
} }
@RequestMapping(value = "taxRule/update", method = RequestMethod.POST) @RequestMapping(value = "taxRule/update", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> updateTaxRule(@RequestBody OrganizationTaxRuleDto organizationTaxRuleDto) { OperationResultDto<Object> updateTaxRule(@RequestBody OrganizationTaxRuleDto organizationTaxRuleDto) {
return orgExtraServiceImpl.updateTaxRule(organizationTaxRuleDto); return organizationExtraServiceImpl.updateTaxRule(organizationTaxRuleDto);
} }
@RequestMapping(value = "taxRule/delete", method = RequestMethod.GET) @RequestMapping(value = "taxRule/delete", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> deleteTaxRule(@RequestParam Long id) { OperationResultDto<Object> deleteTaxRule(@RequestParam Long id) {
return orgExtraServiceImpl.deleteTaxRule(id); return organizationExtraServiceImpl.deleteTaxRule(id);
} }
// 机构其他信息-入账汇率信息 // 机构其他信息-入账汇率信息
...@@ -73,25 +73,25 @@ public class OrgExtraController { ...@@ -73,25 +73,25 @@ public class OrgExtraController {
@RequestMapping(value = "accountingRate/getListByOrgId", method = RequestMethod.GET) @RequestMapping(value = "accountingRate/getListByOrgId", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<OrganizationAccountingRateDto> getAccountingRateListByOrgId(@RequestParam("orgId") String orgId) { List<OrganizationAccountingRateDto> getAccountingRateListByOrgId(@RequestParam("orgId") String orgId) {
return orgExtraServiceImpl.getAccountingRateListByOrgId(orgId); return organizationExtraServiceImpl.getAccountingRateListByOrgId(orgId);
} }
@RequestMapping(value = "accountingRate/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "accountingRate/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> insertAccountingRate(@RequestBody List<OrganizationAccountingRateDto> organizationAccountingRateDtos) { OperationResultDto<Object> insertAccountingRate(@RequestBody List<OrganizationAccountingRateDto> organizationAccountingRateDtos) {
return orgExtraServiceImpl.insertAllAccountingRate(organizationAccountingRateDtos); return organizationExtraServiceImpl.insertAllAccountingRate(organizationAccountingRateDtos);
} }
@RequestMapping(value = "accountingRate/update", method = RequestMethod.POST) @RequestMapping(value = "accountingRate/update", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> updateAccountingRate(@RequestBody OrganizationAccountingRateDto organizationAccountingRateDto) { OperationResultDto<Object> updateAccountingRate(@RequestBody OrganizationAccountingRateDto organizationAccountingRateDto) {
return orgExtraServiceImpl.updateAccountingRate(organizationAccountingRateDto); return organizationExtraServiceImpl.updateAccountingRate(organizationAccountingRateDto);
} }
@RequestMapping(value = "accountingRate/delete", method = RequestMethod.GET) @RequestMapping(value = "accountingRate/delete", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> deleteAccountingRate(@RequestParam Long id) { OperationResultDto<Object> deleteAccountingRate(@RequestParam Long id) {
return orgExtraServiceImpl.deleteAccountingRate(id); return organizationExtraServiceImpl.deleteAccountingRate(id);
} }
// 机构其他信息-返还率信息 // 机构其他信息-返还率信息
...@@ -99,25 +99,25 @@ public class OrgExtraController { ...@@ -99,25 +99,25 @@ public class OrgExtraController {
@RequestMapping(value = "returnRate/getListByOrgId", method = RequestMethod.GET) @RequestMapping(value = "returnRate/getListByOrgId", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<OrganizationReturnRateDto> getReturnRateListByOrgId(@RequestParam("orgId") String orgId) { List<OrganizationReturnRateDto> getReturnRateListByOrgId(@RequestParam("orgId") String orgId) {
return orgExtraServiceImpl.getReturnRateListByOrgId(orgId); return organizationExtraServiceImpl.getReturnRateListByOrgId(orgId);
} }
@RequestMapping(value = "returnRate/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "returnRate/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> insertReturnRate(@RequestBody List<OrganizationReturnRateDto> organizationReturnRateDtos) { OperationResultDto<Object> insertReturnRate(@RequestBody List<OrganizationReturnRateDto> organizationReturnRateDtos) {
return orgExtraServiceImpl.insertAllReturnRate(organizationReturnRateDtos); return organizationExtraServiceImpl.insertAllReturnRate(organizationReturnRateDtos);
} }
@RequestMapping(value = "returnRate/update", method = RequestMethod.POST) @RequestMapping(value = "returnRate/update", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> updateReturnRate(@RequestBody OrganizationReturnRateDto organizationReturnRateDto) { OperationResultDto<Object> updateReturnRate(@RequestBody OrganizationReturnRateDto organizationReturnRateDto) {
return orgExtraServiceImpl.updateReturnRate(organizationReturnRateDto); return organizationExtraServiceImpl.updateReturnRate(organizationReturnRateDto);
} }
@RequestMapping(value = "returnRate/delete", method = RequestMethod.GET) @RequestMapping(value = "returnRate/delete", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> deleteReturnRate(@RequestParam Long id) { OperationResultDto<Object> deleteReturnRate(@RequestParam Long id) {
return orgExtraServiceImpl.deleteReturnRate(id); return organizationExtraServiceImpl.deleteReturnRate(id);
} }
// 机构其他信息-核定征收信息 // 机构其他信息-核定征收信息
...@@ -125,25 +125,25 @@ public class OrgExtraController { ...@@ -125,25 +125,25 @@ public class OrgExtraController {
@RequestMapping(value = "approvedLevyInfo/getListByOrgId", method = RequestMethod.GET) @RequestMapping(value = "approvedLevyInfo/getListByOrgId", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<OrganizationApprovedLevyInfoDto> getApprovedLevyInfoListByOrgId(@RequestParam("orgId") String orgId) { List<OrganizationApprovedLevyInfoDto> getApprovedLevyInfoListByOrgId(@RequestParam("orgId") String orgId) {
return orgExtraServiceImpl.getApprovedLevyInfoListByOrgId(orgId); return organizationExtraServiceImpl.getApprovedLevyInfoListByOrgId(orgId);
} }
@RequestMapping(value = "approvedLevyInfo/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "approvedLevyInfo/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> insertApprovedLevyInfo(@RequestBody List<OrganizationApprovedLevyInfoDto> organizationApprovedLevyInfoDtos) { OperationResultDto<Object> insertApprovedLevyInfo(@RequestBody List<OrganizationApprovedLevyInfoDto> organizationApprovedLevyInfoDtos) {
return orgExtraServiceImpl.insertAllApprovedLevyInfo(organizationApprovedLevyInfoDtos); return organizationExtraServiceImpl.insertAllApprovedLevyInfo(organizationApprovedLevyInfoDtos);
} }
@RequestMapping(value = "approvedLevyInfo/update", method = RequestMethod.POST) @RequestMapping(value = "approvedLevyInfo/update", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> updateApprovedLevyInfo(@RequestBody OrganizationApprovedLevyInfoDto organizationApprovedLevyInfoDto) { OperationResultDto<Object> updateApprovedLevyInfo(@RequestBody OrganizationApprovedLevyInfoDto organizationApprovedLevyInfoDto) {
return orgExtraServiceImpl.updateApprovedLevyInfo(organizationApprovedLevyInfoDto); return organizationExtraServiceImpl.updateApprovedLevyInfo(organizationApprovedLevyInfoDto);
} }
@RequestMapping(value = "approvedLevyInfo/delete", method = RequestMethod.GET) @RequestMapping(value = "approvedLevyInfo/delete", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> deleteApprovedLevyInfo(@RequestParam Long id) { OperationResultDto<Object> deleteApprovedLevyInfo(@RequestParam Long id) {
return orgExtraServiceImpl.deleteApprovedLevyInfo(id); return organizationExtraServiceImpl.deleteApprovedLevyInfo(id);
} }
// 机构其他信息-专管员列表 // 机构其他信息-专管员列表
...@@ -151,25 +151,25 @@ public class OrgExtraController { ...@@ -151,25 +151,25 @@ public class OrgExtraController {
@RequestMapping(value = "taxOfficer/getListByOrgId", method = RequestMethod.GET) @RequestMapping(value = "taxOfficer/getListByOrgId", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<OrganizationTaxOfficerDto> getTaxOfficerListByOrgId(@RequestParam("orgId") String orgId) { List<OrganizationTaxOfficerDto> getTaxOfficerListByOrgId(@RequestParam("orgId") String orgId) {
return orgExtraServiceImpl.getTaxOfficerListByOrgId(orgId); return organizationExtraServiceImpl.getTaxOfficerListByOrgId(orgId);
} }
@RequestMapping(value = "taxOfficer/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "taxOfficer/insert", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> insertTaxOfficer(@RequestBody List<OrganizationTaxOfficerDto> organizationTaxOfficerDtos) { OperationResultDto<Object> insertTaxOfficer(@RequestBody List<OrganizationTaxOfficerDto> organizationTaxOfficerDtos) {
return orgExtraServiceImpl.insertAllTaxOfficer(organizationTaxOfficerDtos); return organizationExtraServiceImpl.insertAllTaxOfficer(organizationTaxOfficerDtos);
} }
@RequestMapping(value = "taxOfficer/update", method = RequestMethod.POST) @RequestMapping(value = "taxOfficer/update", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> updateTaxOfficer(@RequestBody OrganizationTaxOfficerDto organizationTaxOfficerDto) { OperationResultDto<Object> updateTaxOfficer(@RequestBody OrganizationTaxOfficerDto organizationTaxOfficerDto) {
return orgExtraServiceImpl.updateTaxOfficer(organizationTaxOfficerDto); return organizationExtraServiceImpl.updateTaxOfficer(organizationTaxOfficerDto);
} }
@RequestMapping(value = "taxOfficer/delete", method = RequestMethod.GET) @RequestMapping(value = "taxOfficer/delete", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
OperationResultDto<Object> deleteTaxOfficer(@RequestParam Long id) { OperationResultDto<Object> deleteTaxOfficer(@RequestParam Long id) {
return orgExtraServiceImpl.deleteTaxOfficer(id); return organizationExtraServiceImpl.deleteTaxOfficer(id);
} }
} }
...@@ -2,33 +2,38 @@ package pwc.taxtech.atms.service.impl; ...@@ -2,33 +2,38 @@ package pwc.taxtech.atms.service.impl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.OperateLogType;
import pwc.taxtech.atms.common.OperationAction;
import pwc.taxtech.atms.common.OperationModule;
import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.dao.*; import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dto.OperationLogDto;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.organization.*; import pwc.taxtech.atms.dto.organization.*;
import pwc.taxtech.atms.entity.*; import pwc.taxtech.atms.entity.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@Service @Service
public class OrgExtraServiceImpl extends BaseService{ public class OrganizationExtraServiceImpl extends BaseService{
@Autowired
private OperationLogServiceImpl operationLogServiceImpl;
@Autowired @Autowired
private OrganizationInvoiceMapper organizationInvoiceMapper; private OrganizationInvoiceMapper organizationInvoiceMapper;
@Autowired @Autowired
private OrganizationAccountingRateMapper organizationAccountingRateMapper; private OrganizationAccountingRateMapper organizationAccountingRateMapper;
@Autowired @Autowired
private OrganizationReturnRateMapper organizationReturnRateMapper; private OrganizationReturnRateMapper organizationReturnRateMapper;
@Autowired @Autowired
private OrganizationApprovedLevyInfoMapper organizationApprovedLevyInfoMapper; private OrganizationApprovedLevyInfoMapper organizationApprovedLevyInfoMapper;
@Autowired @Autowired
private OrganizationTaxOfficerMapper organizationTaxOfficerMapper; private OrganizationTaxOfficerMapper organizationTaxOfficerMapper;
@Autowired @Autowired
private OrganizationTaxRuleMapper organizationTaxRuleMapper; private OrganizationTaxRuleMapper organizationTaxRuleMapper;
public List<OrganizationInvoiceDto> getInvoiceListByOrgId(String orgId) { public List<OrganizationInvoiceDto> getInvoiceListByOrgId(String orgId) {
List<OrganizationInvoiceDto> res = new ArrayList<>(); List<OrganizationInvoiceDto> res = new ArrayList<>();
OrganizationInvoiceExample example = new OrganizationInvoiceExample(); OrganizationInvoiceExample example = new OrganizationInvoiceExample();
...@@ -43,12 +48,15 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -43,12 +48,15 @@ public class OrgExtraServiceImpl extends BaseService{
} }
public OperationResultDto<Object> insertAllInvoice(List<OrganizationInvoiceDto> organizationInvoiceDtos) { public OperationResultDto<Object> insertAllInvoice(List<OrganizationInvoiceDto> organizationInvoiceDtos) {
List<String> taxGroupList = new ArrayList<>();
organizationInvoiceDtos.forEach(oid->{ organizationInvoiceDtos.forEach(oid->{
OrganizationInvoice organizationInvoice = new OrganizationInvoice(); OrganizationInvoice organizationInvoice = new OrganizationInvoice();
beanUtil.copyProperties(oid,organizationInvoice); beanUtil.copyProperties(oid,organizationInvoice);
organizationInvoice.setId(idService.nextId()); organizationInvoice.setId(idService.nextId());
organizationInvoiceMapper.insertSelective(organizationInvoice); organizationInvoiceMapper.insertSelective(organizationInvoice);
taxGroupList.add(oid.getInvoiceTypeName());
}); });
AddOrgExtraLog(OperationAction.New.value(),LogMessage.AddOrganizationInvoice,organizationInvoiceDtos.get(0).getOrganizationId(),OperationModule.OrganizationInvoice.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -58,6 +66,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -58,6 +66,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationInvoice organizationInvoice = new OrganizationInvoice(); OrganizationInvoice organizationInvoice = new OrganizationInvoice();
beanUtil.copyProperties(organizationInvoiceDto,organizationInvoice); beanUtil.copyProperties(organizationInvoiceDto,organizationInvoice);
organizationInvoiceMapper.updateByExampleSelective(organizationInvoice,example); organizationInvoiceMapper.updateByExampleSelective(organizationInvoice,example);
AddOrgExtraLog(OperationAction.Update.value(),LogMessage.UpdateOrganizationInvoice,organizationInvoiceDto.getOrganizationId(),OperationModule.OrganizationInvoice.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -65,6 +74,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -65,6 +74,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationInvoiceExample example = new OrganizationInvoiceExample(); OrganizationInvoiceExample example = new OrganizationInvoiceExample();
example.createCriteria().andIdEqualTo(id); example.createCriteria().andIdEqualTo(id);
organizationInvoiceMapper.deleteByExample(example); organizationInvoiceMapper.deleteByExample(example);
AddOrgExtraLog(OperationAction.Delete.value(),LogMessage.DeleteOrganizationInvoice,String.valueOf(id),OperationModule.OrganizationInvoice.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -89,6 +99,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -89,6 +99,7 @@ public class OrgExtraServiceImpl extends BaseService{
organizationAccountingRate.setId(idService.nextId()); organizationAccountingRate.setId(idService.nextId());
organizationAccountingRateMapper.insertSelective(organizationAccountingRate); organizationAccountingRateMapper.insertSelective(organizationAccountingRate);
}); });
AddOrgExtraLog(OperationAction.New.value(),LogMessage.AddOrganizationAccountingRate,organizationAccountingRateDtos.get(0).getOrganizationId(),OperationModule.OrganizationAccountingRate.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -98,6 +109,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -98,6 +109,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationAccountingRate organizationAccountingRate = new OrganizationAccountingRate(); OrganizationAccountingRate organizationAccountingRate = new OrganizationAccountingRate();
beanUtil.copyProperties(organizationAccountingRateDto,organizationAccountingRate); beanUtil.copyProperties(organizationAccountingRateDto,organizationAccountingRate);
organizationAccountingRateMapper.updateByExampleSelective(organizationAccountingRate,example); organizationAccountingRateMapper.updateByExampleSelective(organizationAccountingRate,example);
AddOrgExtraLog(OperationAction.Update.value(),LogMessage.UpdateOrganizationAccountingRate,organizationAccountingRateDto.getOrganizationId(),OperationModule.OrganizationAccountingRate.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -105,6 +117,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -105,6 +117,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationAccountingRateExample example = new OrganizationAccountingRateExample(); OrganizationAccountingRateExample example = new OrganizationAccountingRateExample();
example.createCriteria().andIdEqualTo(id); example.createCriteria().andIdEqualTo(id);
organizationAccountingRateMapper.deleteByExample(example); organizationAccountingRateMapper.deleteByExample(example);
AddOrgExtraLog(OperationAction.Delete.value(),LogMessage.DeleteOrganizationAccountingRate,String.valueOf(id),OperationModule.OrganizationAccountingRate.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -129,6 +142,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -129,6 +142,7 @@ public class OrgExtraServiceImpl extends BaseService{
organizationReturnRate.setId(idService.nextId()); organizationReturnRate.setId(idService.nextId());
organizationReturnRateMapper.insertSelective(organizationReturnRate); organizationReturnRateMapper.insertSelective(organizationReturnRate);
}); });
AddOrgExtraLog(OperationAction.New.value(),LogMessage.AddOrganizationReturnRate,organizationReturnRateDtos.get(0).getOrganizationId(),OperationModule.OrganizationReturnRate.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -138,6 +152,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -138,6 +152,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationReturnRate organizationReturnRate = new OrganizationReturnRate(); OrganizationReturnRate organizationReturnRate = new OrganizationReturnRate();
beanUtil.copyProperties(organizationReturnRateDto,organizationReturnRate); beanUtil.copyProperties(organizationReturnRateDto,organizationReturnRate);
organizationReturnRateMapper.updateByExampleSelective(organizationReturnRate,example); organizationReturnRateMapper.updateByExampleSelective(organizationReturnRate,example);
AddOrgExtraLog(OperationAction.Update.value(),LogMessage.UpdateOrganizationReturnRate,organizationReturnRateDto.getOrganizationId(),OperationModule.OrganizationReturnRate.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -145,6 +160,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -145,6 +160,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationReturnRateExample example = new OrganizationReturnRateExample(); OrganizationReturnRateExample example = new OrganizationReturnRateExample();
example.createCriteria().andIdEqualTo(id); example.createCriteria().andIdEqualTo(id);
organizationReturnRateMapper.deleteByExample(example); organizationReturnRateMapper.deleteByExample(example);
AddOrgExtraLog(OperationAction.Delete.value(),LogMessage.DeleteOrganizationReturnRate,String.valueOf(id),OperationModule.OrganizationReturnRate.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -169,6 +185,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -169,6 +185,7 @@ public class OrgExtraServiceImpl extends BaseService{
organizationApprovedLevyInfo.setId(idService.nextId()); organizationApprovedLevyInfo.setId(idService.nextId());
organizationApprovedLevyInfoMapper.insertSelective(organizationApprovedLevyInfo); organizationApprovedLevyInfoMapper.insertSelective(organizationApprovedLevyInfo);
}); });
AddOrgExtraLog(OperationAction.New.value(),LogMessage.AddOrganizationApprovedLevyInfo,organizationApprovedLevyInfoDtos.get(0).getOrganizationId(),OperationModule.OrganizationApprovedLevyInfo.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -178,6 +195,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -178,6 +195,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationApprovedLevyInfo organizationApprovedLevyInfo = new OrganizationApprovedLevyInfo(); OrganizationApprovedLevyInfo organizationApprovedLevyInfo = new OrganizationApprovedLevyInfo();
beanUtil.copyProperties(organizationApprovedLevyInfoDto,organizationApprovedLevyInfo); beanUtil.copyProperties(organizationApprovedLevyInfoDto,organizationApprovedLevyInfo);
organizationApprovedLevyInfoMapper.updateByExampleSelective(organizationApprovedLevyInfo,example); organizationApprovedLevyInfoMapper.updateByExampleSelective(organizationApprovedLevyInfo,example);
AddOrgExtraLog(OperationAction.Update.value(),LogMessage.UpdateOrganizationApprovedLevyInfo,organizationApprovedLevyInfoDto.getOrganizationId(),OperationModule.OrganizationApprovedLevyInfo.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -185,6 +203,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -185,6 +203,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationApprovedLevyInfoExample example = new OrganizationApprovedLevyInfoExample(); OrganizationApprovedLevyInfoExample example = new OrganizationApprovedLevyInfoExample();
example.createCriteria().andIdEqualTo(id); example.createCriteria().andIdEqualTo(id);
organizationApprovedLevyInfoMapper.deleteByExample(example); organizationApprovedLevyInfoMapper.deleteByExample(example);
AddOrgExtraLog(OperationAction.Delete.value(),LogMessage.DeleteOrganizationApprovedLevyInfo,String.valueOf(id),OperationModule.OrganizationApprovedLevyInfo.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -209,6 +228,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -209,6 +228,7 @@ public class OrgExtraServiceImpl extends BaseService{
organizationTaxOfficer.setId(idService.nextId()); organizationTaxOfficer.setId(idService.nextId());
organizationTaxOfficerMapper.insertSelective(organizationTaxOfficer); organizationTaxOfficerMapper.insertSelective(organizationTaxOfficer);
}); });
AddOrgExtraLog(OperationAction.New.value(),LogMessage.AddOrganizationTaxOfficer,organizationTaxOfficerDtos.get(0).getOrganizationId(),OperationModule.OrganizationTaxOfficer.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -218,6 +238,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -218,6 +238,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationTaxOfficer organizationTaxOfficer = new OrganizationTaxOfficer(); OrganizationTaxOfficer organizationTaxOfficer = new OrganizationTaxOfficer();
beanUtil.copyProperties(organizationTaxOfficerDto,organizationTaxOfficer); beanUtil.copyProperties(organizationTaxOfficerDto,organizationTaxOfficer);
organizationTaxOfficerMapper.updateByExampleSelective(organizationTaxOfficer,example); organizationTaxOfficerMapper.updateByExampleSelective(organizationTaxOfficer,example);
AddOrgExtraLog(OperationAction.Update.value(),LogMessage.UpdateOrganizationTaxOfficer,organizationTaxOfficerDto.getOrganizationId(),OperationModule.OrganizationTaxOfficer.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -225,6 +246,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -225,6 +246,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationTaxOfficerExample example = new OrganizationTaxOfficerExample(); OrganizationTaxOfficerExample example = new OrganizationTaxOfficerExample();
example.createCriteria().andIdEqualTo(id); example.createCriteria().andIdEqualTo(id);
organizationTaxOfficerMapper.deleteByExample(example); organizationTaxOfficerMapper.deleteByExample(example);
AddOrgExtraLog(OperationAction.Delete.value(),LogMessage.DeleteOrganizationTaxOfficer,String.valueOf(id),OperationModule.OrganizationTaxOfficer.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -249,6 +271,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -249,6 +271,7 @@ public class OrgExtraServiceImpl extends BaseService{
organizationTaxRule.setId(idService.nextId()); organizationTaxRule.setId(idService.nextId());
organizationTaxRuleMapper.insertSelective(organizationTaxRule); organizationTaxRuleMapper.insertSelective(organizationTaxRule);
}); });
AddOrgExtraLog(OperationAction.New.value(),LogMessage.AddOrganizationTaxRule,organizationTaxRuleDtos.get(0).getOrganizationId(),OperationModule.OrganizationTaxRule.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -258,6 +281,7 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -258,6 +281,7 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationTaxRule organizationTaxRule = new OrganizationTaxRule(); OrganizationTaxRule organizationTaxRule = new OrganizationTaxRule();
beanUtil.copyProperties(organizationTaxRuleDto,organizationTaxRule); beanUtil.copyProperties(organizationTaxRuleDto,organizationTaxRule);
organizationTaxRuleMapper.updateByExampleSelective(organizationTaxRule,example); organizationTaxRuleMapper.updateByExampleSelective(organizationTaxRule,example);
AddOrgExtraLog(OperationAction.Update.value(),LogMessage.UpdateOrganizationTaxRule,organizationTaxRuleDto.getOrganizationId(),OperationModule.OrganizationTaxRule.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
...@@ -265,6 +289,29 @@ public class OrgExtraServiceImpl extends BaseService{ ...@@ -265,6 +289,29 @@ public class OrgExtraServiceImpl extends BaseService{
OrganizationTaxRuleExample example = new OrganizationTaxRuleExample(); OrganizationTaxRuleExample example = new OrganizationTaxRuleExample();
example.createCriteria().andIdEqualTo(id); example.createCriteria().andIdEqualTo(id);
organizationTaxRuleMapper.deleteByExample(example); organizationTaxRuleMapper.deleteByExample(example);
AddOrgExtraLog(OperationAction.Delete.value(),LogMessage.DeleteOrganizationTaxRule,String.valueOf(id),OperationModule.OrganizationTaxRule.value());
return new OperationResultDto(true); return new OperationResultDto(true);
} }
/**
* 24/01/2019 10:41
* [增删改查,操作描述,操作对象,操作模块]
* [actionValue, content, object, module]
* @author Gary J Li
* @return
*/
private void AddOrgExtraLog(int actionValue,String content,String object,Integer module) {
OperationLogDto opLog = new OperationLogDto();
opLog.setAction(actionValue);
opLog.setOperationContent(content);
opLog.setOperationObject(object);
opLog.setOriginalState("");
opLog.setUpdateState("");
opLog.setIp("");
opLog.setModule(module);
opLog.setComment("");
opLog.setLogType(OperateLogType.OperationLogOrganization.value());
operationLogService.addOperationLog(opLog);
}
} }
...@@ -4,11 +4,13 @@ import java.util.List; ...@@ -4,11 +4,13 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import pwc.taxtech.atms.MyMapper; import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.OrganizationReturnRate; import pwc.taxtech.atms.entity.OrganizationReturnRate;
import pwc.taxtech.atms.entity.OrganizationReturnRateExample; import pwc.taxtech.atms.entity.OrganizationReturnRateExample;
@Mapper @Mapper
@Repository
public interface OrganizationReturnRateMapper extends MyMapper { public interface OrganizationReturnRateMapper extends MyMapper {
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment