Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
911af8e99d
|
|
@ -12,22 +12,29 @@ public class DirectApplyDetails extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private int id;
|
private Integer id;
|
||||||
/**
|
/**
|
||||||
* 直转单号
|
* 直转单号
|
||||||
*/
|
*/
|
||||||
private int directId;
|
private Integer directId;
|
||||||
/**
|
/**
|
||||||
* 退料单位协议
|
* 机具类型
|
||||||
*/
|
*/
|
||||||
private int typeId;
|
private Integer typeId;
|
||||||
/**
|
/**
|
||||||
* 退料人
|
* 机具id
|
||||||
*/
|
*/
|
||||||
private int maId;
|
private Integer maId;
|
||||||
/**
|
/**
|
||||||
* 手机号
|
* 直转数量
|
||||||
*/
|
*/
|
||||||
private String directNum;
|
private String directNum;
|
||||||
|
private String typeName;
|
||||||
|
private String kindName;
|
||||||
|
private String modelName;
|
||||||
|
private String maCode;
|
||||||
|
private String unitName;
|
||||||
|
private String useNum;
|
||||||
|
private String companyId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.bonus.sgzb.base.api.domain;
|
||||||
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:梁超
|
* @Author:梁超
|
||||||
* @date:2024/3/4 - 15:17
|
* @date:2024/3/4 - 15:17
|
||||||
|
|
@ -13,7 +15,7 @@ public class DirectApplyInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private int id;
|
private Integer id;
|
||||||
/**
|
/**
|
||||||
* 直转单号(ZZ20240226-1)
|
* 直转单号(ZZ20240226-1)
|
||||||
*/
|
*/
|
||||||
|
|
@ -21,12 +23,16 @@ public class DirectApplyInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 退料单位协议
|
* 退料单位协议
|
||||||
*/
|
*/
|
||||||
private int backAgreementId;
|
private Integer backAgreementId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退料工程id
|
* 退料工程id
|
||||||
*/
|
*/
|
||||||
private String backProId;
|
private String backProId;
|
||||||
|
/**
|
||||||
|
* 关键字
|
||||||
|
*/
|
||||||
|
private String keyWord;
|
||||||
/**
|
/**
|
||||||
* 退料工程名称
|
* 退料工程名称
|
||||||
*/
|
*/
|
||||||
|
|
@ -105,5 +111,24 @@ public class DirectApplyInfo extends BaseEntity {
|
||||||
* 审核备注
|
* 审核备注
|
||||||
*/
|
*/
|
||||||
private String auditRemark;
|
private String auditRemark;
|
||||||
|
/**
|
||||||
|
* 退料单位协议
|
||||||
|
*/
|
||||||
|
private String backAgreementCode;
|
||||||
|
/**
|
||||||
|
* 领料单位协议
|
||||||
|
*/
|
||||||
|
private String leaseAgreementCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料工程id
|
||||||
|
*/
|
||||||
|
private String lotId;
|
||||||
|
/**
|
||||||
|
* 退料单位id
|
||||||
|
*/
|
||||||
|
private String unitId;
|
||||||
|
|
||||||
|
private List<DirectApplyDetails> directApplyDetails;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ public class MaType extends BaseEntity {
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
|
@ -130,6 +131,7 @@ public class MaType extends BaseEntity {
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "更新时间")
|
@ApiModelProperty(value = "更新时间")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
String agreementId = leaseOutDetailsMapper.getAgreementId(taskId);
|
String agreementId = leaseOutDetailsMapper.getAgreementId(taskId);
|
||||||
String protocol = leaseOutDetailsMapper.getProtocol(agreementId);
|
String protocol = leaseOutDetailsMapper.getProtocol(agreementId);
|
||||||
MaType ma = leaseOutDetailsMapper.getMaType(record.getTypeId());
|
MaType ma = leaseOutDetailsMapper.getMaType(record.getTypeId());
|
||||||
if (protocol.isEmpty()) {
|
if (StringUtils.isEmpty(protocol)) {
|
||||||
ma.setFinalPrice(ma.getLeasePrice());
|
ma.setFinalPrice(ma.getLeasePrice());
|
||||||
} else {
|
} else {
|
||||||
if (protocol.equals("1")) {
|
if (protocol.equals("1")) {
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,8 @@ import com.bonus.sgzb.base.api.domain.MaType;
|
||||||
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
||||||
import com.bonus.sgzb.base.mapper.MaTypeMapper;
|
import com.bonus.sgzb.base.mapper.MaTypeMapper;
|
||||||
import com.bonus.sgzb.base.service.ITypeService;
|
import com.bonus.sgzb.base.service.ITypeService;
|
||||||
import com.bonus.sgzb.common.core.constant.HttpStatus;
|
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
|
||||||
import com.bonus.sgzb.common.log.annotation.Log;
|
import com.bonus.sgzb.common.log.annotation.Log;
|
||||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|
@ -17,8 +15,6 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工机具类型管理控制层
|
* 工机具类型管理控制层
|
||||||
|
|
@ -69,7 +65,6 @@ public class MaTypeController extends BaseController {
|
||||||
* @param typeId
|
* @param typeId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ApiOperation(value = "工器具类型")
|
@ApiOperation(value = "工器具类型")
|
||||||
@GetMapping("/equipmentType")
|
@GetMapping("/equipmentType")
|
||||||
public AjaxResult equipmentType(@RequestParam(required = false) Long typeId,
|
public AjaxResult equipmentType(@RequestParam(required = false) Long typeId,
|
||||||
|
|
@ -196,30 +191,30 @@ public class MaTypeController extends BaseController {
|
||||||
return success(listByMaType);
|
return success(listByMaType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *//**
|
/**
|
||||||
* 根据左列表类型id查询右表格
|
* 根据左列表类型id查询右表格
|
||||||
* @param typeId
|
* @param typeId
|
||||||
* @return
|
* @return
|
||||||
*//*
|
*/
|
||||||
@ApiOperation(value = "根据左列表类型id查询右表格")
|
// @ApiOperation(value = "根据左列表类型id查询右表格")
|
||||||
@GetMapping("/getListByMaType")
|
// @GetMapping("/getListByMaType")
|
||||||
public TableDataInfo getListByMaType(@RequestParam(required = false) Long typeId,
|
// public TableDataInfo getListByMaType(@RequestParam(required = false) Long typeId,
|
||||||
@RequestParam(required = false) String typeName,
|
// @RequestParam(required = false) String typeName,
|
||||||
@RequestParam(required = false) Integer pageSize,
|
// @RequestParam(required = false) Integer pageSize,
|
||||||
@RequestParam(required = false) Integer pageNum){
|
// @RequestParam(required = false) Integer pageNum){
|
||||||
if(typeId==null){
|
// if(typeId==null){
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
List<MaType> listByMaType = iTypeService.getListByMaType(typeId, typeName);
|
// List<MaType> listByMaType = iTypeService.getListByMaType(typeId, typeName);
|
||||||
TableDataInfo rspData = new TableDataInfo();
|
// TableDataInfo rspData = new TableDataInfo();
|
||||||
rspData.setTotal(listByMaType.size());
|
// rspData.setTotal(listByMaType.size());
|
||||||
rspData.setCode(HttpStatus.SUCCESS);
|
// rspData.setCode(HttpStatus.SUCCESS);
|
||||||
// listByMaType = listByMaType.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
// // listByMaType = listByMaType.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
||||||
rspData.setRows(listByMaType);
|
// rspData.setRows(listByMaType);
|
||||||
rspData.setMsg("查询成功");
|
// rspData.setMsg("查询成功");
|
||||||
|
//
|
||||||
return rspData;
|
// return rspData;
|
||||||
}*/
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取机具类型管理ma_type详细信息
|
* 获取机具类型管理ma_type详细信息
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,22 @@
|
||||||
package com.bonus.sgzb.material.controller;
|
package com.bonus.sgzb.material.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
|
import com.bonus.sgzb.common.log.annotation.Log;
|
||||||
|
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||||
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
|
||||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.bonus.sgzb.common.log.annotation.Log;
|
|
||||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import java.util.List;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
|
||||||
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购验收任务
|
* 新购验收任务
|
||||||
|
|
@ -138,9 +139,9 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
*/
|
*/
|
||||||
@ApiOperation("删除新购验收任务")
|
@ApiOperation("删除新购验收任务")
|
||||||
@Log(title = "新购验收任务", businessType = BusinessType.DELETE)
|
@Log(title = "新购验收任务", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{taskIds}")
|
@DeleteMapping("/{taskId}")
|
||||||
public AjaxResult remove(@PathVariable Long[] taskIds)
|
public AjaxResult remove(@PathVariable Long taskId)
|
||||||
{
|
{
|
||||||
return toAjax(purchaseCheckInfoService.deletePurchaseCheckInfoByTaskIds(taskIds));
|
return toAjax(purchaseCheckInfoService.deletePurchaseCheckInfoByTaskId(taskId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,13 @@ import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修试审核详细
|
* 修试审核详细
|
||||||
*
|
*
|
||||||
* @author bonus
|
* @author bonus
|
||||||
* @date 2023-12-16
|
* @date 2023-12-16
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/details")
|
@RequestMapping("/details")
|
||||||
public class RepairAuditDetailsController extends BaseController
|
public class RepairAuditDetailsController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IRepairAuditDetailsService repairAuditDetailsService;
|
private IRepairAuditDetailsService repairAuditDetailsService;
|
||||||
|
|
||||||
|
|
@ -43,15 +42,14 @@ public class RepairAuditDetailsController extends BaseController
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询修试审核任务列表")
|
@ApiOperation("查询修试审核任务列表")
|
||||||
@GetMapping("/questList")
|
@GetMapping("/questList")
|
||||||
public TableDataInfo questList(RepairAuditDetails repairAuditDetails)
|
public TableDataInfo questList(RepairAuditDetails repairAuditDetails) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
Map<String, Object> params = repairAuditDetails.getParams();
|
Map<String, Object> params = repairAuditDetails.getParams();
|
||||||
if (!params.isEmpty()){
|
if (params != null && !params.isEmpty()) {
|
||||||
String beginTime = (String) params.get("beginTime");
|
String beginTime = (String) params.get("beginTime");
|
||||||
String endTime = (String) params.get("endTime");
|
String endTime = (String) params.get("endTime");
|
||||||
params.put("beginTime", beginTime+" 00:00:00");
|
params.put("beginTime", beginTime + " 00:00:00");
|
||||||
params.put("endTime", endTime+" 23:59:59");
|
params.put("endTime", endTime + " 23:59:59");
|
||||||
repairAuditDetails.setParams(params);
|
repairAuditDetails.setParams(params);
|
||||||
}
|
}
|
||||||
List<ScrapApplyDetailsVO> list = repairAuditDetailsService.selectRepairQuestList(repairAuditDetails);
|
List<ScrapApplyDetailsVO> list = repairAuditDetailsService.selectRepairQuestList(repairAuditDetails);
|
||||||
|
|
@ -63,14 +61,13 @@ public class RepairAuditDetailsController extends BaseController
|
||||||
*/
|
*/
|
||||||
@Log(title = "导出修试审核任务列表", businessType = BusinessType.EXPORT)
|
@Log(title = "导出修试审核任务列表", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, RepairAuditDetails bean)
|
public void export(HttpServletResponse response, RepairAuditDetails bean) {
|
||||||
{
|
|
||||||
Map<String, Object> params = bean.getParams();
|
Map<String, Object> params = bean.getParams();
|
||||||
if (!params.isEmpty()){
|
if (!params.isEmpty()) {
|
||||||
String beginTime = (String) params.get("beginTime");
|
String beginTime = (String) params.get("beginTime");
|
||||||
String endTime = (String) params.get("endTime");
|
String endTime = (String) params.get("endTime");
|
||||||
params.put("beginTime", beginTime+" 00:00:00");
|
params.put("beginTime", beginTime + " 00:00:00");
|
||||||
params.put("endTime", endTime+" 23:59:59");
|
params.put("endTime", endTime + " 23:59:59");
|
||||||
bean.setParams(params);
|
bean.setParams(params);
|
||||||
}
|
}
|
||||||
List<RepairAuditDetailsVO> list = repairAuditDetailsService.exportRepairQuestList(bean);
|
List<RepairAuditDetailsVO> list = repairAuditDetailsService.exportRepairQuestList(bean);
|
||||||
|
|
@ -83,8 +80,7 @@ public class RepairAuditDetailsController extends BaseController
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查看修饰审核任务详细列表")
|
@ApiOperation("查看修饰审核任务详细列表")
|
||||||
@GetMapping("/getRepairAuditList")
|
@GetMapping("/getRepairAuditList")
|
||||||
public TableDataInfo getRepairAuditList(RepairAuditDetails repairAuditDetails)
|
public TableDataInfo getRepairAuditList(RepairAuditDetails repairAuditDetails) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<RepairAuditDetails> list = repairAuditDetailsService.getRepairAuditList(repairAuditDetails);
|
List<RepairAuditDetails> list = repairAuditDetailsService.getRepairAuditList(repairAuditDetails);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
@ -95,8 +91,7 @@ public class RepairAuditDetailsController extends BaseController
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查看维修记录")
|
@ApiOperation("查看维修记录")
|
||||||
@GetMapping("/getRepairRecord")
|
@GetMapping("/getRepairRecord")
|
||||||
public TableDataInfo getRepairRecord(RepairAuditDetails repairAuditDetails)
|
public TableDataInfo getRepairRecord(RepairAuditDetails repairAuditDetails) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<RepairRecord> list = repairAuditDetailsService.getRepairRecord(repairAuditDetails);
|
List<RepairRecord> list = repairAuditDetailsService.getRepairRecord(repairAuditDetails);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
@ -107,8 +102,7 @@ public class RepairAuditDetailsController extends BaseController
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查看配件记录")
|
@ApiOperation("查看配件记录")
|
||||||
@GetMapping("/getPartRecord")
|
@GetMapping("/getPartRecord")
|
||||||
public TableDataInfo getPartRecord(RepairAuditDetails repairAuditDetails)
|
public TableDataInfo getPartRecord(RepairAuditDetails repairAuditDetails) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<RepairPart> list = repairAuditDetailsService.getPartRecord(repairAuditDetails);
|
List<RepairPart> list = repairAuditDetailsService.getPartRecord(repairAuditDetails);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public class ScrapApplyDetailsController extends BaseController
|
||||||
public void export(HttpServletResponse response, ScrapApplyDetails bean)
|
public void export(HttpServletResponse response, ScrapApplyDetails bean)
|
||||||
{
|
{
|
||||||
Map<String, Object> params = bean.getParams();
|
Map<String, Object> params = bean.getParams();
|
||||||
if (!params.isEmpty()){
|
if (params!=null && !params.isEmpty()){
|
||||||
String beginTime = (String) params.get("beginTime");
|
String beginTime = (String) params.get("beginTime");
|
||||||
String endTime = (String) params.get("endTime");
|
String endTime = (String) params.get("endTime");
|
||||||
params.put("beginTime", beginTime+" 00:00:00");
|
params.put("beginTime", beginTime+" 00:00:00");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.bonus.sgzb.material.controller;
|
package com.bonus.sgzb.material.controller;
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
|
||||||
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,7 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
import com.bonus.sgzb.material.domain.*;
|
||||||
import com.bonus.sgzb.material.domain.DirectApplyInfoDetails;
|
|
||||||
import com.bonus.sgzb.material.domain.DirectPassApplyInfoDetails;
|
|
||||||
import com.bonus.sgzb.material.domain.TmTask;
|
|
||||||
import com.bonus.sgzb.material.service.ApplyInfoService;
|
import com.bonus.sgzb.material.service.ApplyInfoService;
|
||||||
import com.bonus.sgzb.material.service.TaskService;
|
import com.bonus.sgzb.material.service.TaskService;
|
||||||
import com.bonus.sgzb.material.service.WorkSiteDirectManageService;
|
import com.bonus.sgzb.material.service.WorkSiteDirectManageService;
|
||||||
|
|
@ -42,12 +39,10 @@ public class WorkSiteDirectManageController extends BaseController {
|
||||||
private WorkSiteDirectManageService workSiteDirectManageService;
|
private WorkSiteDirectManageService workSiteDirectManageService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ApplyInfoService leaseApplyInfoService;
|
private TaskService tmTaskService;
|
||||||
/* @Resource
|
|
||||||
private LeaseApplyDetailsService leaseApplyDetailsService;*/
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private TaskService tmTaskService;
|
private ApplyInfoService applyInfoService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -55,9 +50,9 @@ public class WorkSiteDirectManageController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "列表展示")
|
@ApiOperation(value = "列表展示")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list() {
|
public TableDataInfo list(DirectApplyInfo directApplyInfo) {
|
||||||
startPage();
|
startPage();
|
||||||
List<DirectApplyInfo> directApplyInfos = workSiteDirectManageService.getList();
|
List<DirectApplyInfo> directApplyInfos = workSiteDirectManageService.getList(directApplyInfo);
|
||||||
return getDataTable(directApplyInfos);
|
return getDataTable(directApplyInfos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,7 +116,7 @@ public class WorkSiteDirectManageController extends BaseController {
|
||||||
return AjaxResult.error("直转信息为空,未通过");
|
return AjaxResult.error("直转信息为空,未通过");
|
||||||
}
|
}
|
||||||
|
|
||||||
TmTask task = directApplyInfoDetails.getTask();
|
TmTask task = directApplyInfoDetails.getLeaseApplyInfo();
|
||||||
if (task == null) {
|
if (task == null) {
|
||||||
return AjaxResult.error("领料任务参数为空");
|
return AjaxResult.error("领料任务参数为空");
|
||||||
}
|
}
|
||||||
|
|
@ -150,12 +145,27 @@ public class WorkSiteDirectManageController extends BaseController {
|
||||||
return AjaxResult.error("领料信息和详情新增失败");
|
return AjaxResult.error("领料信息和详情新增失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<LeaseOutDetails> leaseOutDetails = directApplyInfoDetails.getLeaseOutDetails();
|
List<LeaseApplyDetails> leaseApplyDetails = task.getLeaseApplyDetails();
|
||||||
if (CollUtil.isEmpty(leaseOutDetails)) {
|
if (CollUtil.isEmpty(leaseApplyDetails)) {
|
||||||
return AjaxResult.error("领料出库信息为空");
|
return AjaxResult.error("领料出库信息为空");
|
||||||
}
|
}
|
||||||
|
List<LeaseApplyInfo> leaseApplyInfoList = applyInfoService.selectIdByTaskId(task.getTaskId().intValue());
|
||||||
|
List<LeaseOutDetails> list = new ArrayList();
|
||||||
|
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||||
|
LeaseOutDetails leaseOutDetails = new LeaseOutDetails();
|
||||||
|
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
||||||
|
if (leaseApplyInfo.getCompanyId().equals(leaseApplyDetail.getCompanyId())) {
|
||||||
|
leaseOutDetails.setParentId(leaseApplyInfo.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
leaseOutDetails.setTypeId(leaseApplyDetail.getTypeId());
|
||||||
|
leaseOutDetails.setMaId(leaseApplyDetail.getMaId());
|
||||||
|
leaseOutDetails.setOutNum(leaseApplyDetail.getPreNum());
|
||||||
|
leaseOutDetails.setCompanyId(leaseApplyDetail.getCompanyId());
|
||||||
|
list.add(leaseOutDetails);
|
||||||
|
}
|
||||||
// 新增出库记录
|
// 新增出库记录
|
||||||
int res4 = workSiteDirectManageService.insertLeaseOutDetail(leaseOutDetails);
|
int res4 = workSiteDirectManageService.insertLeaseOutDetail(list);
|
||||||
if (res4 == 0) {
|
if (res4 == 0) {
|
||||||
return AjaxResult.error("新增出库记录失败");
|
return AjaxResult.error("新增出库记录失败");
|
||||||
}
|
}
|
||||||
|
|
@ -170,7 +180,7 @@ public class WorkSiteDirectManageController extends BaseController {
|
||||||
backApplyInfo.setCode(tcode);
|
backApplyInfo.setCode(tcode);
|
||||||
//创建退料任务(tm_task)
|
//创建退料任务(tm_task)
|
||||||
backApplyInfo.setTaskType(36);
|
backApplyInfo.setTaskType(36);
|
||||||
backApplyInfo.setTaskStatus("37");
|
backApplyInfo.setTaskStatus("40");
|
||||||
int res5 = workSiteDirectManageService.insertTmTaskByBackInfo(backApplyInfo);
|
int res5 = workSiteDirectManageService.insertTmTaskByBackInfo(backApplyInfo);
|
||||||
if (res5 == 0) {
|
if (res5 == 0) {
|
||||||
return AjaxResult.error("退料任务新建失败");
|
return AjaxResult.error("退料任务新建失败");
|
||||||
|
|
@ -187,7 +197,11 @@ public class WorkSiteDirectManageController extends BaseController {
|
||||||
return AjaxResult.error("退料信息和详情新增失败");
|
return AjaxResult.error("退料信息和详情新增失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
int res8 = workSiteDirectManageService.insertBackCheckDetails(backApplyInfo);
|
List<BackApplyInfo> backApplyDetails = backApplyInfo.getBackApplyDetails();
|
||||||
|
if (CollUtil.isEmpty(backApplyDetails)) {
|
||||||
|
return AjaxResult.error("退料详情信息为空");
|
||||||
|
}
|
||||||
|
int res8 = workSiteDirectManageService.insertBackCheckDetails(backApplyDetails);
|
||||||
if (res8 == 0) {
|
if (res8 == 0) {
|
||||||
return AjaxResult.error("新增入库记录失败");
|
return AjaxResult.error("新增入库记录失败");
|
||||||
}
|
}
|
||||||
|
|
@ -214,7 +228,7 @@ public class WorkSiteDirectManageController extends BaseController {
|
||||||
|
|
||||||
@ApiOperation(value = "查看详情")
|
@ApiOperation(value = "查看详情")
|
||||||
@GetMapping("/getInfo")
|
@GetMapping("/getInfo")
|
||||||
public AjaxResult refuse(String id) {
|
public AjaxResult getInfo(String id) {
|
||||||
return AjaxResult.success(workSiteDirectManageService.getInfoById(id));
|
return AjaxResult.success(workSiteDirectManageService.getInfoById(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,12 @@ public class BackApplyInfo extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String backStatus;
|
private String backStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料数量
|
||||||
|
*/
|
||||||
|
private Integer backNum;
|
||||||
|
private Integer directNum;
|
||||||
|
|
||||||
/** 退料单号 */
|
/** 退料单号 */
|
||||||
@Excel(name = "退料单号")
|
@Excel(name = "退料单号")
|
||||||
@ApiModelProperty(value = "退料单号")
|
@ApiModelProperty(value = "退料单号")
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public class DirectPassApplyInfoDetails extends BaseEntity {
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
private TmTask task;
|
private TmTask leaseApplyInfo;
|
||||||
|
|
||||||
private BackApplyInfo backApplyInfo;
|
private BackApplyInfo backApplyInfo;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,13 @@ public class LeaseApplyDetails implements Serializable {
|
||||||
@ApiModelProperty(value = "规格ID")
|
@ApiModelProperty(value = "规格ID")
|
||||||
private Integer typeId;
|
private Integer typeId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机具ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "机具Id")
|
||||||
|
private Integer maId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型名称
|
* 类型名称
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,6 @@ import java.util.List;
|
||||||
public interface ApplyInfoMapper {
|
public interface ApplyInfoMapper {
|
||||||
|
|
||||||
int insertSelective(LeaseApplyInfo record);
|
int insertSelective(LeaseApplyInfo record);
|
||||||
|
|
||||||
|
List<LeaseApplyInfo> selectIdByTaskId(Integer id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ public interface BackRecordMapper {
|
||||||
*/
|
*/
|
||||||
List<BackRecord> getBackRecordList(BackRecord bean);
|
List<BackRecord> getBackRecordList(BackRecord bean);
|
||||||
|
|
||||||
int insertBcd(BackApplyInfo backApplyInfo);
|
|
||||||
|
|
||||||
int insertCheckDetails(BackApplyInfo backApplyInfo);
|
int insertCheckDetails(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ public interface WorkSiteDirectManageMapper {
|
||||||
|
|
||||||
List<DirectApplyInfo> getList();
|
List<DirectApplyInfo> getList();
|
||||||
|
|
||||||
|
List<DirectApplyInfo> getList(@Param("record") DirectApplyInfo directApplyInfo);
|
||||||
|
|
||||||
DirectApplyInfo getDirectApplyInfoById(String id);
|
DirectApplyInfo getDirectApplyInfoById(String id);
|
||||||
|
|
||||||
int insertSelective(LeaseApplyInfo leaseApplyInfo);
|
int insertSelective(LeaseApplyInfo leaseApplyInfo);
|
||||||
|
|
@ -58,4 +60,6 @@ public interface WorkSiteDirectManageMapper {
|
||||||
int insertBackApplyInfo(TmTask task);
|
int insertBackApplyInfo(TmTask task);
|
||||||
|
|
||||||
DirectApplyInfo getInfoById(String id);
|
DirectApplyInfo getInfoById(String id);
|
||||||
|
|
||||||
|
List<DirectApplyDetails> getDetailById(String id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,14 @@ package com.bonus.sgzb.material.service;
|
||||||
|
|
||||||
import com.bonus.sgzb.material.domain.LeaseApplyInfo;
|
import com.bonus.sgzb.material.domain.LeaseApplyInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:梁超
|
* @Author:梁超
|
||||||
* @date:2024/3/6 - 17:41
|
* @date:2024/3/6 - 17:41
|
||||||
*/
|
*/
|
||||||
public interface ApplyInfoService {
|
public interface ApplyInfoService {
|
||||||
int genderLeaseCode(LeaseApplyInfo record);
|
int genderLeaseCode(LeaseApplyInfo record);
|
||||||
|
|
||||||
|
List<LeaseApplyInfo> selectIdByTaskId(Integer id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@ public interface WorkSiteDirectManageService {
|
||||||
|
|
||||||
List<DirectApplyInfo> getList();
|
List<DirectApplyInfo> getList();
|
||||||
|
|
||||||
|
|
||||||
|
List<DirectApplyInfo> getList(DirectApplyInfo directApplyInfo);
|
||||||
|
|
||||||
String genderLeaseCode();
|
String genderLeaseCode();
|
||||||
|
|
||||||
DirectApplyInfo getDirectApplyInfoById(String id);
|
DirectApplyInfo getDirectApplyInfoById(String id);
|
||||||
|
|
@ -39,7 +42,7 @@ public interface WorkSiteDirectManageService {
|
||||||
|
|
||||||
int insertAgreementByBackInfo(BackApplyInfo backApplyInfo);
|
int insertAgreementByBackInfo(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
int insertBackCheckDetails(BackApplyInfo backApplyInfo);
|
int insertBackCheckDetails(List<BackApplyInfo> backApplyDetails);
|
||||||
|
|
||||||
DirectApplyInfo getInfoById(String id);
|
DirectApplyInfo getInfoById(String id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
package com.bonus.sgzb.material.service.impl;
|
package com.bonus.sgzb.material.service.impl;
|
||||||
|
|
||||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.material.domain.AgreementInfo;
|
import com.bonus.sgzb.material.domain.AgreementInfo;
|
||||||
import com.bonus.sgzb.material.mapper.AgreementInfoMapper;
|
import com.bonus.sgzb.material.mapper.AgreementInfoMapper;
|
||||||
import com.bonus.sgzb.material.service.AgreementInfoService;
|
import com.bonus.sgzb.material.service.AgreementInfoService;
|
||||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
|
||||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:梁超
|
* @Author:梁超
|
||||||
|
|
@ -22,4 +23,9 @@ public class ApplyInfoServiceImpl implements ApplyInfoService {
|
||||||
public int genderLeaseCode(LeaseApplyInfo record) {
|
public int genderLeaseCode(LeaseApplyInfo record) {
|
||||||
return leaseApplyInfoMapper.insertSelective(record);
|
return leaseApplyInfoMapper.insertSelective(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LeaseApplyInfo> selectIdByTaskId(Integer id) {
|
||||||
|
return leaseApplyInfoMapper.selectIdByTaskId(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,12 @@
|
||||||
package com.bonus.sgzb.material.service.impl;
|
package com.bonus.sgzb.material.service.impl;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.sgzb.material.domain.*;
|
import com.bonus.sgzb.material.domain.*;
|
||||||
import com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper;
|
import com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper;
|
||||||
import com.bonus.sgzb.material.mapper.PurchaseCheckInfoMapper;
|
import com.bonus.sgzb.material.mapper.PurchaseCheckInfoMapper;
|
||||||
import com.bonus.sgzb.material.mapper.TaskMapper;
|
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||||
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
||||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
|
||||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||||
import com.bonus.sgzb.system.api.RemoteUserService;
|
import com.bonus.sgzb.system.api.RemoteUserService;
|
||||||
|
|
@ -18,6 +14,9 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购验收任务Service业务层处理
|
* 新购验收任务Service业务层处理
|
||||||
|
|
@ -216,7 +215,19 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deletePurchaseCheckInfoByTaskId(Long taskId) {
|
public int deletePurchaseCheckInfoByTaskId(Long taskId) {
|
||||||
return purchaseCheckInfoMapper.deletePurchaseCheckInfoByTaskId(taskId);
|
int result = 0;
|
||||||
|
try {
|
||||||
|
// 第一步:删除验收任务表
|
||||||
|
purchaseCheckInfoMapper.deletePurchaseCheckInfoByTaskId(taskId);
|
||||||
|
// 第二步:删除验收任务详情表
|
||||||
|
purchaseCheckDetailsMapper.deleteCheckDetailsByTaskId(taskId);
|
||||||
|
// 第三步:删除任务表
|
||||||
|
taskMapper.deleteTmTaskByTaskId(taskId);
|
||||||
|
result = 1;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
@Override
|
@Override
|
||||||
public List<String> getFileUrl(String fileIds) {
|
public List<String> getFileUrl(String fileIds) {
|
||||||
List<String> fileUrlList = new ArrayList<>();
|
List<String> fileUrlList = new ArrayList<>();
|
||||||
if (fileIds.isEmpty()){
|
if (fileIds != null && !fileIds.isEmpty()) {
|
||||||
for (String s : fileIds.split(",")) {
|
for (String s : fileIds.split(",")) {
|
||||||
String url = scrapApplyDetailsMapper.getFileUrl(s);
|
String url = scrapApplyDetailsMapper.getFileUrl(s);
|
||||||
fileUrlList.add(url);
|
fileUrlList.add(url);
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,11 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
|
||||||
return workSiteDirectManageMapper.getList();
|
return workSiteDirectManageMapper.getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DirectApplyInfo> getList(DirectApplyInfo directApplyInfo) {
|
||||||
|
return workSiteDirectManageMapper.getList(directApplyInfo);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String genderLeaseCode() {
|
public String genderLeaseCode() {
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
|
@ -323,26 +328,25 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertBackCheckDetails(BackApplyInfo backApplyInfo) {
|
public int insertBackCheckDetails(List<BackApplyInfo> backApplyDetails) {
|
||||||
//插入back_check_details
|
//插入back_check_details
|
||||||
return insertBcd(backApplyInfo);
|
return insertBcd(backApplyDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DirectApplyInfo getInfoById(String id) {
|
public DirectApplyInfo getInfoById(String id) {
|
||||||
return workSiteDirectManageMapper.getInfoById(id);
|
DirectApplyInfo directApplyInfo = workSiteDirectManageMapper.getInfoById(id);
|
||||||
|
List<DirectApplyDetails> detailById = workSiteDirectManageMapper.getDetailById(id);
|
||||||
|
directApplyInfo.setDirectApplyDetails(detailById);
|
||||||
|
return directApplyInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int insertBcd(BackApplyInfo backApplyInfo) {
|
public int insertBcd(List<BackApplyInfo> backApplyDetails) {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
BackApplyInfo[] arr = backApplyInfo.getArr();
|
for (BackApplyInfo backApplyDetail : backApplyDetails) {
|
||||||
if (arr.length > 0) {
|
backApplyDetail.setBackNum(Integer.valueOf(backApplyDetail.getDirectNum()));
|
||||||
for (int i = 0; i < arr.length; i++) {
|
backApplyDetail.setBackStatus("1");
|
||||||
res = backRecordMapper.insertCheckDetails(arr[i]);
|
res = backRecordMapper.insertCheckDetails(backApplyDetail);
|
||||||
int maId = arr[i].getMaId();
|
|
||||||
//退料完成状态改成在库
|
|
||||||
backRecordMapper.updateMaStatus(maId, "15");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,5 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
<select id="selectIdByTaskId" resultType="com.bonus.sgzb.material.domain.LeaseApplyInfo">
|
||||||
|
select * from lease_apply_info where task_id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -3,9 +3,6 @@
|
||||||
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.bonus.sgzb.material.mapper.BackRecordMapper">
|
<mapper namespace="com.bonus.sgzb.material.mapper.BackRecordMapper">
|
||||||
<insert id="insertBcd">
|
|
||||||
|
|
||||||
</insert>
|
|
||||||
<insert id="insertCheckDetails">
|
<insert id="insertCheckDetails">
|
||||||
insert into back_check_details
|
insert into back_check_details
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -369,7 +369,7 @@
|
||||||
LEFT JOIN ma_machine mm on sai.ma_id = mm.ma_id
|
LEFT JOIN ma_machine mm on sai.ma_id = mm.ma_id
|
||||||
where sai.agreement_id = #{agreementId} and sai.status = '0'
|
where sai.agreement_id = #{agreementId} and sai.status = '0'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
sai.type_id,sai.ma_id
|
sai.ma_id,sai.type_id
|
||||||
</select>
|
</select>
|
||||||
<select id="getList" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
|
<select id="getList" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
|
|
@ -390,6 +390,27 @@
|
||||||
LEFT JOIN bm_project_lot bpl1 ON bpl1.lot_id = bai1.project_id
|
LEFT JOIN bm_project_lot bpl1 ON bpl1.lot_id = bai1.project_id
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||||
LEFT JOIN bm_unit_info bui1 ON bui1.unit_id = bai1.unit_id
|
LEFT JOIN bm_unit_info bui1 ON bui1.unit_id = bai1.unit_id
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
<if test="record.keyWord != null and record.keyWord != ''">
|
||||||
|
and (bpl.lot_name like concat('%', #{keyWord}, '%') or
|
||||||
|
bui.unit_name like concat('%', #{keyWord}, '%'))
|
||||||
|
</if>
|
||||||
|
<if test="record.lotId != null and record.lotId != ''">
|
||||||
|
and bpl.lot_id = #{record.lotId}
|
||||||
|
</if>
|
||||||
|
<if test="record.unitId != null and record.unitId != ''">
|
||||||
|
and bui.unitId = #{record.unitId}
|
||||||
|
</if>
|
||||||
|
<if test="record.backMan != null and record.backMan != ''">
|
||||||
|
and dai.back_man like concat('%', #{backMan}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="record.backPhone != null and record.backPhone != ''">
|
||||||
|
and dai.back_phone like concat('%', #{backPhone}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="record.status != null and record.status != ''">
|
||||||
|
and dai.status = #{status}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getDirectApplyInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
|
<select id="getDirectApplyInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
|
||||||
select * from direct_apply_info where id = #{id}
|
select * from direct_apply_info where id = #{id}
|
||||||
|
|
@ -412,13 +433,9 @@
|
||||||
<select id="getInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
|
<select id="getInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
|
||||||
SELECT
|
SELECT
|
||||||
dai.*,
|
dai.*,
|
||||||
dad.direct_num AS directNum,
|
bai.agreement_code as backAgreementCode,
|
||||||
|
bai1.agreement_code as leaseAgreementCode,
|
||||||
bpl.lot_id AS backProId,
|
bpl.lot_id AS backProId,
|
||||||
mt3.type_name AS typeName,
|
|
||||||
mt2.type_name AS kindName,
|
|
||||||
mt.type_name AS modelName,
|
|
||||||
mt.unit_name AS unitName,
|
|
||||||
mm.ma_code AS maCode,
|
|
||||||
bpl.lot_name AS backProName,
|
bpl.lot_name AS backProName,
|
||||||
bui.unit_id AS backUnitId,
|
bui.unit_id AS backUnitId,
|
||||||
bui.unit_name AS backUnitName,
|
bui.unit_name AS backUnitName,
|
||||||
|
|
@ -429,17 +446,39 @@
|
||||||
FROM
|
FROM
|
||||||
direct_apply_info dai
|
direct_apply_info dai
|
||||||
LEFT JOIN direct_apply_details dad ON dai.id = dad.direct_id
|
LEFT JOIN direct_apply_details dad ON dai.id = dad.direct_id
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = dad.type_id
|
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
|
||||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id
|
|
||||||
LEFT JOIN ma_machine mm ON dad.ma_id = mm.ma_id
|
|
||||||
LEFT JOIN bm_agreement_info bai ON dai.back_agreement_id = bai.agreement_id
|
LEFT JOIN bm_agreement_info bai ON dai.back_agreement_id = bai.agreement_id
|
||||||
LEFT JOIN bm_agreement_info bai1 ON dai.lease_agreement_id = bai1.agreement_id
|
LEFT JOIN bm_agreement_info bai1 ON dai.lease_agreement_id = bai1.agreement_id
|
||||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||||
LEFT JOIN bm_project_lot bpl1 ON bpl1.lot_id = bai1.project_id
|
LEFT JOIN bm_project_lot bpl1 ON bpl1.lot_id = bai1.project_id
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||||
LEFT JOIN bm_unit_info bui1 ON bui1.unit_id = bai1.unit_id
|
LEFT JOIN bm_unit_info bui1 ON bui1.unit_id = bai1.unit_id
|
||||||
|
WHERE
|
||||||
|
dai.id = #{id} GROUP BY dai.id
|
||||||
|
</select>
|
||||||
|
<select id="getDetailById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyDetails">
|
||||||
|
SELECT
|
||||||
|
dad.direct_num AS directNum,
|
||||||
|
dad.type_id AS typeId,
|
||||||
|
mt.company_id AS companyId,
|
||||||
|
mt3.type_name AS typeName,
|
||||||
|
mt2.type_name AS kindName,
|
||||||
|
mt.type_name AS modelName,
|
||||||
|
mt.unit_name AS unitName,
|
||||||
|
sum( sai.num ) AS useNum,
|
||||||
|
mm.ma_code AS maCode
|
||||||
|
FROM
|
||||||
|
direct_apply_info dai
|
||||||
|
LEFT JOIN direct_apply_details dad ON dai.id = dad.direct_id
|
||||||
|
LEFT JOIN slt_agreement_info sai ON dai.back_agreement_id = sai.agreement_id
|
||||||
|
AND sai.type_id = dad.type_id
|
||||||
|
LEFT JOIN ma_type mt ON mt.type_id = dad.type_id
|
||||||
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
|
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id
|
||||||
|
LEFT JOIN ma_machine mm ON dad.ma_id = mm.ma_id
|
||||||
WHERE
|
WHERE
|
||||||
dai.id = #{id}
|
dai.id = #{id}
|
||||||
|
AND sai.STATUS = '0'
|
||||||
|
GROUP BY
|
||||||
|
dad.id,sai.ma_id,sai.type_id
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -12,6 +12,7 @@ import org.apache.poi.hwpf.extractor.WordExtractor;
|
||||||
import org.apache.poi.openxml4j.util.ZipSecureFile;
|
import org.apache.poi.openxml4j.util.ZipSecureFile;
|
||||||
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
||||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
@ -37,6 +38,11 @@ public class SysFileServiceImpl implements SysFileService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private FileInfoMapper dao;
|
private FileInfoMapper dao;
|
||||||
|
/**
|
||||||
|
* 上传文件存储在本地的根路径
|
||||||
|
*/
|
||||||
|
@Value("${file.path}")
|
||||||
|
private String localFilePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 本地文件上传接口
|
* 本地文件上传接口
|
||||||
|
|
@ -133,7 +139,7 @@ public class SysFileServiceImpl implements SysFileService {
|
||||||
String tmpName = multipartFile.getOriginalFilename();
|
String tmpName = multipartFile.getOriginalFilename();
|
||||||
tmpName = tmpName.substring(tmpName.lastIndexOf("\\") + 1);
|
tmpName = tmpName.substring(tmpName.lastIndexOf("\\") + 1);
|
||||||
tmpName = IdUtil.fastSimpleUUID() + System.currentTimeMillis() + tmpName.substring(tmpName.lastIndexOf("."), tmpName.length());
|
tmpName = IdUtil.fastSimpleUUID() + System.currentTimeMillis() + tmpName.substring(tmpName.lastIndexOf("."), tmpName.length());
|
||||||
String imageFiles = "/data/sgzb/" + fileType + "/";
|
String imageFiles = localFilePath + fileType + "/";
|
||||||
String os = System.getProperty("os.name");
|
String os = System.getProperty("os.name");
|
||||||
if (os.toLowerCase().startsWith(GlobalConstants.STRING_WIN)) {
|
if (os.toLowerCase().startsWith(GlobalConstants.STRING_WIN)) {
|
||||||
imageFiles = "D://files/" + fileType + "/";
|
imageFiles = "D://files/" + fileType + "/";
|
||||||
|
|
@ -172,7 +178,7 @@ public class SysFileServiceImpl implements SysFileService {
|
||||||
String tmpName = multipartFile.getOriginalFilename();
|
String tmpName = multipartFile.getOriginalFilename();
|
||||||
tmpName = tmpName.substring(tmpName.lastIndexOf("\\") + 1);
|
tmpName = tmpName.substring(tmpName.lastIndexOf("\\") + 1);
|
||||||
tmpName = IdUtil.fastSimpleUUID() + System.currentTimeMillis() + tmpName.substring(tmpName.lastIndexOf("."), tmpName.length());
|
tmpName = IdUtil.fastSimpleUUID() + System.currentTimeMillis() + tmpName.substring(tmpName.lastIndexOf("."), tmpName.length());
|
||||||
String imageFiles = "/data/sgzb/" + fileType + "/";
|
String imageFiles = localFilePath + fileType + "/";
|
||||||
String os = System.getProperty("os.name");
|
String os = System.getProperty("os.name");
|
||||||
if (os.toLowerCase().startsWith(GlobalConstants.STRING_WIN)) {
|
if (os.toLowerCase().startsWith(GlobalConstants.STRING_WIN)) {
|
||||||
imageFiles = "D://files/" + fileType + "/";
|
imageFiles = "D://files/" + fileType + "/";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue