南歧nc65对接
This commit is contained in:
+65
@@ -0,0 +1,65 @@
|
||||
package com.linke.finance.interfaces.assemble.ncLog;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.linke.finance.domain.ncLog.repository.todo.NcLogDO;
|
||||
import com.linke.finance.interfaces.dto.ncLog.NcLogDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@Component
|
||||
public class NcLogAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public NcLogDO toDO(NcLogDTO ncLogDTO) {
|
||||
NcLogDO ncLogDO = new NcLogDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(ncLogDTO, ncLogDO, IgnoreNullUtil.getNullPropertyNames(ncLogDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(ncLogDTO.getNcLogId() != null){
|
||||
if(userId != null){
|
||||
ncLogDO.setUpdateBy(userId);
|
||||
}else {
|
||||
ncLogDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
ncLogDO.setUpdateByName(userName);
|
||||
ncLogDO.setUpdateTime(new Date());
|
||||
|
||||
}else {
|
||||
if(userId != null){
|
||||
ncLogDO.setCreateBy(userId);
|
||||
ncLogDO.setUpdateBy(userId);
|
||||
}else {
|
||||
ncLogDO.setCreateBy(new Long("0"));
|
||||
ncLogDO.setUpdateBy(new Long("0"));
|
||||
}
|
||||
ncLogDO.setCreateByName(userName);
|
||||
ncLogDO.setUpdateByName(userName);
|
||||
ncLogDO.setCreateTime(new Date());
|
||||
ncLogDO.setUpdateTime(new Date());
|
||||
ncLogDO.setDelFlag(1);
|
||||
}
|
||||
return ncLogDO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.linke.finance.interfaces.dto.ncLog;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 nc_log
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class NcLogDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("nc日志id")
|
||||
private Long ncLogId;
|
||||
|
||||
@ApiModelProperty("类型 0-应收单 1-收款单")
|
||||
@Excel(name = "类型 0-应收单 1-收款单")
|
||||
private Long type;
|
||||
|
||||
@ApiModelProperty("数据源id")
|
||||
@Excel(name = "数据源id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("请求报文")
|
||||
@Excel(name = "请求报文")
|
||||
private String requestBody;
|
||||
|
||||
@ApiModelProperty("请求报文")
|
||||
@Excel(name = "请求报文")
|
||||
private String responeBody;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
@Excel(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("一级组织ID")
|
||||
@Excel(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.linke.finance.interfaces.facade.ncLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.linke.finance.interfaces.dto.ncLog.NcLogDTO;
|
||||
import com.linke.finance.domain.ncLog.repository.todo.NcLogDO;
|
||||
import com.linke.finance.domain.ncLog.repository.po.NcLogPO;
|
||||
import com.linke.finance.application.server.ncLog.NcLogApplicationService;
|
||||
import com.linke.finance.interfaces.assemble.ncLog.NcLogAssembler;
|
||||
import javax.annotation.Resource;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ncLogApi")
|
||||
public class NcLogApi extends BaseController{
|
||||
@Autowired
|
||||
private NcLogApplicationService ncLogApplicationService;
|
||||
|
||||
@Resource
|
||||
private NcLogAssembler ncLogAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询【请填写功能名称】列表
|
||||
*/
|
||||
@ApiOperation("查询【请填写功能名称】列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(NcLogDTO ncLogDTO)
|
||||
{
|
||||
//转换实体
|
||||
NcLogDO ncLogDO = ncLogAssembler.toDO(ncLogDTO);
|
||||
startPage();
|
||||
List<NcLogPO> list = ncLogApplicationService.queryList(ncLogDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑【请填写功能名称】
|
||||
*/
|
||||
@ApiOperation("编辑【请填写功能名称】")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody NcLogDTO ncLogDTO)
|
||||
{
|
||||
//转换实体
|
||||
NcLogDO ncLogDO = ncLogAssembler.toDO(ncLogDTO);
|
||||
if(ncLogDTO.getNcLogId() != null){
|
||||
return toAjax(ncLogApplicationService.update(ncLogDO));
|
||||
}else {
|
||||
return toAjax(ncLogApplicationService.insert(ncLogDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*/
|
||||
@ApiOperation("批量删除【请填写功能名称】")
|
||||
@DeleteMapping("/deleteByIds/{ncLogIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] ncLogIds)
|
||||
{
|
||||
return toAjax(ncLogApplicationService.delete(ncLogIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*/
|
||||
@ApiOperation("获取【请填写功能名称】")
|
||||
@GetMapping(value = "/getInfo/{ncLogId}")
|
||||
public AjaxResult getInfo(@PathVariable("ncLogId") Long ncLogId)
|
||||
{
|
||||
return AjaxResult.success(ncLogApplicationService.getInfo(ncLogId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+14
-3
@@ -265,14 +265,25 @@ public class ReconciliationApi extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* 应收账单同步用户nc65
|
||||
* 应收账单应收单同步用户nc65
|
||||
*/
|
||||
@Log(title = "应收账单同步用户nc65", description = "应收账单同步用户nc65", businessType = BusinessType.OTHER)
|
||||
@ApiOperation("应收账单同步用户nc65")
|
||||
@Log(title = "应收账单应收单同步用户nc65", description = "应收账单应收单同步用户nc65", businessType = BusinessType.OTHER)
|
||||
@ApiOperation("应收账单应收单同步用户nc65")
|
||||
@GetMapping(value = "/synchronousNc")
|
||||
public AjaxResult synchronousNc(@RequestParam(name="reconciliationId") String reconciliationId)
|
||||
{
|
||||
return AjaxResult.success(reconciliationApplicationService.synchronousNc(reconciliationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 应收账单收款单同步用户nc65
|
||||
*/
|
||||
@Log(title = "应收账单收款单同步用户nc65", description = "应收账单收款单同步用户nc65", businessType = BusinessType.OTHER)
|
||||
@ApiOperation("应收账单收款单同步用户nc65")
|
||||
@GetMapping(value = "/synchronousNcSK")
|
||||
public AjaxResult synchronousNcSK(@RequestParam(name="reconciliationId") String reconciliationId)
|
||||
{
|
||||
return AjaxResult.success(reconciliationApplicationService.synchronousNcSK(reconciliationId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+12
-3
@@ -22,7 +22,7 @@ import com.mhd.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 收款单Api
|
||||
*
|
||||
*
|
||||
* @author gen
|
||||
* @date 2025-04-28
|
||||
*/
|
||||
@@ -117,11 +117,20 @@ public class TmsReceiptApi extends BaseController{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 收款单同步用友nc65
|
||||
*/
|
||||
@Log(title = "收款单同步用友nc65", description = "收款单同步用友nc65", businessType = BusinessType.OTHER)
|
||||
@ApiOperation("收款单同步用友nc65")
|
||||
@GetMapping(value = "/synchronousNc")
|
||||
public AjaxResult synchronousNc(@RequestParam(name="ids") String ids)
|
||||
{
|
||||
return AjaxResult.success(tmsReceiptApplicationService.synchronousNc(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user