Merge remote-tracking branch 'origin/dev' into dev-nx

This commit is contained in:
15856 2024-04-25 17:57:37 +08:00
commit 4b5d251679
41 changed files with 707 additions and 121 deletions

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.system.api;
import com.bonus.sgzb.system.api.domain.BmNumLogs;
import com.bonus.sgzb.system.api.domain.SysOperLog;
import com.bonus.sgzb.system.api.factory.RemoteLogFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
@ -29,6 +30,17 @@ public interface RemoteLogService
@PostMapping("/operlog")
public R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
/**
* 保存物资记录日志
* @param bmNumLogs 物资信息
* @param source 请求来源
* @return 结果
* @throws Exception 异常信息
*/
@PostMapping("/bm_num_logs")
public R<Boolean> saveNumberLog(@RequestBody BmNumLogs bmNumLogs, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
/**
* 保存访问记录
*

View File

@ -0,0 +1,85 @@
package com.bonus.sgzb.system.api.domain;
import java.time.LocalDateTime;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
/**
* @author syruan
*/
@Getter
@Setter
public class BmNumLogs extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@Excel(name = "ID")
private Integer id;
/**
* 模块名称/title标题
*/
@Excel(name = "模块名称/title标题")
private String modelTitle;
/**
* 接口地址/请求方法
*/
@Excel(name = "接口地址/请求方法")
private String method;
/**
* 实例
*/
@Excel(name = "实例/任务")
private String task;
/**
* 规格id
*/
@Excel(name = "规格id")
private Integer typeId;
/**
* 描述/请求参数/实体
*/
@Excel(name = "描述/请求参数/实体")
private String description;
/**
* 响应内容/状态码/返回参数
*/
@Excel(name = "响应内容/状态码/返回参数")
private String jsonResult;
/**
* 请求时间
*/
@Excel(name = "请求时间")
private LocalDateTime time;
/**
* 创建人
*/
@Excel(name = "创建人")
private String creator;
/**
* 备注
*/
@Excel(name = "备注")
private String remark;
/**
* 状态: 默认0, 其他值则为异常
*/
@Excel(name = "状态")
private Byte status;
}

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.system.api.factory;
import com.bonus.sgzb.system.api.domain.BmNumLogs;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
@ -31,6 +32,11 @@ public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogServic
return R.fail("保存操作日志失败:" + throwable.getMessage());
}
@Override
public R<Boolean> saveNumberLog(BmNumLogs bmNumLogs, String source) throws Exception {
return R.fail("保存物资库存日志失败:" + throwable.getMessage());
}
@Override
public R<Boolean> saveLogininfor(SysLogininfor sysLogininfor, String source)
{

View File

@ -33,6 +33,7 @@ import java.util.Map;
@RestController
@Slf4j
public class TokenController {
@Autowired
private TokenService tokenService;

View File

@ -260,6 +260,10 @@ public class BackApplyController extends BaseController {
@PostMapping("examineList")
public AjaxResult examineList(@RequestBody BackApplyInfo record) {
try {
if (StringUtils.isNull(record)) {
return AjaxResult.error("参数错误");
}
List<BackApplyInfo> list = backApplyService.examineList(record);
return success(list);
} catch (Exception e) {

View File

@ -123,7 +123,6 @@ public class BackReceiveController extends BaseController {
* 编码退料--管理方式为0的
*
* @param record 查询条件
*
* @return AjaxResult对象
*/
@Log(title = "退料接收-编码退料", businessType = BusinessType.INSERT)
@ -143,6 +142,22 @@ public class BackReceiveController extends BaseController {
}
}
/**
* 退料接收撤回
*
* @return AjaxResult对象
*/
@Log(title = "退料接收撤回")
@PostMapping("revoke")
public AjaxResult revoke(@RequestBody BackApplyInfo record) {
int res = backReceiveService.revoke(record);
if (res > 0) {
return AjaxResult.success("撤回成功");
} else {
return AjaxResult.error("撤回失败");
}
}
/**
* 退料接收-rfid退料
*

View File

@ -190,4 +190,8 @@ public interface BackReceiveMapper {
List<TmTask> getBackMachine(TmTask task);
List<TmTask> getRecord(TmTask task);
int deleteCheckDetails(BackApplyInfo backApplyInfo);
List<Integer> getMaId(BackApplyInfo backApplyInfo);
}

View File

@ -114,4 +114,6 @@ public interface TmTaskMapper {
List<TmTask> getLeaseOutListByUser(TmTask task);
List<TmTask> getLeaseDetailByParentId(TmTask record);
List<TmTask> getMaTypeDetails(List<LeaseApplyDetails> leaseApplyDetails);
}

View File

@ -93,4 +93,6 @@ public interface BackReceiveService {
List<TmTask> getBackMachine(TmTask task);
List<TmTask> getRecord(TmTask task);
int revoke(BackApplyInfo record);
}

View File

@ -261,6 +261,16 @@ public class BackReceiveServiceImpl implements BackReceiveService {
return backReceiveMapper.getRecord(task);
}
@Override
public int revoke(BackApplyInfo record) {
//删除back_check_details
int res = deleteBcd(record);
if (res == 0) {
throw new RuntimeException("删除back_check_details异常");
}
return res;
}
private int insertRad(int taskId, List<BackApplyInfo> wxList) {
int result = 0;
if (wxList != null) {
@ -378,6 +388,23 @@ public class BackReceiveServiceImpl implements BackReceiveService {
return res;
}
private int deleteBcd(BackApplyInfo record) {
int res = 0;
if (record != null) {
String manageType = record.getManageType();
if ("0".equals(manageType)) {
List<Integer> maId = backReceiveMapper.getMaId(record);
for (Integer s : maId) {
//机具状态变为在用
backReceiveMapper.updateMaStatus(s, "16");
}
}
res = backReceiveMapper.deleteCheckDetails(record);
}
return res;
}
/**
* 编号生成规则

View File

@ -491,6 +491,12 @@ public class TmTaskServiceImpl implements TmTaskService {
for (TmTask tmTask : tmTaskList) {
int count = 0;
if (tmTask != null) {
if (tmTask.getTaskStatus() == 31) {
tmTask.setTaskName("机具分公司审核");
}
if (tmTask.getTaskStatus() == 32) {
tmTask.setTaskName("施工部审核");
}
// 去查询任务分单表
List<LeaseApplyInfo> collect = tmTaskMapper.getAuditManageListByLeaseInfo(tmTask);
// 对领料任务集合查询具体详情
@ -525,6 +531,12 @@ public class TmTaskServiceImpl implements TmTaskService {
List<TmTask> tmTaskList = new ArrayList<>();
TmTask tmTask = tmTaskMapper.getLeaseListTmTask(task);
if (tmTask != null) {
if (tmTask.getTaskStatus() == 31) {
tmTask.setTaskName("机具分公司审核");
}
if (tmTask.getTaskStatus() == 32) {
tmTask.setTaskName("施工部审核");
}
List<LeaseApplyInfo> leaseApplyInfoList = tmTaskMapper.getLeaseListByLeaseInfo(task);
tmTask.setLeaseApplyInfoList(leaseApplyInfoList);
@ -534,6 +546,7 @@ public class TmTaskServiceImpl implements TmTaskService {
// 去查询领料任务详情表
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetailsCq(leaseApplyInfo);
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
// tmTaskMapper.getMaTypeDetails(leaseApplyDetails);
listLeaseDetails.addAll(leaseApplyDetails);
}
}

View File

@ -578,6 +578,12 @@
status = '1'
where id = #{info.id}
</update>
<delete id="deleteCheckDetails">
delete from back_check_details where parent_id = #{parentId} and type_id = #{typeId}
<if test="maId != null and maId != ''">
and ma_id = #{maId}
</if>
</delete>
<select id="getbackReceiveList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT
@ -919,6 +925,9 @@
ORDER BY
bcd.create_time DESC
</select>
<select id="getMaId" resultType="java.lang.Integer">
select ma_id from back_check_details where parent_id = #{parentId} and type_id = #{typeId}
</select>
</mapper>

View File

@ -281,7 +281,7 @@
UPDATE
ma_machine
SET
ma_status = '16' , create_time = NOW()
ma_status = '16',create_time = NOW()
<where>
type_id = #{record.typeId}
<if test="record.maId != null and record.maId != ''">

View File

@ -967,4 +967,10 @@
and lad.type_id = #{typeId}
</if>
</select>
<select id="getMaTypeDetails" resultType="com.bonus.sgzb.app.domain.TmTask">
select mt2.type_name as typeName,
mt.type_name as typeModelName
from ma_type mt on lad.type_id = mt.type_id
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
</select>
</mapper>

View File

@ -0,0 +1,54 @@
package com.bonus.sgzb.material.controller;
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.security.annotation.InnerAuth;
import com.bonus.sgzb.system.api.domain.BmNumLogs;
import com.bonus.sgzb.material.service.impl.BmNumLogsService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* (bm_num_logs)表控制层
*
* @author syruan
*/
@RestController
@RequestMapping("/bm_num_logs")
public class BmNumLogsController extends BaseController {
/**
* 服务对象
*/
@Autowired
private BmNumLogsService bmNumLogsService;
@GetMapping("/list")
public TableDataInfo list() {
startPage();
List<BmNumLogs> list = bmNumLogsService.selectAll();
return getDataTable(list);
}
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("selectByPrimaryKey")
public BmNumLogs selectByPrimaryKey(Integer id) {
return bmNumLogsService.selectByPrimaryKey(id);
}
@InnerAuth
@PostMapping
public AjaxResult add(@RequestBody BmNumLogs bmNumLogs) {
return toAjax(bmNumLogsService.insert(bmNumLogs));
}
}

View File

@ -20,6 +20,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
@ -31,8 +32,8 @@ import java.util.List;
@RestController
@RequestMapping("/sltAgreementInfo")
public class SltAgreementInfoController extends BaseController {
@Autowired
private SltAgreementInfoService service;
@Resource
private SltAgreementInfoService sltAgreementInfoService;
/**
* 根据条件获取协议结算列表
@ -42,11 +43,16 @@ public class SltAgreementInfoController extends BaseController {
public TableDataInfo getSltAgreementInfo(AgreementInfo bean) {
startPage();
List<AgreementInfo> list = new ArrayList<>();
//逻辑需要确认当往来单位id工程标段ID结算状态为空时是否返回异常如果返回异常前端配合改造
if (bean.getUnitId() == null && bean.getProjectId() == null && bean.getSltStatus()== null){
}else {
list = service.getSltAgreementInfo(bean);
list = sltAgreementInfoService.getSltAgreementInfo(bean);
}
//上面代码可以改造为
/*if(bean.getUnitId() != null || bean.getProjectId() != null || bean.getSltStatus()!= null){
list = sltAgreementInfoService.getSltAgreementInfo(bean);
}*/
return getDataTable(list);
}
@ -56,7 +62,7 @@ public class SltAgreementInfoController extends BaseController {
@ApiOperation(value = "根据协议获取结算清单")
@PostMapping("/getSltInfo")
public AjaxResult getSltInfo(@RequestBody List<AgreementInfo> list) {
SltInfoVo bean = service.getSltInfo(list);
SltInfoVo bean = sltAgreementInfoService.getSltInfo(list);
return AjaxResult.success(bean);
}
@ -67,7 +73,7 @@ public class SltAgreementInfoController extends BaseController {
@PostMapping("/exportLease")
public void exportLease(HttpServletResponse response,@RequestBody List<AgreementInfo> list)
{
List<SltAgreementInfo> explist = service.getLeaseList(list);
List<SltAgreementInfo> explist = sltAgreementInfoService.getLeaseList(list);
List<LeaseInfo> leaseInfoList = Convert.toList(LeaseInfo.class,explist);
ExcelUtil<LeaseInfo> util = new ExcelUtil<LeaseInfo>(LeaseInfo.class);
util.exportExcel(response, leaseInfoList, "租赁明细导出");
@ -80,7 +86,7 @@ public class SltAgreementInfoController extends BaseController {
@PostMapping("/exportLose")
public void exportLose(HttpServletResponse response,@RequestBody List<AgreementInfo> list)
{
List<SltAgreementInfo> explist = service.getLoseList(list);
List<SltAgreementInfo> explist = sltAgreementInfoService.getLoseList(list);
List<LoseInfo> leaseInfoList = Convert.toList(LoseInfo.class,explist);
ExcelUtil<LoseInfo> util = new ExcelUtil<LoseInfo>(LoseInfo.class);
util.exportExcel(response, leaseInfoList, "丢失明细导出");
@ -93,7 +99,7 @@ public class SltAgreementInfoController extends BaseController {
@PostMapping("/exportRepair")
public void exportRepair(HttpServletResponse response,@RequestBody List<AgreementInfo> list)
{
List<SltAgreementInfo> explist = service.getRepairList(list);
List<SltAgreementInfo> explist = sltAgreementInfoService.getRepairList(list);
List<LeaseInfo> leaseInfoList = Convert.toList(LeaseInfo.class,explist);
ExcelUtil<LeaseInfo> util = new ExcelUtil<LeaseInfo>(LeaseInfo.class);
util.exportExcel(response, leaseInfoList, "维修明细导出");
@ -106,7 +112,7 @@ public class SltAgreementInfoController extends BaseController {
@PostMapping("/exportScrap")
public void exportScrap(HttpServletResponse response,@RequestBody List<AgreementInfo> list)
{
List<SltAgreementInfo> explist = service.getScrapList(list);
List<SltAgreementInfo> explist = sltAgreementInfoService.getScrapList(list);
List<ScrapInfo> leaseInfoList = Convert.toList(ScrapInfo.class,explist);
ExcelUtil<ScrapInfo> util = new ExcelUtil<ScrapInfo>(ScrapInfo.class);
util.exportExcel(response, leaseInfoList, "维修明细导出");
@ -119,7 +125,7 @@ public class SltAgreementInfoController extends BaseController {
@PostMapping("/submitFee")
public AjaxResult submitFee(@RequestBody SltAgreementApply apply)
{
return service.submitFee(apply);
return sltAgreementInfoService.submitFee(apply);
}
/**
@ -130,7 +136,7 @@ public class SltAgreementInfoController extends BaseController {
public TableDataInfo getSltExam(AgreementInfo bean)
{
startPage();
List<SltAgreementApply> list = service.getSltExam(bean);
List<SltAgreementApply> list = sltAgreementInfoService.getSltExam(bean);
return getDataTable(list);
}
@ -141,7 +147,7 @@ public class SltAgreementInfoController extends BaseController {
@GetMapping("/getSltExamInfo")
public AjaxResult getSltExamInfo(SltAgreementApply apply)
{
SltInfoVo bean = service.getSltExamInfo(apply);
SltInfoVo bean = sltAgreementInfoService.getSltExamInfo(apply);
return AjaxResult.success(bean);
}
@ -152,7 +158,7 @@ public class SltAgreementInfoController extends BaseController {
@GetMapping("/settlementReview")
public AjaxResult settlementReview(SltAgreementApply apply)
{
return toAjax(service.settlementReview(apply));
return toAjax(sltAgreementInfoService.settlementReview(apply));
}

View File

@ -55,12 +55,12 @@ public class PlanManagementVO {
/** 借出方原计划数 */
@Excel(name = "原计划数")
@ApiModelProperty(value = "借出方原计划数")
private String borrowerOrigPlanNum;
private Double borrowerOrigPlanNum;
/** 借出方现计划数 */
@Excel(name = "现计划数")
@ApiModelProperty(value = "借出方现计划数")
private String borrowerNowPlanNum;
private Double borrowerNowPlanNum;
/** 借入方单位 */
@Excel(name = "借入方单位")
@ -69,25 +69,25 @@ public class PlanManagementVO {
/** 借入方原计划数 */
@ApiModelProperty(value = "借入方原计划数")
private String lenderOrigPlanNum;
private Double lenderOrigPlanNum;
/** 借入方现计划数 */
@Excel(name = "现有计划数")
@ApiModelProperty(value = "借入方现计划数")
private String lenderNowPlanNum;
private Double lenderNowPlanNum;
/** 借出数 */
@Excel(name = "借调数量")
@ApiModelProperty(value = "借出数")
private String borrowNum;
private Double borrowNum;
/** 计划单价 */
@ApiModelProperty(value = "计划单价")
private String planPrice;
private Double planPrice;
/** 计划总价 */
@ApiModelProperty(value = "计划总价")
private String planCost;
private Double planCost;
/** 类型id */
@ApiModelProperty(value = "类型id")

View File

@ -47,17 +47,17 @@ public class PlanVO {
/** 计划数 */
@Excel(name = "计划数")
@ApiModelProperty(value = "计划数")
private String lenderOrigPlanNum;
private Double lenderOrigPlanNum;
/** 计划单价 */
@Excel(name = "计划单价")
@ApiModelProperty(value = "计划单价")
private String planPrice;
private Double planPrice;
/** 计划总价 */
@Excel(name = "计划总价")
@ApiModelProperty(value = "计划总价")
private String planCost;
private Double planCost;
/** 类型id */
@ApiModelProperty(value = "类型id")
@ -77,6 +77,10 @@ public class PlanVO {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 借出数 */
@ApiModelProperty(value = "借出数")
private Double borrowNum;
/** 备注 */
@Excel(name = "备注")
@ApiModelProperty(value = "备注")

View File

@ -133,4 +133,10 @@ public interface BackApplyMapper {
List<BackApplyInfo> selectIdByTaskId(Integer taskId);
int getUseNumByTypeId(String typeId);
int getManageType(String typeId);
int getLeaseOutNum(String typeId);
int getbackCheckNum(String typeId);
}

View File

@ -0,0 +1,23 @@
package com.bonus.sgzb.material.mapper;
import com.bonus.sgzb.system.api.domain.BmNumLogs;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface BmNumLogsMapper {
int deleteByPrimaryKey(Integer id);
int insert(BmNumLogs record);
int insertSelective(BmNumLogs record);
BmNumLogs selectByPrimaryKey(Integer id);
List<BmNumLogs> selectAll();
int updateByPrimaryKeySelective(BmNumLogs record);
int updateByPrimaryKey(BmNumLogs record);
}

View File

@ -375,7 +375,16 @@ public class BackApplyServiceImpl implements BackApplyService {
@Override
public int getUseNumByTypeId(String typeId) {
return backApplyMapper.getUseNumByTypeId(typeId);
int manageType = backApplyMapper.getManageType(typeId);
if (manageType == 0) {
// 编码入库的机具
return backApplyMapper.getUseNumByTypeId(typeId);
} else {
// 数量入库的机具
int leaseOutNum = backApplyMapper.getLeaseOutNum(typeId);
int backCheckNum = backApplyMapper.getbackCheckNum(typeId);
return leaseOutNum - backCheckNum;
}
}
}

View File

@ -0,0 +1,50 @@
package com.bonus.sgzb.material.service.impl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.bonus.sgzb.system.api.domain.BmNumLogs;
import com.bonus.sgzb.material.mapper.BmNumLogsMapper;
import java.util.List;
@Service
public class BmNumLogsService{
@Autowired
private BmNumLogsMapper bmNumLogsMapper;
public int deleteByPrimaryKey(Integer id) {
return bmNumLogsMapper.deleteByPrimaryKey(id);
}
public int insert(BmNumLogs record) {
return bmNumLogsMapper.insert(record);
}
public List<BmNumLogs> selectAll() {
return bmNumLogsMapper.selectAll();
}
public int insertSelective(BmNumLogs record) {
return bmNumLogsMapper.insertSelective(record);
}
public BmNumLogs selectByPrimaryKey(Integer id) {
return bmNumLogsMapper.selectByPrimaryKey(id);
}
public int updateByPrimaryKeySelective(BmNumLogs record) {
return bmNumLogsMapper.updateByPrimaryKeySelective(record);
}
public int updateByPrimaryKey(BmNumLogs record) {
return bmNumLogsMapper.updateByPrimaryKey(record);
}
}

View File

@ -14,8 +14,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
@ -162,15 +160,9 @@ public class PlanManagementServiceImpl implements PlanManagementService {
//新增plan_borrow_details
for (CheckDetailsInfo checkDetailsInfo : dto.getCheckDetailsList()) {
checkDetailsInfo.setPlanId(dto.getBorrowId());
//checkDetailsInfo.setCreateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
}
res += planManagementMapper.insertPlanBorrowDetail(dto.getCheckDetailsList());
return res;
}
public static void main(String[] args) {
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println(simpleDateFormat.format(new Date()));
}
}

View File

@ -336,39 +336,17 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
checkDetailsMapper.updatePurchaseCheckDetailsByTaskId(taskId, typeId);
}
}
//判断是否全部已操作通过或不通过
int count=purchaseMacodeInfoMapper.isOperateAll(taskId);
if (count<=0){
//是否为全部不通过
int count1 = purchaseMacodeInfoMapper.selectPurchaseCheckDetailsStatus(taskId);
if (count1>0){
TmTask task = new TmTask();
task.setTaskId(taskId);
task.setTaskStatus(28);
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
task.setUpdateTime(DateUtils.getNowDate());
taskMapper.updateTmTask(task);
}else {
TmTask task = new TmTask();
task.setTaskId(taskId);
task.setTaskStatus(107);
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
task.setUpdateTime(DateUtils.getNowDate());
taskMapper.updateTmTask(task);
}
//全部审核任务状态改为已审核
TmTask task = new TmTask();
task.setTaskId(taskId);
task.setTaskStatus(28);
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
task.setUpdateTime(DateUtils.getNowDate());
taskMapper.updateTmTask(task);
}
// // 当全部审核的时候任务改为入库状态
// Integer count = purchaseMacodeInfoMapper.selectMacodeInfoStatusByTaskId(taskId);
// if (count <= 0) {
// TmTask task = new TmTask();
// task.setTaskId(taskId);
// task.setTaskStatus(28);
// task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
// task.setUpdateTime(DateUtils.getNowDate());
// taskMapper.updateTmTask(task);
// }
return 1;
}

View File

@ -9,16 +9,14 @@ import com.bonus.sgzb.common.core.utils.DateUtils;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.security.utils.SecurityUtils;
import com.bonus.sgzb.material.domain.AgreementInfo;
import com.bonus.sgzb.material.domain.RepairTaskDetails;
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
import com.bonus.sgzb.material.domain.TmTask;
import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper;
import com.bonus.sgzb.material.service.SltAgreementInfoService;
import com.bonus.sgzb.material.vo.GlobalContants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -31,20 +29,24 @@ import java.util.List;
*/
@Service
public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
@Autowired
private SltAgreementInfoMapper mapper;
@Resource
private SltAgreementInfoMapper sltAgreementInfoMapper;
@Override
public List<AgreementInfo> getSltAgreementInfo(AgreementInfo bean) {
return mapper.getSltAgreementInfo(bean);
public List<AgreementInfo> getSltAgreementInfo(AgreementInfo bean) {
return sltAgreementInfoMapper.getSltAgreementInfo(bean);
}
@Override
public SltInfoVo getSltInfo(List<AgreementInfo> list) {
SltInfoVo sltInfoVo = new SltInfoVo();
//租赁费用列表
List<SltAgreementInfo> leaseList = getLeaseList(list);
//维修费用列表
List<SltAgreementInfo> repairList = getRepairList(list);
//报废费用列表
List<SltAgreementInfo> scrapList = getScrapList(list);
//丢失费用列表
List<SltAgreementInfo> loseList = getLoseList(list);
sltInfoVo.setLeaseList(leaseList);
sltInfoVo.setRepairList(repairList);
@ -59,8 +61,8 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
public SltInfoVo getSltExamInfo(SltAgreementApply apply) {
SltInfoVo sltInfoVo = new SltInfoVo();
List<AgreementInfo> list = new ArrayList<>();
String cost = mapper.getCost(apply);
List<SltAgreementRelation> relations = mapper.getRelations(apply);
String cost = sltAgreementInfoMapper.getCost(apply);
List<SltAgreementRelation> relations = sltAgreementInfoMapper.getRelations(apply);
sltInfoVo.setRelations(relations);
for (SltAgreementRelation relation : relations){
AgreementInfo info = new AgreementInfo();
@ -84,10 +86,10 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
public int settlementReview(SltAgreementApply apply) {
Long userid = SecurityUtils.getLoginUser().getUserid();
apply.setAuditor(String.valueOf(userid));
int i = mapper.updateRelation(apply);
int i = sltAgreementInfoMapper.updateRelation(apply);
int j = 0;
if (i > 0){
List<SltAgreementRelation> relations = mapper.getRelations(apply);
List<SltAgreementRelation> relations = sltAgreementInfoMapper.getRelations(apply);
List<AgreementInfo> infos = new ArrayList<>();
for (SltAgreementRelation bean : relations){
AgreementInfo info = new AgreementInfo();
@ -97,12 +99,13 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
List<SltAgreementInfo> loseList = getLoseList(infos);
for (SltAgreementInfo agreementInfo : loseList){
if (agreementInfo.getMaId() != null && agreementInfo.getMaId().isEmpty()){
mapper.updateMaStatus(agreementInfo);
sltAgreementInfoMapper.updateMaStatus(agreementInfo);
}
}
j = mapper.updateApply(apply);
j = sltAgreementInfoMapper.updateApply(apply);
}else {
throw new ServiceException("结算审核失败");
//throw new ServiceException(ExceptionDict.SETTLEMENT_REVIEW_ERROR_MSG,ExceptionDict.SETTLEMENT_REVIEW_ERROR);
}
return j;
}
@ -111,10 +114,14 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
List<SltAgreementRelation> relations = new ArrayList<>();
for (AgreementInfo info : list){
SltAgreementRelation relation = new SltAgreementRelation();
BigDecimal loseCost = new BigDecimal("0");
/*BigDecimal loseCost = new BigDecimal("0");
BigDecimal leaseCost = new BigDecimal("0");
BigDecimal scrapCost = new BigDecimal("0");
BigDecimal repairCost = new BigDecimal("0");
BigDecimal repairCost = new BigDecimal("0");*/
BigDecimal loseCost = BigDecimal.ZERO;
BigDecimal leaseCost = BigDecimal.ZERO;
BigDecimal scrapCost = BigDecimal.ZERO;
BigDecimal repairCost = BigDecimal.ZERO;
for (SltAgreementInfo lease : leaseList){
if (lease.getAgreementId().equals(info.getAgreementId().toString())){
relation.setAgreementId(lease.getAgreementId());
@ -139,6 +146,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
}
for (SltAgreementInfo lose : loseList){
if (lose.getAgreementId().equals(info.getAgreementId().toString())){
//TODO 上面已经set过值这里为什么还要set值
relation.setAgreementId(lose.getAgreementId());
relation.setProjectName(lose.getProjectName());
relation.setUnitName(lose.getUnitName());
@ -166,17 +174,18 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
apply.setCreator(String.valueOf(userid));
apply.setCode(code);
apply.setCompanyId(relations.get(0).getCompanyId());
int i = mapper.insApply(apply);
int i = sltAgreementInfoMapper.insApply(apply);
if (i > 0){
for (SltAgreementRelation relation : relations){
AgreementInfo info = new AgreementInfo();
info.setAgreementId(Long.valueOf(relation.getAgreementId()));
list.add(info);
relation.setApplyId(String.valueOf(apply.getId()));
mapper.updateInfoStatus(relation.getAgreementId());
int j = mapper.insRelation(relation);
sltAgreementInfoMapper.updateInfoStatus(relation.getAgreementId());
int j = sltAgreementInfoMapper.insRelation(relation);
if (j < 0){
throw new ServiceException("新增协议结算记录失败");
//throw new ServiceException(ExceptionDict.NEW_AGREEMENT_SETTLEMENT_ERROR_MSG,ExceptionDict.NEW_AGREEMENT_SETTLEMENT_ERROR);
}
}
List<SltAgreementInfo> leaseList = getLeaseList(list);
@ -185,45 +194,57 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
List<SltAgreementInfo> loseList = getLoseList(list);
for (SltAgreementInfo info : leaseList){
info.setSltType("1");
//info.setSltType(CostTypeEnum.LEASE_COST.getCode());
info.setApplyId(String.valueOf(apply.getId()));
info.setPartType("1");
mapper.insDetails(info);
//info.setPartType(PartTypeEnum.CHARGE.getCode());
sltAgreementInfoMapper.insDetails(info);
}
for (SltAgreementInfo info : repairList){
info.setSltType("3");
//info.setSltType(CostTypeEnum.MAINTENANCE_COST.getCode());
info.setApplyId(String.valueOf(apply.getId()));
mapper.insDetails(info);
//对是否收费进行转换
//info.setPartType(PartTypeEnum.getCodeByInfo(info.getPartType()));
info.setPartType(info.getPartType()=="不收费" ? "0" : "1");
sltAgreementInfoMapper.insDetails(info);
}
for (SltAgreementInfo info : scrapList){
info.setSltType("4");
//info.setSltType(CostTypeEnum.SCRAP_COST.getCode());
info.setApplyId(String.valueOf(apply.getId()));
info.setPartType(info.getScrapType());
mapper.insDetails(info);
//info.setPartType(info.getScrapType());
//info.setPartType(ScrapTypeEnum.getCodeByInfo(info.getScrapType()));
info.setPartType(info.getScrapType()=="自然" ? "0" : "1");
sltAgreementInfoMapper.insDetails(info);
}
for (SltAgreementInfo info : loseList){
info.setSltType("2");
//info.setSltType(CostTypeEnum.LOSE_COST.getCode());
info.setApplyId(String.valueOf(apply.getId()));
info.setPartType("1");
mapper.insDetails(info);
info.setPartType("1");
//info.setPartType(PartTypeEnum.CHARGE.getCode());
sltAgreementInfoMapper.insDetails(info);
}
}else {
throw new ServiceException("新增结算单号失败");
//throw new ServiceException(ExceptionDict.NEW_SETTLEMENT_NUMBER_ERROR_MSG,ExceptionDict.NEW_SETTLEMENT_NUMBER_ERROR);
}
return AjaxResult.success();
}
@Override
public List<SltAgreementApply> getSltExam(AgreementInfo bean) {
return mapper.getSltExam(bean);
return sltAgreementInfoMapper.getSltExam(bean);
}
public List<SltAgreementInfo> getLoseList(List<AgreementInfo> list) {
List<SltAgreementInfo> loseList = new ArrayList<>();
for (AgreementInfo bean : list){
List<SltAgreementInfo> oneOflist = mapper.getLoseList(bean);
loseList.addAll(oneOflist);
List<SltAgreementInfo> oneOfList = sltAgreementInfoMapper.getLoseList(bean);
loseList.addAll(oneOfList);
}
for (SltAgreementInfo bean : loseList){
if (bean.getBuyPrice() == null){
@ -235,7 +256,14 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
BigDecimal buyPrice = new BigDecimal(bean.getBuyPrice());
BigDecimal num = new BigDecimal(bean.getNum());
BigDecimal costs = buyPrice.multiply(num);
bean.setCosts(String.valueOf(costs));
//计算租赁费用
/* BigDecimal costs = BigDecimal.ZERO;
if (bean.getBuyPrice() != null && bean.getNum() != null){
BigDecimal buyPrice = new BigDecimal(bean.getBuyPrice());
BigDecimal num = new BigDecimal(bean.getNum());
costs = buyPrice.multiply(num);
}
bean.setCosts(String.valueOf(costs));*/
}
return loseList;
}
@ -243,15 +271,17 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
public List<SltAgreementInfo> getScrapList(List<AgreementInfo> list) {
List<SltAgreementInfo> scrapList = new ArrayList<>();
String taskType = "57";
//String taskType = TaskTypeEnum.SCRAP_TASK.getCode();
for (AgreementInfo bean : list){
List<TmTask> taskList = mapper.getTaskList(bean,taskType);
List<TmTask> taskList = sltAgreementInfoMapper.getTaskList(bean,taskType);
if (taskList != null && taskList.size() > 0){
List<SltAgreementInfo> scrapDetailsList = mapper.getScrapDetailsList(taskList);
List<SltAgreementInfo> scrapDetailsList = sltAgreementInfoMapper.getScrapDetailsList(taskList);
scrapList.addAll(scrapDetailsList);
}
}
if (scrapList != null && scrapList.size() > 0){
for (SltAgreementInfo bean : scrapList){
if (bean.getBuyPrice() == null){
bean.setBuyPrice("0");
}
@ -261,6 +291,13 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
BigDecimal buyPrice = new BigDecimal(bean.getBuyPrice());
BigDecimal num = new BigDecimal(bean.getNum());
BigDecimal costs = buyPrice.multiply(num);
//计算总金额
/*BigDecimal costs = BigDecimal.ZERO;
if (bean.getBuyPrice() != null && bean.getBuyPrice() != null){
BigDecimal buyPrice = new BigDecimal(bean.getBuyPrice());
BigDecimal num = new BigDecimal(bean.getNum());
costs = buyPrice.multiply(num);
}*/
bean.setCosts(String.valueOf(costs));
}
}
@ -271,10 +308,11 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
public List<SltAgreementInfo> getRepairList(List<AgreementInfo> list) {
List<SltAgreementInfo> repairList = new ArrayList<>();
String taskType = "41";
//String taskType = TaskTypeEnum.MAINTENANCE_TASK.getCode();
for (AgreementInfo bean : list){
List<TmTask> taskList = mapper.getTaskList(bean,taskType);
List<TmTask> taskList = sltAgreementInfoMapper.getTaskList(bean,taskType);
if (taskList != null && taskList.size() > 0){
List<SltAgreementInfo> repairDetailsList = mapper.getRepairDetailsList(taskList);
List<SltAgreementInfo> repairDetailsList = sltAgreementInfoMapper.getRepairDetailsList(taskList);
repairList.addAll(repairDetailsList);
}
}
@ -284,8 +322,8 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
public List<SltAgreementInfo> getLeaseList(List<AgreementInfo> list) {
List<SltAgreementInfo> leaseList = new ArrayList<>();
for (AgreementInfo bean : list){
List<SltAgreementInfo> oneOflist = mapper.getLeaseList(bean);
leaseList.addAll(oneOflist);
List<SltAgreementInfo> oneOfList = sltAgreementInfoMapper.getLeaseList(bean);
leaseList.addAll(oneOfList);
}
for (SltAgreementInfo bean : leaseList){
if (bean.getLeasePrice() == null){
@ -302,6 +340,15 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays());
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays);
bean.setCosts(String.valueOf(costs));
/* BigDecimal costs = BigDecimal.ZERO;
//当单价数量租赁天数都不为空时计算总价
if(bean.getLeasePrice() != null && bean.getNum() != null && bean.getLeaseDays() != null){
BigDecimal leasePrice = new BigDecimal(bean.getLeasePrice());
BigDecimal num = new BigDecimal(bean.getNum());
BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays());
costs = leasePrice.multiply(num).multiply(leaseDays);
}
bean.setCosts(String.valueOf(costs));*/
}
return leaseList;
}
@ -311,7 +358,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
Date nowDate = DateUtils.getNowDate();
String format = dateFormat.format(nowDate);
int taskNum = mapper.selectNumByDate(nowDate) + 1;
//String format = DateUtils.dateTime();
//为什么要加1是为了防止结果为0
int taskNum = sltAgreementInfoMapper.selectNumByDate(nowDate) + 1;
String codeNum = "";
if (taskNum > GlobalContants.NUM1 && taskNum < GlobalContants.NUM2) {
codeNum = code + format + "-00" + taskNum;

View File

@ -413,7 +413,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
BackApplyInfo backCheckDetails = new BackApplyInfo();
for (BackApplyInfo backApplyInfo2 : backApplyInfoList) {
if (backApplyInfo1.getCompanyId().equals(backApplyInfo2.getCompanyId())) {
backCheckDetails.setParentId(backApplyInfo1.getId().intValue());
backCheckDetails.setParentId(backApplyInfo2.getId().intValue());
backCheckDetails.setTypeId(backApplyInfo1.getTypeId());
backCheckDetails.setMaId(backApplyInfo1.getMaId());
backCheckDetails.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());

View File

@ -516,6 +516,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.type_name typeCode,
mt2.type_name AS typeName,
bagi.agreement_code as agreementCode,
bad.pre_num AS preNum,
bad.audit_num AS num
FROM
back_apply_details bad
@ -814,5 +815,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getUseNumByTypeId" resultType="java.lang.Integer">
select count(*) as useNum from ma_machine where type_id = #{typeId} and ma_status in (16,84)
</select>
<select id="getManageType" resultType="java.lang.Integer">
select mt.manage_type AS manageType FROM ma_type mt WHERE mt.type_id = #{typeId}
</select>
<select id="getLeaseOutNum" resultType="java.lang.Integer">
SELECT sum(lod.out_num) FROM lease_out_details lod WHERE lod.type_id = #{typeId}
</select>
<select id="getbackCheckNum" resultType="java.lang.Integer">
SELECT sum(bcd.back_num) FROM back_check_details bcd WHERE bcd.type_id = #{typeId}
</select>
</mapper>

View File

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.sgzb.material.mapper.BmNumLogsMapper">
<resultMap id="BaseResultMap" type="com.bonus.sgzb.system.api.domain.BmNumLogs">
<!--@mbg.generated-->
<!--@Table bm_num_logs-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="model_title" jdbcType="VARCHAR" property="modelTitle" />
<result column="method" jdbcType="VARCHAR" property="method" />
<result column="task" jdbcType="VARCHAR" property="task" />
<result column="type_id" jdbcType="INTEGER" property="typeId" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="json_result" jdbcType="VARCHAR" property="jsonResult" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="creator" jdbcType="VARCHAR" property="creator" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="status" jdbcType="TINYINT" property="status" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, model_title, `method`, task, type_id, description, json_result, `time`, creator,
remark, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from bm_num_logs
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from bm_num_logs
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from bm_num_logs
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.system.api.domain.BmNumLogs" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into bm_num_logs (model_title, `method`, task,
type_id, description, json_result,
`time`, creator, remark
)
values (#{modelTitle,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{task,jdbcType=VARCHAR},
#{typeId,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, #{jsonResult,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.system.api.domain.BmNumLogs" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into bm_num_logs
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="modelTitle != null and modelTitle != ''">
model_title,
</if>
<if test="method != null and method != ''">
`method`,
</if>
<if test="task != null and task != ''">
task,
</if>
<if test="typeId != null">
type_id,
</if>
<if test="description != null and description != ''">
description,
</if>
<if test="jsonResult != null and jsonResult != ''">
json_result,
</if>
<if test="time != null">
`time`,
</if>
<if test="creator != null and creator != ''">
creator,
</if>
<if test="remark != null and remark != ''">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="modelTitle != null and modelTitle != ''">
#{modelTitle,jdbcType=VARCHAR},
</if>
<if test="method != null and method != ''">
#{method,jdbcType=VARCHAR},
</if>
<if test="task != null and task != ''">
#{task,jdbcType=VARCHAR},
</if>
<if test="typeId != null">
#{typeId,jdbcType=INTEGER},
</if>
<if test="description != null and description != ''">
#{description,jdbcType=VARCHAR},
</if>
<if test="jsonResult != null and jsonResult != ''">
#{jsonResult,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="creator != null and creator != ''">
#{creator,jdbcType=VARCHAR},
</if>
<if test="remark != null and remark != ''">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.sgzb.system.api.domain.BmNumLogs">
<!--@mbg.generated-->
update bm_num_logs
<set>
<if test="modelTitle != null and modelTitle != ''">
model_title = #{modelTitle,jdbcType=VARCHAR},
</if>
<if test="method != null and method != ''">
`method` = #{method,jdbcType=VARCHAR},
</if>
<if test="task != null and task != ''">
task = #{task,jdbcType=VARCHAR},
</if>
<if test="typeId != null">
type_id = #{typeId,jdbcType=INTEGER},
</if>
<if test="description != null and description != ''">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="jsonResult != null and jsonResult != ''">
json_result = #{jsonResult,jdbcType=VARCHAR},
</if>
<if test="time != null">
`time` = #{time,jdbcType=TIMESTAMP},
</if>
<if test="creator != null and creator != ''">
creator = #{creator,jdbcType=VARCHAR},
</if>
<if test="remark != null and remark != ''">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.bonus.sgzb.system.api.domain.BmNumLogs">
<!--@mbg.generated-->
update bm_num_logs
set model_title = #{modelTitle,jdbcType=VARCHAR},
`method` = #{method,jdbcType=VARCHAR},
task = #{task,jdbcType=VARCHAR},
type_id = #{typeId,jdbcType=INTEGER},
description = #{description,jdbcType=VARCHAR},
json_result = #{jsonResult,jdbcType=VARCHAR},
`time` = #{time,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -227,11 +227,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_supplier_info msi on pcd.supplier_id = msi.supplier_id
left join tm_task tk on pcd.task_id = tk.task_id
where 1=1
and pcd.status !=3
AND (
(pcd.bind_num IS NULL OR pcd.bind_num = 0) AND pcd.STATUS != 5
OR (pcd.bind_num IS NOT NULL AND pcd.bind_num != 0)
)
and pcd.check_result='通过'
-- and pcd.status !=3
-- AND (
-- (pcd.bind_num IS NULL OR pcd.bind_num = 0) AND pcd.STATUS != 5
-- OR (pcd.bind_num IS NOT NULL AND pcd.bind_num != 0)
-- )
<if test="taskId != null ">and pcd.task_id = #{taskId}</if>
<if test="keyWord != null and keyWord != ''">and (mt.type_name like concat('%',#{keyWord},'%')
or mt1.type_name like concat('%',#{keyWord}) or msi.supplier like concat('%',#{keyWord}))

View File

@ -319,10 +319,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) t
GROUP BY task_id
</select>
<select id="selectnotScrapByTaskId" resultType="com.bonus.sgzb.material.domain.ScrapApplyDetails">
<include refid="selectScrapApplyDetailsVo"/>
where task_id = #{taskId} and status = '0'
</select>
<select id="getBackApplyInfo" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
select id,
code,
@ -338,6 +340,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from back_apply_info
where id = #{parentId}
</select>
<select id="getRepairAudit" resultType="com.bonus.sgzb.material.domain.RepairAuditDetails">
select id,
task_id as taskId,
@ -350,11 +353,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from repair_audit_details
where id = #{parentId}
</select>
<select id="getRepairId" resultType="java.lang.String">
select repair_id
from repair_audit_details
where id = #{parentId}
</select>
<select id="getByRepairId" resultType="com.bonus.sgzb.material.domain.RepairAuditDetails">
select task_id as taskId,
ma_id as maId,
@ -362,6 +367,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from repair_apply_details
where id = #{repairId}
</select>
<select id="getRepairRecord" resultType="com.bonus.sgzb.material.domain.RepairRecord">
select scrap_num as scrapNum,
scrap_reason as scrapReason,
@ -379,11 +385,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and rar.type_id = #{typeId}
</if>
</select>
<select id="getFileUrl" resultType="java.lang.String">
select file_url
from sys_file_info
where id = #{s}
</select>
<select id="getGyoupRepairRecord" resultType="com.bonus.sgzb.material.domain.RepairRecord">
select sum(scrap_num) as scrapNum,
scrap_reason as scrapReason,

View File

@ -492,7 +492,7 @@
dai.id = #{id}
AND sai.STATUS = '0'
GROUP BY
dad.id,sai.ma_id,sai.type_id
dad.id,sai.type_id
</select>
<select id="getListAll" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
SELECT

View File

@ -32,8 +32,8 @@ import com.bonus.sgzb.system.service.ISysOperLogService;
*/
@RestController
@RequestMapping("/operlog")
public class SysOperlogController extends BaseController
{
public class SysOperlogController extends BaseController {
@Autowired
private ISysOperLogService operLogService;

View File

@ -202,6 +202,16 @@ export function getRecord(query) {
params: query
})
}
// 退料接收 撤回操作
export function revoke(data) {
return request({
url: 'base/backReceive/revoke',
method: 'post',
data: data
})
}
// 退料接收 完成接收
export function endBack(data) {
return request({

View File

@ -957,6 +957,7 @@
/** 工地直转--打开弹窗 */
handleAdd() {
this.resetForm('dialogForm')
this.dialogParams = {}
this.deviceList = []
this.open = true
this.title = '工地直转'
@ -965,7 +966,7 @@
//
handleSelectionChange(selection) {
this.selectedList = selection.map((item) => item)
console.log(this.selectedList)
// console.log(this.selectedList)
this.single = selection.length != 1
this.multiple = !selection.length
},

View File

@ -776,7 +776,12 @@
badId: this.rowObj.badId,
}
getViewByExamine(params).then((res) => {
this.loadingList = res.rows
this.loadingList = res.rows;
this.loadingList.forEach(item=>{
if(!item.num){
item.num = item.preNum;
}
})
this.loadingTotal = res.total
})
},
@ -857,11 +862,11 @@
}
},
checkNum(row){
const maxNum = row.num;
const maxNum = row.preNum;
if(row.num<=1){
row.num = 1;
row.num = 1
}else if(row.num>=maxNum){
row.num = maxNum;
row.num = maxNum
}
},
handleExam() {

View File

@ -93,9 +93,9 @@
<el-button size="mini" type="primary" @click="handleNumReturn(scope.row)" v-if="!isView&&scope.row.manageType=='1'&&scope.row.num>0">
数量退料
</el-button>
<!-- <el-button size="mini" icon="el-icon-zoom-in">
<el-button size="mini" icon="el-icon-zoom-in" @click="handleBackup(scope.row)" v-if="!isView&&scope.row.num<scope.row.preNum">
撤回
</el-button> -->
</el-button>
</template>
</el-table-column>
</el-table>
@ -240,7 +240,7 @@
</template>
<script>
import { receiveView ,getBackMachine,backReceiveRecordWeb,setNumBack,setCodeBack, getRecord, endBack } from "@/api/claimAndRefund/return";
import { receiveView ,getBackMachine,backReceiveRecordWeb,setNumBack,setCodeBack, getRecord, endBack, revoke } from "@/api/claimAndRefund/return";
import { getTypeList } from "@/api/store/warehousing";
import { equipmentTypeTree } from "@/api/store/tools";
import Treeselect from "@riophae/vue-treeselect";
@ -461,6 +461,22 @@
this.numList = [obj]
// this.getNumList()
},
//
handleBackup(row){
// console.log(row)
let param = {
parentId:row.id,
typeId:row.modelId,
manageType:row.manageType,
createBy:this.createBy,
}
revoke(param).then(response => {
if(response.code==200){
this.$modal.msgSuccess("操作成功");
this.handleQuery()
}
});
},
//退
handleCodeQuery() {
this.codeQuery.pageNum = 1;

View File

@ -101,7 +101,10 @@
<span v-if="scope.row.status==1">已验收</span>
<span v-if="scope.row.status==2">待通知</span>
<span v-if="scope.row.status==3">验收不通过</span>
<span v-if="scope.row.status==4">已入库</span>
<span v-if="scope.row.status==4">已审核</span>
<span v-if="scope.row.status==5">已审核</span>
<span v-if="scope.row.status==6">入库待审核</span>
<span v-if="scope.row.status==7">已审核</span>
</template>
</el-table-column>
<el-table-column
@ -336,7 +339,7 @@
@click="addUser(scope.row)"
>添加</el-button>
</template>
</template>
</el-table-column>-->
</el-table>
@ -853,4 +856,4 @@ export default {
display: none;
}
}
</style>
</style>

View File

@ -217,8 +217,10 @@
icon="el-icon-edit"
v-if="
scope.row.purchasingStatus != '已入库' &&
scope.row.purchasingStatus != '已审核' &&
scope.row.purchasingStatus != '已验收合格' &&
scope.row.purchasingStatus != '待审核' &&
scope.row.purchasingStatus != '验收不通过' &&
scope.row.purchasingStatus != '驳回'
"
@click="handleAccept(scope.row)"
@ -243,6 +245,7 @@
v-if="
scope.row.purchasingStatus == '已验收合格' ||
scope.row.purchasingStatus == '已入库' ||
scope.row.purchasingStatus == '已审核' ||
scope.row.purchasingStatus == '待审核'
"
@click="handlePrint(scope.row)"
@ -255,6 +258,7 @@
icon="el-icon-delete"
v-if="
scope.row.purchasingStatus != '已入库' &&
scope.row.purchasingStatus != '已审核' &&
scope.row.purchasingStatus != '已验收合格' &&
scope.row.purchasingStatus != '待审核'
"

View File

@ -134,8 +134,8 @@
<span v-if="scope.row.taskStatus == '26'">已验收合格</span>
<span v-if="scope.row.taskStatus == '105'">入库待审核</span>
<span v-if="scope.row.taskStatus == '106'">已驳回</span>
<span v-if="scope.row.taskStatus == '28'">入库</span>
<span v-if="scope.row.taskStatus == '107'">入库驳回</span>
<span v-if="scope.row.taskStatus == '28'">审核</span>
<span v-if="scope.row.taskStatus == '107'">已审核</span>
</template>
</el-table-column>
<el-table-column

View File

@ -142,7 +142,7 @@
<el-table-column label="状态" align="center" prop="taskStatus">
<template slot-scope="scope">
<span v-if="scope.row.taskStatus == '26'">已验收合格</span>
<span v-if="scope.row.taskStatus == '28'">入库</span>
<span v-if="scope.row.taskStatus == '28'">审核</span>
<span v-if="scope.row.taskStatus == '105'">待审核</span>
<span v-if="scope.row.taskStatus == '107'">已驳回</span>
</template>

View File

@ -436,7 +436,6 @@ export default {
if (selectedRowIndex !== -1) {
this.dialogForm.checkDetailsList.splice(selectedRowIndex, 1);
this.$refs.table.toggleRowSelection(scope.row, false);
debugger;
if (str == "remark") {
this.$message.warning("请先输入备注再进行勾选操作");
} else {