Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7fc237a04a
|
|
@ -199,6 +199,14 @@
|
|||
<artifactId>httpmime</artifactId>
|
||||
<version>4.5.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-api-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-security</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -4,20 +4,29 @@ import com.alibaba.fastjson2.JSON;
|
|||
import com.bonus.common.biz.annotation.StoreLog;
|
||||
import com.bonus.common.biz.domain.BmStorageLog;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutRequestVo;
|
||||
import com.bonus.common.biz.service.AsyncStoreLogService;
|
||||
import com.bonus.common.biz.utils.HttpResult;
|
||||
import com.bonus.common.core.constant.SecurityConstants;
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.system.api.RemoteUserService;
|
||||
import com.bonus.system.api.model.LoginUser;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -45,6 +54,9 @@ public class StoreLogAspect {
|
|||
@Resource
|
||||
private AsyncStoreLogService asyncStoreLogService;
|
||||
|
||||
@Resource
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 处理完请求后执行
|
||||
*
|
||||
|
|
@ -67,6 +79,12 @@ public class StoreLogAspect {
|
|||
bmStorageLog.setStatus(200L);
|
||||
// 请求的地址
|
||||
bmStorageLog.setMethod(StringUtils.substring(Objects.requireNonNull(ServletUtils.getRequest()).getRequestURI(), 0, 255));
|
||||
String username = SecurityUtils.getUsername();
|
||||
R<LoginUser> userInfo = remoteUserService.getUserInfo(username, SecurityConstants.INNER);
|
||||
if (ObjectUtils.isNotEmpty(userInfo))
|
||||
{
|
||||
bmStorageLog.setCreator(userInfo.getData().getSysUser().getNickName());
|
||||
}
|
||||
if (e != null) {
|
||||
bmStorageLog.setStatus(500L);
|
||||
bmStorageLog.setJsonResult(StringUtils.substring(e.getMessage(), 0, 2000));
|
||||
|
|
@ -76,7 +94,6 @@ public class StoreLogAspect {
|
|||
String methodName = joinPoint.getSignature().getName();
|
||||
bmStorageLog.setModelTitle(className + "." + methodName + "()");
|
||||
// 设置请求方式
|
||||
bmStorageLog.setMethod(ServletUtils.getRequest().getMethod());
|
||||
bmStorageLog.setModelTitle(storeLog.title());
|
||||
|
||||
if (StringUtils.isNotNull(jsonResult)) {
|
||||
|
|
@ -110,7 +127,23 @@ public class StoreLogAspect {
|
|||
String requestMethod = ServletUtils.getRequest().getMethod();
|
||||
Map<?, ?> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest());
|
||||
|
||||
// if (StringUtils.isEmpty(paramsMap) && (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))) {
|
||||
if (StringUtils.isEmpty(paramsMap) && (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))) {
|
||||
// 领料出库库存变化
|
||||
if (joinPoint.getArgs()[0] instanceof LeaseOutRequestVo) {
|
||||
LeaseOutRequestVo lod = (LeaseOutRequestVo) joinPoint.getArgs()[0];
|
||||
for (LeaseOutDetails leaseOutDetails : lod.getLeaseOutDetailsList()) {
|
||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
bmStorageLog.setTaskId(String.valueOf(leaseOutDetails.getParentId()));
|
||||
bmStorageLog.setTypeId(leaseOutDetails.getTypeId());
|
||||
bmStorageLog.setTypeName(leaseOutDetails.getTypeName());
|
||||
bmStorageLog.setManageType(String.valueOf(leaseOutDetails.getManageType()));
|
||||
bmStorageLog.setTypeModelName(leaseOutDetails.getTypeModelName());
|
||||
bmStorageLog.setPreStoreNum(leaseOutDetails.getPreStoreNum());
|
||||
bmStorageLog.setOutNum(Objects.isNull(leaseOutDetails.getInputNum()) ? BigDecimal.ZERO : leaseOutDetails.getInputNum());
|
||||
bmStorageLog.setPostStoreNum(leaseOutDetails.getPostStoreNum());
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
}
|
||||
// // 盘点入库操作
|
||||
// if (joinPoint.getArgs()[0] instanceof SavePutInfoDto) {
|
||||
// SavePutInfoDto savePutInfoDto = (SavePutInfoDto) joinPoint.getArgs()[0];
|
||||
|
|
@ -182,6 +215,6 @@ public class StoreLogAspect {
|
|||
// } else {
|
||||
// log.warn("没有获取到请求参数{},或请求方式不是POST、PUT请求:{}", joinPoint.getSignature(), requestMethod);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.common.biz.config;
|
||||
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.EncodeHintType;
|
||||
import com.google.zxing.MultiFormatWriter;
|
||||
|
|
@ -44,6 +45,9 @@ public class QrCodeUtils {
|
|||
/** 二维码容错率 */
|
||||
private static ErrorCorrectionLevel level = ErrorCorrectionLevel.L;
|
||||
|
||||
// 加文字二维码高
|
||||
private static final int WORDHEIGHT = 300;
|
||||
|
||||
/**
|
||||
* 生成带logo的二维码图片
|
||||
*
|
||||
|
|
@ -176,5 +180,97 @@ public class QrCodeUtils {
|
|||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加Logo
|
||||
* @param codeFile
|
||||
* @param qrUrl
|
||||
* @param words
|
||||
*/
|
||||
public static void drawLogoQRCode(File codeFile, String qrUrl, String words) {
|
||||
try {
|
||||
MultiFormatWriter multiFormatWriter = new MultiFormatWriter();
|
||||
// 参数顺序分别为:编码内容,编码类型,生成图片宽度,生成图片高度,设置参数
|
||||
Hashtable<EncodeHintType, Object> hints = new Hashtable<EncodeHintType, Object>();
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
|
||||
// 设置编码方式
|
||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||
hints.put(EncodeHintType.MARGIN, 0);
|
||||
BitMatrix bm = multiFormatWriter.encode(qrUrl, BarcodeFormat.QR_CODE, width, height, hints);
|
||||
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
|
||||
|
||||
// 开始利用二维码数据创建Bitmap图片,分别设为黑(0xFFFFFFFF)白(0xFF000000)两色
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
image.setRGB(x, y, bm.get(x, y) ? onColor : offColor);
|
||||
}
|
||||
}
|
||||
|
||||
// 新的图片,把带logo的二维码下面加上文字
|
||||
image = insertWords(image,words);
|
||||
|
||||
image.flush();
|
||||
if (!ImageIO.write(image, "jpg", codeFile)) {
|
||||
throw new IOException("Could not write an image of format jpg to " + codeFile);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入文字到图片中间
|
||||
* @param image
|
||||
* @param words
|
||||
* @return
|
||||
*/
|
||||
private static BufferedImage insertWords(BufferedImage image,String words){
|
||||
// 新的图片,把带logo的二维码下面加上文字
|
||||
if (StringUtils.isNotEmpty(words)) {
|
||||
|
||||
//创建一个带透明色的BufferedImage对象
|
||||
BufferedImage outImage = new BufferedImage(width, WORDHEIGHT, BufferedImage.TYPE_INT_RGB);
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < WORDHEIGHT; y++) {
|
||||
outImage.setRGB(x, y, offColor);
|
||||
}
|
||||
}
|
||||
System.err.println("---------1---------");
|
||||
Graphics2D outg = outImage.createGraphics();
|
||||
setGraphics2D(outg);
|
||||
System.err.println("---------2---------");
|
||||
// 画二维码到新的面板
|
||||
outg.drawImage(image, 0, 0, image.getWidth(), image.getHeight(), null);
|
||||
// 画文字到新的面板
|
||||
outg.setColor(Color.BLACK);
|
||||
// 字体、字型、字号
|
||||
outg.setFont(new Font("微软雅黑", Font.PLAIN, 18));
|
||||
//文字长度
|
||||
int strWidth = outg.getFontMetrics().stringWidth(words);
|
||||
//总长度减去文字长度的一半 (居中显示)
|
||||
int wordStartX=(width - strWidth) / 2;
|
||||
//height + (outImage.getHeight() - height) / 2 + 12
|
||||
int wordStartY=height + 10;
|
||||
// 画文字
|
||||
System.err.println("---------3---------");
|
||||
outg.drawString(words, wordStartX, wordStartY);
|
||||
outg.dispose();
|
||||
outImage.flush();
|
||||
System.err.println("---------4---------");
|
||||
return outImage;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 Graphics2D 属性 (抗锯齿)
|
||||
* @param graphics2D
|
||||
*/
|
||||
private static void setGraphics2D(Graphics2D graphics2D){
|
||||
graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
graphics2D.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_DEFAULT);
|
||||
Stroke s = new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER);
|
||||
graphics2D.setStroke(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import lombok.Data;
|
|||
import lombok.ToString;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 库存日志对象 bm_storage_log
|
||||
*
|
||||
|
|
@ -41,42 +43,42 @@ public class BmStorageLog extends BaseEntity
|
|||
/** 操作前库存数量 */
|
||||
@Excel(name = "操作前库存数量")
|
||||
@ApiModelProperty(value = "操作前库存数量")
|
||||
private Long preStoreNum;
|
||||
private BigDecimal preStoreNum;
|
||||
|
||||
/** 入库数量 */
|
||||
@Excel(name = "入库数量")
|
||||
@ApiModelProperty(value = "入库数量")
|
||||
private Long inNum;
|
||||
private BigDecimal inNum;
|
||||
|
||||
/** 出库数量 */
|
||||
@Excel(name = "出库数量")
|
||||
@ApiModelProperty(value = "出库数量")
|
||||
private Long outNum;
|
||||
private BigDecimal outNum;
|
||||
|
||||
/** 退库接收-总数量 */
|
||||
@Excel(name = "退库接收-总数量")
|
||||
@ApiModelProperty(value = "退库接收-总数量")
|
||||
private Long backNum;
|
||||
private BigDecimal backNum;
|
||||
|
||||
/** 退库接收-合格数量 */
|
||||
@Excel(name = "退库接收-合格数量")
|
||||
@ApiModelProperty(value = "退库接收-合格数量")
|
||||
private Long passNum;
|
||||
private BigDecimal passNum;
|
||||
|
||||
/** 退库接收-维修数量 */
|
||||
@Excel(name = "退库接收-维修数量")
|
||||
@ApiModelProperty(value = "退库接收-维修数量")
|
||||
private Long repairNum;
|
||||
private BigDecimal repairNum;
|
||||
|
||||
/** 退库接收-报废数量 */
|
||||
@Excel(name = "退库接收-报废数量")
|
||||
@ApiModelProperty(value = "退库接收-报废数量")
|
||||
private Long scrapNum;
|
||||
private BigDecimal scrapNum;
|
||||
|
||||
/** 操作后库存 */
|
||||
@Excel(name = "操作后库存")
|
||||
@ApiModelProperty(value = "操作后库存")
|
||||
private Long postStoreNum;
|
||||
private BigDecimal postStoreNum;
|
||||
|
||||
/** 任务id */
|
||||
@Excel(name = "任务id")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.lease.domain;
|
||||
package com.bonus.common.biz.domain.lease;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
|
@ -11,7 +11,6 @@ import lombok.Data;
|
|||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import org.apache.poi.hpsf.Decimal;
|
||||
|
||||
/**
|
||||
* 领料任务对象 lease_apply_info
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.material.lease.domain.vo;
|
||||
package com.bonus.common.biz.domain.lease;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -26,7 +26,7 @@ public interface RemoteStoreLogService {
|
|||
* @return 结果
|
||||
* @throws Exception 异常信息
|
||||
*/
|
||||
@PostMapping("/bm_storage_logs")
|
||||
@PostMapping("/bm_storage_log")
|
||||
R<Boolean> batchInsert(@RequestBody List<BmStorageLog> bmStorageLogList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.bonus.common.biz.service.factory;
|
||||
|
||||
import com.bonus.common.biz.domain.BmStorageLog;
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.biz.service.RemoteStoreLogService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物资库存日志服务降级处理
|
||||
|
|
@ -21,7 +25,13 @@ public class RemoteStoreLogFallbackFactory implements FallbackFactory<RemoteStor
|
|||
public RemoteStoreLogService create(Throwable throwable)
|
||||
{
|
||||
log.error("日志服务调用失败:{}", throwable.getMessage());
|
||||
return (sysLogsVo, s) -> null;
|
||||
return new RemoteStoreLogService()
|
||||
{
|
||||
@Override
|
||||
public R<Boolean> batchInsert(List<BmStorageLog> bmStorageLogList, String source) throws Exception {
|
||||
return R.fail("保存物资库存日志失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,106 @@
|
|||
package com.bonus.material.basic.controller;
|
||||
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.basic.domain.BmQrBoxInfo;
|
||||
import com.bonus.material.basic.service.BmQrBoxService;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author ma_sh
|
||||
* @create 2024/12/11 17:25
|
||||
*/
|
||||
@Api(tags = "二维码标准箱管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/bm_qrcode_box")
|
||||
public class BmQrBoxController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private BmQrBoxService qrBoxService;
|
||||
|
||||
/**
|
||||
* 查询二维码管理列表
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询二维码标准箱管理列表")
|
||||
@RequiresPermissions("basic:qrBox:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BmQrBoxInfo bmQrBoxInfo)
|
||||
{
|
||||
startPage();
|
||||
List<BmQrBoxInfo> list = qrBoxService.selectBmQrBoxInfoList(bmQrBoxInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增二维码标准箱管理")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("basic:qrBox:add")
|
||||
@SysLog(title = "二维码标准箱管理", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增二维码标准箱管理")
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody BmQrBoxInfo bmQrBoxInfo)
|
||||
{
|
||||
return qrBoxService.insertBmQrcodeInfo(bmQrBoxInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "二维码标准箱管理")
|
||||
@PreventRepeatSubmit
|
||||
//@RequiresPermissions("basic:qrBox:edit")
|
||||
@SysLog(title = "二维码标准箱管理", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改二维码标准箱")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody BmQrBoxInfo bmQrBoxInfo)
|
||||
{
|
||||
return qrBoxService.updateBmQrcodeInfo(bmQrBoxInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除二维码标准箱
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除二维码标准箱")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("basic:info:remove")
|
||||
@SysLog(title = "二维码标准箱管理", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除二维码标准箱")
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody BmQrBoxInfo bmQrBoxInfo)
|
||||
{
|
||||
return qrBoxService.deleteById(bmQrBoxInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载二维码标准箱
|
||||
* @param bmQrBoxInfo
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "下载二维码标准箱")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("basic:qrBox:download")
|
||||
@PostMapping("/download")
|
||||
public void download(@RequestBody BmQrBoxInfo bmQrBoxInfo, HttpServletResponse response)
|
||||
{
|
||||
qrBoxService.download(bmQrBoxInfo, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.basic.controller;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.InnerAuth;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -81,8 +82,8 @@ public class BmStorageLogController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "新增库存日志")
|
||||
@SysLog(title = "库存日志", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增库存日志")
|
||||
@PostMapping
|
||||
public AjaxResult batchInsert(@RequestBody BmStorageLog bmStorageLog)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult insert(@RequestBody BmStorageLog bmStorageLog)
|
||||
{
|
||||
return toAjax(bmStorageLogService.insertBmStorageLog(bmStorageLog));
|
||||
}
|
||||
|
|
@ -112,4 +113,10 @@ public class BmStorageLogController extends BaseController
|
|||
{
|
||||
return toAjax(bmStorageLogService.deleteBmStorageLogByIds(ids));
|
||||
}
|
||||
|
||||
@InnerAuth
|
||||
@PostMapping
|
||||
public AjaxResult batchInsert(@RequestBody List<BmStorageLog> bmStorageLogList) {
|
||||
return toAjax(bmStorageLogService.batchInsert(bmStorageLogList));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
package com.bonus.material.basic.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 二维码管理对象 bm_qrcode_info
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class BmQrBoxInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 二维码ID */
|
||||
private Long qrId;
|
||||
|
||||
@ApiModelProperty(value = "二维码标准箱名称")
|
||||
private String qrName;
|
||||
|
||||
/** 二维码 */
|
||||
@ApiModelProperty(value = "二维码")
|
||||
private String qrCode;
|
||||
|
||||
@ApiModelProperty(value = "二维码路径")
|
||||
private String qrUrl;
|
||||
|
||||
/** 类型ID */
|
||||
@ApiModelProperty(value = "类型ID")
|
||||
private Long typeId;
|
||||
|
||||
/** 二维码类型 */
|
||||
@ApiModelProperty(value = "二维码类型")
|
||||
private String qrType;
|
||||
|
||||
/** 任务ID */
|
||||
@Excel(name = "任务ID")
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@ApiModelProperty(value = "标准箱绑定机具数量")
|
||||
private Integer typeNum;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.bonus.material.basic.mapper;
|
||||
|
||||
import com.bonus.material.basic.domain.BmQrBoxInfo;
|
||||
import com.bonus.material.basic.domain.BmQrcodeInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author ma_sh
|
||||
* @create 2024/12/10 17:27
|
||||
*/
|
||||
public interface BmQrBoxMapper {
|
||||
|
||||
/**
|
||||
* 查询二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
List<BmQrBoxInfo> find(BmQrBoxInfo bmQrBoxInfo);
|
||||
|
||||
/**
|
||||
* 新增二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
int insertBmQrcodeInfo(BmQrBoxInfo bmQrBoxInfo);
|
||||
|
||||
/**
|
||||
* 修改二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
int updateBmQrcodeInfo(BmQrBoxInfo bmQrBoxInfo);
|
||||
|
||||
/**
|
||||
* 删除二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
int deleteById(BmQrBoxInfo bmQrBoxInfo);
|
||||
}
|
||||
|
|
@ -58,4 +58,11 @@ public interface BmStorageLogMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteBmStorageLogByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量插入库存日志
|
||||
* @param records
|
||||
* @return
|
||||
*/
|
||||
int batchInsert(List<BmStorageLog> records);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
package com.bonus.material.basic.service;
|
||||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.basic.domain.BmQrBoxInfo;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author ma_sh
|
||||
* @create 2024/12/10 17:26
|
||||
*/
|
||||
public interface BmQrBoxService {
|
||||
|
||||
/**
|
||||
* 查询二维码标准箱管理列表
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
List<BmQrBoxInfo> selectBmQrBoxInfoList(BmQrBoxInfo bmQrBoxInfo);
|
||||
|
||||
/**
|
||||
* 新增二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult insertBmQrcodeInfo(BmQrBoxInfo bmQrBoxInfo);
|
||||
|
||||
/**
|
||||
* 下载二维码标准箱
|
||||
* @param bmQrBoxInfo
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
void download(BmQrBoxInfo bmQrBoxInfo, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 修改二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult updateBmQrcodeInfo(BmQrBoxInfo bmQrBoxInfo);
|
||||
|
||||
/**
|
||||
* 删除二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult deleteById(BmQrBoxInfo bmQrBoxInfo);
|
||||
}
|
||||
|
|
@ -58,4 +58,11 @@ public interface IBmStorageLogService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteBmStorageLogById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增库存日志
|
||||
* @param bmStorageLogList
|
||||
* @return
|
||||
*/
|
||||
int batchInsert(List<BmStorageLog> bmStorageLogList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,140 @@
|
|||
package com.bonus.material.basic.service.impl;
|
||||
|
||||
import com.bonus.common.biz.config.BackstageApplication;
|
||||
import com.bonus.common.biz.config.DateTimeHelper;
|
||||
import com.bonus.common.biz.config.QrCodeUtils;
|
||||
import com.bonus.common.biz.enums.HttpCodeEnum;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.basic.domain.BmQrBoxInfo;
|
||||
import com.bonus.material.basic.mapper.BmQrBoxMapper;
|
||||
import com.bonus.material.basic.service.BmQrBoxService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author ma_sh
|
||||
* @create 2024/12/10 17:26
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BmQrBoxServiceImpl implements BmQrBoxService {
|
||||
|
||||
@Resource
|
||||
private BmQrBoxMapper bmQrBoxMapper;
|
||||
|
||||
/**
|
||||
* 查询二维码标准箱管理列表
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BmQrBoxInfo> selectBmQrBoxInfoList(BmQrBoxInfo bmQrBoxInfo) {
|
||||
return bmQrBoxMapper.find(bmQrBoxInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult insertBmQrcodeInfo(BmQrBoxInfo bmQrBoxInfo) {
|
||||
//生成二维码
|
||||
String code = "BOX-" + DateTimeHelper.getNowTimeFomart();
|
||||
bmQrBoxInfo.setQrCode(code);
|
||||
bmQrBoxInfo.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
|
||||
bmQrBoxInfo.setCreateTime(DateUtils.getNowDate());
|
||||
int result = bmQrBoxMapper.insertBmQrcodeInfo(bmQrBoxInfo);
|
||||
return result > 0 ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载二维码标准箱
|
||||
* @param bmQrBoxInfo
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void download(BmQrBoxInfo bmQrBoxInfo, HttpServletResponse response) {
|
||||
try {
|
||||
List<BmQrBoxInfo> list = bmQrBoxMapper.find(bmQrBoxInfo);
|
||||
String code = "无编码";
|
||||
if (list.size() > 0) {
|
||||
code = list.get(0).getQrCode();
|
||||
}
|
||||
// 新购管理-二维码打印-新增
|
||||
String url = BackstageApplication.getUrl() + "backstage/machine/qrCodePage?qrcode=" + code;
|
||||
// 二维码的图片格式
|
||||
String format = "jpg";
|
||||
//设置路径
|
||||
String mkdirsName = "images";
|
||||
// linux 系统路径
|
||||
String saveDirectory = "/data/imw/" + mkdirsName + "/";
|
||||
String os = System.getProperty("os.name");
|
||||
if (os.toLowerCase().startsWith("win")) {
|
||||
//本地路径
|
||||
saveDirectory = "D://files/" + mkdirsName + "/";
|
||||
}
|
||||
// 生成二维码
|
||||
File files = new File(saveDirectory);
|
||||
if (!files.exists()) {
|
||||
files.mkdirs();
|
||||
}
|
||||
QrCodeUtils.generateQRImage(url, saveDirectory, code + ".jpg", format);
|
||||
String qrUrl = saveDirectory + code + ".jpg";
|
||||
String path = qrUrl.replace("filePath", "/data/imw");
|
||||
// 判断照片是否存在
|
||||
File imageFile = new File(path);
|
||||
if (!imageFile.exists()) {
|
||||
log.warn("图片不存在");
|
||||
}
|
||||
//设置MIME类型
|
||||
response.setContentType("application/octet-stream");
|
||||
response.addHeader("Content-disposition", "attachment;filename=" + new String(path.getBytes(), "ISO-8859-1"));
|
||||
InputStream inputStream = new FileInputStream(imageFile);
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
byte[] bs = new byte[1024];
|
||||
while ((inputStream.read(bs) > 0)) {
|
||||
outputStream.write(bs);
|
||||
}
|
||||
outputStream.close();
|
||||
inputStream.close();
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult updateBmQrcodeInfo(BmQrBoxInfo bmQrBoxInfo) {
|
||||
bmQrBoxInfo.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
|
||||
bmQrBoxInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
int result = bmQrBoxMapper.updateBmQrcodeInfo(bmQrBoxInfo);
|
||||
return result > 0 ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除二维码标准箱管理
|
||||
* @param bmQrBoxInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult deleteById(BmQrBoxInfo bmQrBoxInfo) {
|
||||
int result = bmQrBoxMapper.deleteById(bmQrBoxInfo);
|
||||
return result > 0 ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,8 @@ package com.bonus.material.basic.service.impl;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.material.basic.mapper.BmStorageLogMapper;
|
||||
|
|
@ -15,6 +17,7 @@ import com.bonus.material.basic.service.IBmStorageLogService;
|
|||
* @date 2024-09-26
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BmStorageLogServiceImpl implements IBmStorageLogService {
|
||||
|
||||
@Autowired
|
||||
|
|
@ -93,4 +96,10 @@ public class BmStorageLogServiceImpl implements IBmStorageLogService {
|
|||
{
|
||||
return bmStorageLogMapper.deleteBmStorageLogById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsert(List<BmStorageLog> records) {
|
||||
log.info("batch insert log {}", records);
|
||||
return bmStorageLogMapper.batchInsert(records);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,10 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.domain.vo.LeaseOutRequestVo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutRequestVo;
|
||||
import com.bonus.material.lease.service.ILeaseApplyInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.bonus.material.lease.domain.vo;
|
|||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.material.lease.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
|
||||
/**
|
||||
* 领料任务Mapper接口
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ package com.bonus.material.lease.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.domain.vo.LeaseOutRequestVo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutRequestVo;
|
||||
|
||||
/**
|
||||
* 领料任务Service接口
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import com.bonus.common.security.utils.SecurityUtils;
|
|||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.domain.vo.LeaseOutRequestVo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutRequestVo;
|
||||
import com.bonus.material.lease.mapper.LeaseApplyDetailsMapper;
|
||||
import com.bonus.material.lease.service.ILeaseOutDetailsService;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
|
|
@ -25,7 +25,7 @@ import com.bonus.material.task.mapper.TmTaskMapper;
|
|||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.material.lease.mapper.LeaseApplyInfoMapper;
|
||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.material.lease.service.ILeaseApplyInfoService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.material.ma.mapper;
|
||||
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.material.ma.domain.DirectApplyDetails;
|
||||
import com.bonus.material.ma.domain.DirectApplyInfo;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//import com.bonus.common.core.annotation.Excel;
|
||||
//import com.bonus.common.core.web.domain.BaseEntity;
|
||||
//import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
//import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
//import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
//import io.swagger.annotations.ApiModelProperty;
|
||||
//import lombok.Data;
|
||||
//import java.util.List;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
<?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.material.basic.mapper.BmQrBoxMapper">
|
||||
|
||||
<select id="find" resultType="com.bonus.material.basic.domain.BmQrBoxInfo">
|
||||
select
|
||||
qr_id as qrId,
|
||||
qr_name as qrName,
|
||||
qr_code as qrCode,
|
||||
qr_type as qrType,
|
||||
create_by as createBy,
|
||||
create_time as createTime,
|
||||
update_by as updateBy,
|
||||
update_time as updateTime
|
||||
from bm_qrcode_box
|
||||
<where>
|
||||
<if test="qrId != null">and qr_id = #{qrId}</if>
|
||||
<if test="qrName != null and qrName != ''">and qr_name like concat('%',#{qrName},'%')</if>
|
||||
<if test="qrCode != null and qrCode != ''">and qr_code like concat('%',#{qrCode},'%')</if>
|
||||
<if test="qrType != null">and qr_type = #{qrType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertBmQrcodeInfo" parameterType="com.bonus.material.basic.domain.BmQrBoxInfo" useGeneratedKeys="true" keyProperty="qrId">
|
||||
insert into bm_qrcode_box
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="qrCode != null">qr_code,</if>
|
||||
<if test="qrName != null and qrName != ''">qr_name,</if>
|
||||
<if test="qrType != null">qr_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="qrCode != null">#{qrCode},</if>
|
||||
<if test="qrName != null and qrName != ''">#{qrName},</if>
|
||||
<if test="qrType != null">#{qrType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBmQrcodeInfo" parameterType="com.bonus.material.basic.domain.BmQrBoxInfo">
|
||||
update bm_qrcode_box
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="qrCode != null">qr_code = #{qrCode},</if>
|
||||
<if test="qrType != null">qr_type = #{qrType},</if>
|
||||
<if test="qrName != null and qrName != ''">qr_name = #{qrName},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
|
||||
</trim>
|
||||
where qr_id = #{qrId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from bm_qrcode_box
|
||||
where qr_id = #{qrId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -123,6 +123,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="com.bonus.common.biz.domain.BmStorageLog" useGeneratedKeys="true">
|
||||
insert into bm_storage_log (model_title, `method`, task_id, type_id,
|
||||
create_time, creator, remark, manage_type,
|
||||
type_name, type_model_name, pre_store_num, in_num, out_num,
|
||||
back_num, pass_num, repair_num, agreement_id,
|
||||
scrap_num, `status`, post_store_num, result_code, result_msg, json_result
|
||||
) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{item.modelTitle}, #{item.method}, #{item.taskId}, #{item.typeId},
|
||||
now(), #{item.creator}, #{item.remark}, #{item.manageType},#{item.typeName},
|
||||
#{item.typeModelName}, #{item.preStoreNum}, #{item.inNum},#{item.outNum},
|
||||
#{item.backNum}, #{item.passNum}, #{item.repairNum}, #{item.agreementId},
|
||||
#{item.scrapNum}, #{item.status}, #{item.postStoreNum},
|
||||
#{item.resultCode}, #{item.resultMsg}, #{item.jsonResult}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBmStorageLog" parameterType="com.bonus.common.biz.domain.BmStorageLog">
|
||||
update bm_storage_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.material.lease.mapper.LeaseApplyInfoMapper">
|
||||
<resultMap type="com.bonus.material.lease.domain.LeaseApplyInfo" id="LeaseApplyInfoResult">
|
||||
<resultMap type="com.bonus.common.biz.domain.lease.LeaseApplyInfo" id="LeaseApplyInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="taskId" column="task_id" />
|
||||
|
|
@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join bm_project bp on bp.pro_id = bai.project_id
|
||||
</sql>
|
||||
|
||||
<select id="selectLeaseApplyInfoList" parameterType="com.bonus.material.lease.domain.LeaseApplyInfo" resultMap="LeaseApplyInfoResult">
|
||||
<select id="selectLeaseApplyInfoList" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyInfo" resultMap="LeaseApplyInfoResult">
|
||||
<include refid="selectLeaseApplyInfoVo"/>
|
||||
<where>
|
||||
<if test="code != null and code != ''"> and lai.code = #{code}</if>
|
||||
|
|
@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where lai.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertLeaseApplyInfo" parameterType="com.bonus.material.lease.domain.LeaseApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insertLeaseApplyInfo" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into lease_apply_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">code,</if>
|
||||
|
|
@ -161,7 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateLeaseApplyInfo" parameterType="com.bonus.material.lease.domain.LeaseApplyInfo">
|
||||
<update id="updateLeaseApplyInfo" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
|
||||
update lease_apply_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null">code = #{code},</if>
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
values (#{directId},#{typeId},#{maId}, #{directNum},NOW())
|
||||
</insert>
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.material.lease.domain.LeaseApplyInfo" useGeneratedKeys="true">
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyInfo" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into lease_apply_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
|
|||
Loading…
Reference in New Issue