| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.exception; |
| | | |
| | | public class MyFileException extends RuntimeException{ |
| | | public MyFileException() { |
| | | } |
| | | |
| | | public MyFileException(String message) { |
| | | super(message); |
| | | } |
| | | |
| | | public MyFileException(Throwable cause) { |
| | | super(cause); |
| | | } |
| | | |
| | | public MyFileException(String message, Throwable cause) { |
| | | super(message, cause); |
| | | } |
| | | } |
| | |
| | | package com.yuanchu.mom.handler; |
| | | |
| | | import com.yuanchu.mom.exception.MyFileException; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException; |
| | | import org.apache.tomcat.util.http.fileupload.impl.SizeLimitExceededException; |
| | | import org.springframework.beans.ConversionNotSupportedException; |
| | | import org.springframework.beans.TypeMismatchException; |
| | | import org.springframework.beans.factory.NoSuchBeanDefinitionException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.dao.DuplicateKeyException; |
| | | import org.springframework.http.converter.HttpMessageNotReadableException; |
| | | import org.springframework.http.converter.HttpMessageNotWritableException; |
| | |
| | | import org.springframework.web.bind.MethodArgumentNotValidException; |
| | | import org.springframework.web.bind.annotation.ExceptionHandler; |
| | | import org.springframework.web.bind.annotation.RestControllerAdvice; |
| | | import org.springframework.web.multipart.MultipartException; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.FileNotFoundException; |
| | |
| | | return Result.fail(message); |
| | | } |
| | | |
| | | @Value("${spring.servlet.multipart.max-file-size}") |
| | | private String maxFileSize; |
| | | |
| | | @Value("${spring.servlet.multipart.max-request-size}") |
| | | private String maxRequestSize; |
| | | |
| | | /** |
| | | *æä»¶è¿å¤§æ¥éæç¤º |
| | | */ |
| | | @ExceptionHandler({MultipartException.class}) |
| | | public Result<?> fileUploadExceptionHandler(MultipartException e) { |
| | | String msg; |
| | | Throwable rootCause = e.getRootCause(); |
| | | if (rootCause instanceof FileSizeLimitExceededException) { |
| | | msg="ä¸ä¼ æä»¶è¿å¤§ãå个æä»¶å¤§å°ä¸å¾è¶
è¿" + maxFileSize + "ã"; |
| | | }else if(rootCause instanceof SizeLimitExceededException){ |
| | | msg="ä¸ä¼ æä»¶è¿å¤§ãæ»ä¸ä¼ 大å°ä¸å¾è¶
è¿" + maxRequestSize + "ã"; |
| | | }else { |
| | | msg="æä»¶ä¸ä¼ 失败ãæå¡å¨å¼å¸¸ã"; |
| | | } |
| | | return Result.fail(msg); |
| | | } |
| | | |
| | | /** æä»¶åç¼åä¸éè¿è¿åæç¤º */ |
| | | @ExceptionHandler({MyFileException.class}) |
| | | public Result<?> myFileException(Exception e) { |
| | | return Result.fail("æ±æä¸æ¯æã" + e.getMessage() +"ãåç¼çæä»¶ï¼"); |
| | | } |
| | | |
| | | /** å
¶ä»é误 */ |
| | | /** |
| | | * å
¶ä»é误 |
| | |
| | | package com.yuanchu.mom.utils; |
| | | |
| | | import com.yuanchu.mom.exception.MyFileException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.tomcat.util.http.fileupload.IOUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import org.springframework.util.FileSystemUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import javax.annotation.PostConstruct; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | |
| | |
| | | public class FileSaveUtil { |
| | | |
| | | // åymlä¸çè·¯å¾ + / |
| | | // @Value("${file.path}") |
| | | private String FILE_PATH; |
| | | private static String FILE_PATH; |
| | | |
| | | private static String[] ALLOWED; |
| | | |
| | | @Value("${file.path}") |
| | | private String file; |
| | | |
| | | @Value("${file.allowed}") |
| | | private String[] allowed; |
| | | |
| | | @PostConstruct |
| | | public void getFile() { |
| | | FILE_PATH = this.file; |
| | | } |
| | | |
| | | @PostConstruct |
| | | public void getAllowed(){ |
| | | ALLOWED = this.allowed; |
| | | } |
| | | /** |
| | | * å卿件䏻彿° |
| | | * @param content æä»¶äºè¿å¶æµ |
| | | * @param originalFilename æä»¶åç§° |
| | | * @param file æä»¶äºè¿å¶æµ |
| | | * @return è¿åæä»¶åç§°ç¨äºå卿°æ®åº |
| | | */ |
| | | public String StoreFile(byte[] content, String originalFilename) { |
| | | public static String StoreFile(MultipartFile file) { |
| | | String originalFilename = file.getOriginalFilename(); |
| | | // çæéæºåç§°ï¼æ¶é´_éæº6使°å |
| | | String FileName = System.currentTimeMillis() + "_" + MyUtil.getNumber(6); |
| | | String suffix = originalFilename.substring(originalFilename.lastIndexOf(".")); |
| | | String suffix = null; |
| | | if (originalFilename != null) { |
| | | suffix = originalFilename.substring(originalFilename.lastIndexOf(".")); |
| | | // 妿åç¼åä¸éè¿æåºå¼å¸¸ |
| | | if (!isFileAllowed(suffix)){ |
| | | throw new MyFileException(suffix); |
| | | } |
| | | } |
| | | // åç§°æ¼æ¥ |
| | | String fileName = FileName + suffix; |
| | | // è¿è¡åå¨ |
| | | storeFileWithFileName(content, fileName); |
| | | try { |
| | | storeFileWithFileName(file.getBytes(), fileName); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return fileName; |
| | | } |
| | | |
| | | public static Boolean DeleteFile(String fileName) { |
| | | return FileSystemUtils.deleteRecursively(new File(FILE_PATH + "/" + fileName)); |
| | | } |
| | | /** |
| | | * å卿件彿° |
| | | * @param content æä»¶äºè¿å¶æµ |
| | | * @param fileName æä»¶åç§° |
| | | */ |
| | | private void storeFileWithFileName(byte[] content, String fileName) { |
| | | private static void storeFileWithFileName(byte[] content, String fileName) { |
| | | // åå¨è·¯å¾ |
| | | String path = FILE_PATH + java.io.File.separatorChar; |
| | | String path = FILE_PATH + File.separatorChar; |
| | | // ç®å½ä¸åå¨åå建 |
| | | java.io.File file = new java.io.File(path); |
| | | File file = new File(path); |
| | | if (!file.exists()) { |
| | | file.mkdirs(); |
| | | } |
| | |
| | | MyUtil.PrintLog("å卿件å¼å¸¸ï¼" + e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 夿æä»¶æ¯å¦è¢«å
许ä¸ä¼ |
| | | * |
| | | * @param fileName æä»¶å |
| | | * @return å
许true, å¦åfalse |
| | | */ |
| | | private static boolean isFileAllowed(String fileName) { |
| | | // è·ååç¼å |
| | | String suffixName = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase(); |
| | | for (String allow : ALLOWED) { |
| | | if (allow.equals(suffixName)) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.yuanchu.mom.mapper.InspectUnacceptedMapper"> |
| | | <select id="selectUnRawInspectsList" resultType="java.util.Map"> |
| | | select |
| | | select ru.id |
| | | DATE_FORMAT(form_time, '%Y-%m-%d') 'æ¥ææ¥æ', |
| | | reason, |
| | | code, |
| | |
| | | </if> |
| | | and ru.state=1 |
| | | </where> |
| | | order by ru.id desc |
| | | </select> |
| | | <select id="selectInsList" resultType="java.util.Map"> |
| | | select DATE_FORMAT(fi.create_time, '%Y-%m-%d') 'æ¥ææ¥æ', |
| | | select ru.id |
| | | DATE_FORMAT(fi.create_time, '%Y-%m-%d') 'æ¥ææ¥æ', |
| | | reason, |
| | | material_code, |
| | | name, |
| | |
| | | and ru.type=#{type} |
| | | </if> |
| | | and ru.state=1 |
| | | order by ru.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.RawInspectMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.RawInspect"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="code" column="code" jdbcType="VARCHAR"/> |
| | |
| | | <result property="formTime" column="form_time" jdbcType="DATE"/> |
| | | </resultMap> |
| | | <select id="selectRawInspectsByLimit" resultType="com.yuanchu.mom.pojo.RawInspect"> |
| | | select id, code, name, specifications, unit, number, ins_state, judge_state, ins_time, user_name, create_time, form_time |
| | | from raw_inspect |
| | | select id, code, name, specifications, unit, number, ins_state, judge_state, ins_time, user_name, create_time, |
| | | form_time |
| | | from mom_ocean.raw_inspect |
| | | where state = 1 |
| | | <if test="formTime!=null and formTime!=''"> |
| | | and form_time = #{formTime} |
| | |
| | | <if test="judgeState!=2"> |
| | | and judge_state = #{judgeState} |
| | | </if> |
| | | order by id desc |
| | | limit #{pageSize},#{countSize} |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.dto.ConsignmentDto; |
| | | import com.yuanchu.mom.service.SaleService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | import com.yuanchu.mom.service.ConsignmentService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @ApiImplicitParam(name = "orderNumber", value = "订åç¼å·", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @GetMapping("/selSale") |
| | | public Result selSale(String orderNumber ) { |
| | | public Result selSale(String orderNumber) { |
| | | return Result.success(saleService.selSale(orderNumber)); |
| | | } |
| | | |
| | |
| | | return Result.success(consignmentService.addCon(data.get("name").replaceAll("\"", ""), consignmentDto)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢åè´§è®°å½å表") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页æ°", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "æ¡æ°/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "name", value = "产ååç§°", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "specifications", value = "产ååå·", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "time", value = "åè´§æ¥æ", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/selectAllCon") |
| | | public Result selectAllCon(int pageSize, int countSize, String name, String specifications, String time) { |
| | | IPage<Map<String, Object>> consignmentPage = consignmentService.selectAllCon(new Page<Object>(pageSize, countSize), name, specifications, time); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("total", consignmentPage.getTotal()); |
| | | map.put("row", consignmentPage.getRecords()); |
| | | return Result.success(map); |
| | | } |
| | | @ApiOperation(value = "æ ¹æ®åè´§idå é¤") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "åè´§id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delCon") |
| | | public Result delCon(Integer id) { |
| | | consignmentService.delCon(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "ids", value = "ids", dataTypeClass = Integer.class, dataType = "List", required = true) |
| | | }) |
| | | @PostMapping("/delAllCon") |
| | | public Result delAllCon(@RequestParam("ids") List<Integer> ids) { |
| | | consignmentService.delAllCon(ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.yuanchu.mom.service.ReceiptService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * åå表(Receipt)表æ§å¶å± |
| | | * |
| | | * @author zss |
| | | * @since 2023-08-11 10:08:54 |
| | | */ |
| | | @Api(tags = "WMS管ç-->åå管ç") |
| | | @RestController |
| | | @RequestMapping("/receipt") |
| | | public class ReceiptController { |
| | | |
| | | @Autowired |
| | | private ReceiptService receiptService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ååå表") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页æ°", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "æ¡æ°/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "name", value = "产ååç§°", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "orderCode", value = "订åç¼å·", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "type", value = "ç±»å(为空=å
¨é¨)", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "deliverTime", value = "åè´§æ¥æ", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/selectAllRece") |
| | | public Result selectAllRece(int pageSize, int countSize, String name, String orderCode, String type, String deliverTime) { |
| | | IPage<Map<String, Object>> receiptPage = receiptService.selectAllRece(new Page<Object>(pageSize, countSize), name, orderCode, type, deliverTime); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("total", receiptPage.getTotal()); |
| | | map.put("row", receiptPage.getRecords()); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ ¸é") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "ååid", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delRece") |
| | | public Result delRece(Integer id) { |
| | | receiptService.delRece(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éæ ¸é") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "ids", value = "ids", dataTypeClass = Integer.class, dataType = "List", required = true) |
| | | }) |
| | | @PostMapping("/delAllRece") |
| | | public Result delAllRece(@RequestParam("ids") List<Integer> ids) { |
| | | receiptService.delAllRece(ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¸ä¼ éä»¶") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "ååid", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "file", value = "ååæä»¶", dataTypeClass = MultipartFile.class, required = true) |
| | | }) |
| | | @PostMapping("/updRece") |
| | | public Result updRece(Integer id,@RequestPart MultipartFile file) { |
| | | receiptService.updRece(id, file); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥çåå") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "ååid", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/selReceDatil") |
| | | public ResponseEntity<byte[]> selReceDatil(Integer id) throws IOException { |
| | | return receiptService.selReceDatil(id); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.Consignment; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æåå货表(Consignment)è¡¨æ°æ®åºè®¿é®å± |
| | |
| | | |
| | | //æ¥è¯¢ææåè´§è®°å½ |
| | | List<Consignment> selectAll(); |
| | | |
| | | //æ¥è¯¢åè´§è®°å½å表 |
| | | IPage<Map<String, Object>> selectAllCon(Page<Object> page, String name, String specifications, String time); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.Receipt; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * åå表(Receipt)è¡¨æ°æ®åºè®¿é®å± |
| | | * |
| | | * @author zss |
| | | * @since 2023-08-11 10:08:54 |
| | | */ |
| | | public interface ReceiptMapper extends BaseMapper<Receipt> { |
| | | |
| | | //æ¥è¯¢ååå表 |
| | | IPage<Map<String, Object>> selectAllRece(Page<Object> page, String name, String orderCode, String type, String deliverTime); |
| | | |
| | | } |
| | | |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * ${column.comment} |
| | | **/ |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.*; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * åå表(Receipt)表å®ä½ç±» |
| | | * |
| | | * @author zss |
| | | * @since 2023-08-11 10:08:55 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Builder |
| | | @TableName("receipt") |
| | | public class Receipt implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | **/ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 订åç¼å· |
| | | **/ |
| | | private String orderCode; |
| | | |
| | | /** |
| | | * ååç¼å·(客æ·è®¢åå·) |
| | | **/ |
| | | private String customerCode; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | **/ |
| | | private String proname; |
| | | |
| | | /** |
| | | * å°è´§å°å |
| | | **/ |
| | | private String adress; |
| | | |
| | | /** |
| | | * å°è´§è系人 |
| | | **/ |
| | | private String name; |
| | | |
| | | /** |
| | | * ææºå· |
| | | **/ |
| | | private String phone; |
| | | |
| | | /** |
| | | * æ¼è¿åç¼å· |
| | | **/ |
| | | private String escortCode; |
| | | |
| | | /** |
| | | * åè´§æ¥æ |
| | | **/ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date deliverTime; |
| | | |
| | | /** |
| | | * å货人 |
| | | **/ |
| | | private String userName; |
| | | |
| | | /** |
| | | * ç¶æ0:å¾
åå;1:å·²åå |
| | | **/ |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "é»è¾å é¤ æ£å¸¸>=1,å é¤<=0", hidden = true) |
| | | private Integer state; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * ååç
§çurl |
| | | **/ |
| | | private String url; |
| | | } |
| | | |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.Consignment; |
| | | import com.yuanchu.mom.pojo.dto.ConsignmentDto; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æåå货表(Consignment)表æå¡æ¥å£ |
| | |
| | | * @param consignmentDto |
| | | */ |
| | | String addCon(String name, ConsignmentDto consignmentDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢åè´§è®°å½å表 |
| | | * @param page |
| | | * @param name |
| | | * @param specifications |
| | | * @param time |
| | | * @return |
| | | */ |
| | | IPage<Map<String, Object>> selectAllCon(Page<Object> page, String name, String specifications, String time); |
| | | |
| | | /** |
| | | * æ ¹æ®idå é¤ |
| | | * @param id |
| | | */ |
| | | void delCon(Integer id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @param ids |
| | | */ |
| | | void delAllCon(List<Integer> ids); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.Receipt; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * åå表(Receipt)表æå¡æ¥å£ |
| | | * |
| | | * @author zss |
| | | * @since 2023-08-11 10:08:54 |
| | | */ |
| | | public interface ReceiptService extends IService<Receipt> { |
| | | |
| | | /** |
| | | * æ¥è¯¢ååå表 |
| | | * @param page |
| | | * @param name |
| | | * @param orderCode |
| | | * @param type |
| | | * @param deliverTime |
| | | * @return |
| | | */ |
| | | IPage<Map<String, Object>> selectAllRece(Page<Object> page, String name, String orderCode, String type, String deliverTime); |
| | | |
| | | /** |
| | | * æ ¹æ®ååidå é¤ |
| | | * @param id |
| | | */ |
| | | void delRece(Integer id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @param ids |
| | | */ |
| | | void delAllRece(List<Integer> ids); |
| | | |
| | | /** |
| | | * æ ¹æ®idä¿®æ¹ç¶æ |
| | | * @param id |
| | | */ |
| | | void updRece(Integer id, MultipartFile file); |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥çåå |
| | | * @param id |
| | | */ |
| | | ResponseEntity<byte[]> selReceDatil(Integer id) throws IOException; |
| | | |
| | | } |
| | | |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.ConsignmentMapper; |
| | | import com.yuanchu.mom.mapper.ReceiptMapper; |
| | | import com.yuanchu.mom.mapper.RepertoryMapper; |
| | | import com.yuanchu.mom.pojo.Consignment; |
| | | import com.yuanchu.mom.pojo.Receipt; |
| | | import com.yuanchu.mom.pojo.Repertory; |
| | | import com.yuanchu.mom.pojo.dto.ConsignmentDto; |
| | | import com.yuanchu.mom.pojo.dto.ConsignmentDto2; |
| | | import com.yuanchu.mom.service.ConsignmentService; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æåå货表(Consignment)表æå¡å®ç°ç±» |
| | |
| | | @Resource |
| | | RepertoryMapper repertoryMapper; |
| | | |
| | | @Resource |
| | | ReceiptMapper receiptMapper; |
| | | |
| | | //æ°å¢æååè´§ |
| | | @Override |
| | | public String addCon(String name, ConsignmentDto consignmentDto) { |
| | | //çæä¸ä¸ªæ¼è¿åç¼å· |
| | | String escortCode = MyUtil.getTimeSixNumberCode("YY"); |
| | | //å¦æè¯¥è®¢åå·²ç»åè¿è´§äºä¸è½ååè´§ |
| | | List<Consignment> consignments = consignmentMapper.selectAll(); |
| | | for (Consignment consignment : consignments) { |
| | | if (consignment.getCustomerCode().equals(consignmentDto.getCustomerCode())) { |
| | | return "该åå订åå·²åè¿è´§,æ æ³å次åè´§!"; |
| | | } else { |
| | | /*æ°å¢æååè´§*/ |
| | | List<ConsignmentDto2> messages = consignmentDto.getMessages(); |
| | | for (ConsignmentDto2 message : messages) { |
| | | //æ¥è¯¢äº§åç¼ç (éè¿å¨æååºå表ä¸ç产ååç§°,è§æ ¼åå·ä»¥ååä½è¿è¡æ¥æ¾) |
| | | LambdaQueryWrapper<Repertory> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Repertory::getName, message.getName()) |
| | | .eq(Repertory::getSpecifications, message.getSpecifications()) |
| | | .eq(Repertory::getUnit, message.getUnit()) |
| | | .eq(Repertory::getType, 0); |
| | | Repertory repertory = repertoryMapper.selectOne(queryWrapper); |
| | | //该æåçæ£éªç¶ææ¯å·²æ£éª1æè½è¿è¡åè´§ |
| | | if (repertory.getCheckState() == 1) { |
| | | //该æååºåçæ°é大äºçäºåè´§çæ°éæè½è¿è¡åè´§ |
| | | if (repertory.getNumber() >= message.getNumber()) { |
| | | //æé æååè´§å®ä½ç±» |
| | | Consignment consig = Consignment.builder() |
| | | .customerCode(consignmentDto.getCustomerCode()) |
| | | .escortCode(MyUtil.getTimeSixNumberCode("YY")) |
| | | .orderCode(consignmentDto.getOrderCode()) |
| | | .userName(name) |
| | | .checkName(consignmentDto.getCheckName()) |
| | | .fitName(consignmentDto.getFitName()) |
| | | .name(message.getName()) |
| | | .specifications(message.getSpecifications()) |
| | | .unit(message.getUnit()) |
| | | .number(message.getNumber()) |
| | | .code(repertory.getCode()) |
| | | .build(); |
| | | consignmentMapper.insert(consig); |
| | | /*åå°å¯¹åºçåºå*/ |
| | | repertory.setNumber(repertory.getNumber() - consig.getNumber()); |
| | | repertoryMapper.updateById(repertory); |
| | | } else return "åºåä¸è¶³,æ æ³åè´§!"; |
| | | } else return "该产åè¿æªæ£éª,ä¸è½åè´§!"; |
| | | //å¦ææ²¡æåè´§è¡¨ä¸æ²¡ææ°æ®ä¹å¯ä»¥åè´§ |
| | | if (consignments.size()==0) { |
| | | /*æ°å¢æååè´§*/ |
| | | String mes1 = addConsign(name, consignmentDto, escortCode); |
| | | return mes1; |
| | | } else { |
| | | for (Consignment consignment : consignments) { |
| | | if (consignment.getCustomerCode().equals(consignmentDto.getCustomerCode())) { |
| | | return "该åå订åå·²åè¿è´§,æ æ³å次åè´§!"; |
| | | } else { |
| | | /*æ°å¢æååè´§*/ |
| | | String mes2 = addConsign(name, consignmentDto, escortCode); |
| | | return mes2; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | //æ¥è¯¢åè´§è®°å½å表 |
| | | @Override |
| | | public IPage<Map<String, Object>> selectAllCon(Page<Object> page, String name, String specifications, String time) { |
| | | return consignmentMapper.selectAllCon(page, name, specifications, time); |
| | | } |
| | | |
| | | //æ ¹æ®idå é¤ |
| | | @Override |
| | | public void delCon(Integer id) { |
| | | //å é¤åè´§è®°å½ |
| | | Consignment consignment = consignmentMapper.selectById(id); |
| | | consignment.setState(0); |
| | | consignmentMapper.updateById(consignment); |
| | | //åºåä¹è¦æ°å¢ |
| | | LambdaQueryWrapper<Repertory> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Repertory::getCode, consignment.getCode()) |
| | | .eq(Repertory::getName, consignment.getName()) |
| | | .eq(Repertory::getSpecifications, consignment.getSpecifications()) |
| | | .eq(Repertory::getUnit, consignment.getUnit()) |
| | | .eq(Repertory::getType, 0) //æååè´§ |
| | | .eq(Repertory::getCheckState, 1); //åªæå·²æ£éªæè½åè´§ |
| | | Repertory repertory = repertoryMapper.selectOne(queryWrapper); |
| | | repertory.setNumber(repertory.getNumber() + consignment.getNumber()); |
| | | repertoryMapper.updateById(repertory); |
| | | } |
| | | |
| | | //æ¹éå é¤ |
| | | @Override |
| | | public void delAllCon(List<Integer> ids) { |
| | | List<Consignment> consignments = consignmentMapper.selectBatchIds(ids); |
| | | for (Consignment consignment : consignments) { |
| | | consignment.setState(0); |
| | | //å é¤åè´§è®°å½ |
| | | consignmentMapper.updateById(consignment); |
| | | //åºåæ°å¢ |
| | | LambdaQueryWrapper<Repertory> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Repertory::getCode, consignment.getCode()) |
| | | .eq(Repertory::getName, consignment.getName()) |
| | | .eq(Repertory::getSpecifications, consignment.getSpecifications()) |
| | | .eq(Repertory::getUnit, consignment.getUnit()) |
| | | .eq(Repertory::getType, 0) //æååè´§ |
| | | .eq(Repertory::getCheckState, 1); //åªæå·²æ£éªæè½åè´§ |
| | | Repertory repertory = repertoryMapper.selectOne(queryWrapper); |
| | | repertory.setNumber(repertory.getNumber() + consignment.getNumber()); |
| | | repertoryMapper.updateById(repertory); |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ°å¢åè´§ä¸ç³»åæä½ |
| | | private String addConsign(String name, ConsignmentDto consignmentDto, String escortCode) { |
| | | /*æ°å¢æååè´§*/ |
| | | List<ConsignmentDto2> messages = consignmentDto.getMessages(); |
| | | for (ConsignmentDto2 message : messages) { |
| | | //æ¥è¯¢äº§åç¼ç (éè¿å¨æååºå表ä¸ç产ååç§°,è§æ ¼åå·ä»¥ååä½è¿è¡æ¥æ¾) |
| | | LambdaQueryWrapper<Repertory> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Repertory::getName, message.getName()) |
| | | .eq(Repertory::getSpecifications, message.getSpecifications()) |
| | | .eq(Repertory::getUnit, message.getUnit()) |
| | | .eq(Repertory::getType, 0); |
| | | Repertory repertory = repertoryMapper.selectOne(queryWrapper); |
| | | //该æåçæ£éªç¶ææ¯å·²æ£éª1æè½è¿è¡åè´§ |
| | | if (repertory.getCheckState() == 1) { |
| | | //该æååºåçæ°é大äºçäºåè´§çæ°éæè½è¿è¡åè´§ |
| | | if (repertory.getNumber() >= message.getNumber()) { |
| | | //æé æååè´§å®ä½ç±» |
| | | Consignment consig = Consignment.builder() |
| | | .customerCode(consignmentDto.getCustomerCode()) |
| | | .escortCode(escortCode) |
| | | .orderCode(consignmentDto.getOrderCode()) |
| | | .userName(name) |
| | | .checkName(consignmentDto.getCheckName()) |
| | | .fitName(consignmentDto.getFitName()) |
| | | .name(message.getName()) |
| | | .specifications(message.getSpecifications()) |
| | | .unit(message.getUnit()) |
| | | .number(message.getNumber()) |
| | | .code(repertory.getCode()) |
| | | .build(); |
| | | consignmentMapper.insert(consig); |
| | | /*åå°å¯¹åºçåºå*/ |
| | | repertory.setNumber(repertory.getNumber() - consig.getNumber()); |
| | | repertoryMapper.updateById(repertory); |
| | | } else return "åºåä¸è¶³,æ æ³åè´§!"; |
| | | } else return "该产åè¿æªæ£éª,ä¸è½åè´§!"; |
| | | } |
| | | /*åè´§æåä¹åéè¦æ°å¢ä¸å¼ åå*/ |
| | | Receipt receipt = new Receipt(); |
| | | BeanUtils.copyProperties(consignmentDto, receipt); |
| | | receipt.setName(consignmentDto.getUsername());//æ¶è´§è系人 |
| | | receipt.setUserName(name);//å货人 |
| | | receipt.setEscortCode(escortCode);//æ¼è¿åç¼å· |
| | | receipt.setDeliverTime(new Date());//åè´§æ¥æ |
| | | receiptMapper.insert(receipt); |
| | | return "åè´§æå!"; |
| | | } |
| | | } |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.ReceiptMapper; |
| | | import com.yuanchu.mom.pojo.Receipt; |
| | | import com.yuanchu.mom.service.ReceiptService; |
| | | import com.yuanchu.mom.utils.FileSaveUtil; |
| | | import io.swagger.models.Response; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springframework.core.io.FileSystemResource; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.nio.file.Files; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * åå表(Receipt)表æå¡å®ç°ç±» |
| | | * |
| | | * @author zss |
| | | * @since 2023-08-11 10:08:55 |
| | | */ |
| | | @Service |
| | | public class ReceiptServiceImpl extends ServiceImpl<ReceiptMapper, Receipt> implements ReceiptService { |
| | | |
| | | @Resource |
| | | ReceiptMapper receiptMapper; |
| | | |
| | | //æ¥è¯¢ååå表 |
| | | @Override |
| | | public IPage<Map<String, Object>> selectAllRece(Page<Object> page, String name, String orderCode, String type, String deliverTime) { |
| | | return receiptMapper.selectAllRece(page, name, orderCode, type, deliverTime); |
| | | } |
| | | |
| | | //æ ¹æ®idå é¤ |
| | | @Override |
| | | public void delRece(Integer id) { |
| | | Receipt receipt = receiptMapper.selectById(id); |
| | | receipt.setState(0); |
| | | receiptMapper.updateById(receipt); |
| | | } |
| | | |
| | | //æ¹éå é¤ |
| | | @Override |
| | | public void delAllRece(List<Integer> ids) { |
| | | List<Receipt> receipts = receiptMapper.selectBatchIds(ids); |
| | | for (Receipt receipt : receipts) { |
| | | receipt.setState(0); |
| | | receiptMapper.updateById(receipt); |
| | | } |
| | | } |
| | | |
| | | //ä¸ä¼ éä»¶ä¿®æ¹ç¶æ |
| | | @Override |
| | | public void updRece(Integer id, MultipartFile file) { |
| | | if (ObjectUtils.isNotEmpty(file)) { |
| | | Receipt receipt = receiptMapper.selectById(id); |
| | | receipt.setUrl(FileSaveUtil.StoreFile(file)); |
| | | receipt.setType(1); |
| | | receiptMapper.updateById(receipt); |
| | | } |
| | | } |
| | | |
| | | //æ ¹æ®idæ¥çååç
§ç |
| | | @Override |
| | | public ResponseEntity<byte[]> selReceDatil(Integer id) throws IOException { |
| | | String url = receiptMapper.selectById(id).getUrl(); |
| | | String path = "D:\\webapp\\images\\" + url; |
| | | //è·åå¾çæ ¼å¼åç¼å |
| | | String extension = getImageExtension(url); |
| | | // è¯»åæ¬å°å¾çæä»¶ï¼å¹¶å°å
¶è½¬æ¢ä¸ºåèæ°ç» |
| | | FileSystemResource imageResource = new FileSystemResource(path); |
| | | byte[] bytes = Files.readAllBytes(imageResource.getFile().toPath()); |
| | | // 设置HTTP头信æ¯ï¼åè¯æµè§å¨è¿åçæ¯å¾çæ°æ® |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.setContentType(new MediaType("image", extension)); |
| | | return new ResponseEntity<>(bytes, headers, HttpStatus.OK); |
| | | } |
| | | |
| | | private String getImageExtension(String imageName) { |
| | | // æ ¹æ®å¾çæä»¶åè·åæ©å±å |
| | | int dotIndex = imageName.lastIndexOf('.'); |
| | | if (dotIndex > 0 && dotIndex < imageName.length() - 1) { |
| | | return imageName.substring(dotIndex + 1); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.yuanchu.mom.mapper.ConsignmentMapper"> |
| | | <select id="selectAll" resultType="com.yuanchu.mom.pojo.Consignment"> |
| | | select * from mom_ocean.consignment where state=1 |
| | | select * |
| | | from mom_ocean.consignment |
| | | where state = 1 |
| | | </select> |
| | | <select id="selectAllCon" resultType="java.util.Map"> |
| | | select id, |
| | | name, |
| | | specifications, |
| | | code, |
| | | customer_code, |
| | | unit, |
| | | number, |
| | | check_name, |
| | | fit_name, |
| | | user_name |
| | | from mom_ocean.consignment |
| | | where state=1 |
| | | <if test="name!=null and name!=''"> |
| | | and name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="specifications!=null and specifications!=''"> |
| | | and specifications like concat('%',#{specifications},'%') |
| | | </if> |
| | | <if test="time!=null and time!=''"> |
| | | and DATE_FORMAT(create_time, '%Y-%m-%d')=#{time} |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="time!=null and time!=''"> |
| | | and create_time=#{time} |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.yuanchu.mom.mapper.ReceiptMapper"> |
| | | <select id="selectAllRece" resultType="java.util.Map"> |
| | | select id, |
| | | order_code, |
| | | customer_code, |
| | | proname, |
| | | adress, |
| | | name, |
| | | phone, |
| | | escort_code, |
| | | DATE_FORMAT(deliver_time,'%Y-%m-%d'), |
| | | user_name, |
| | | type |
| | | from mom_ocean.receipt |
| | | where state=1 |
| | | <if test="name!=null and name!=''"> |
| | | and name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="orderCode!=null and orderCode!=''"> |
| | | and order_code like concat('%',#{orderCode},'%') |
| | | </if> |
| | | <if test="type!=null and type!=''"> |
| | | and type=#{type} |
| | | </if> |
| | | <if test="deliverTime!=null and deliverTime!=''"> |
| | | and deliver_time=#{deliverTime} |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="checkState!=null and checkState!=''"> |
| | | and check_state=#{checkState} |
| | | </if> |
| | | order by id desc |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | type, |
| | | DATE_FORMAT(delTime, '%Y-%m-%d') 'äº¤è´§æ¥æ' |
| | | from mom_ocean.sale |
| | | <where> |
| | | state=1 |
| | | <if test="orderNumber!=null and orderNumber!=''"> |
| | | and order_number LIKE CONCAT('%',#{orderNumber},'%') |
| | | </if> |
| | | <if test="name!=null and name!=''"> |
| | | and name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="type!=null and type!=''"> |
| | | and type=#{type} |
| | | </if> |
| | | <if test="delTime!=null and delTime!=''"> |
| | | and DATE_FORMAT(delTime, '%Y-%m-%d')=#{delTime} |
| | | </if> |
| | | </where> |
| | | where state=1 |
| | | <if test="orderNumber!=null and orderNumber!=''"> |
| | | and order_number like concat('%',#{orderNumber},'%') |
| | | </if> |
| | | <if test="name!=null and name!=''"> |
| | | and name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="type!=null and type!=''"> |
| | | and type=#{type} |
| | | </if> |
| | | <if test="delTime!=null and delTime!=''"> |
| | | and DATE_FORMAT(delTime, '%Y-%m-%d')=#{delTime} |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.yuanchu.mom.mapper.OrdersMapper"> |
| | | <select id="selectAllOrder" resultType="java.util.Map"> |
| | | select order_code, |
| | | select o.id, |
| | | order_code, |
| | | department, |
| | | province, |
| | | salesman, |
| | |
| | | </if> |
| | | and o.code=m.code |
| | | </where> |
| | | order by o.create_time desc |
| | | order by o.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.AutoConfiguration; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | |
| | | @SpringBootApplication |
| | |
| | | |
| | | # ç
§çåå¨è·¯å¾+++++++++++++++++++++++++++è¿ç»´éè¦é
ç½®+++++++++++++++++++++++++++ |
| | | file: |
| | | path: E:/webapp/images |
| | | path: D:/webapp/images |
| | | # ä¸ä¼ æä»¶å
è®¸çæ©å±å |
| | | allowed: png,jpg,jpeg,gif |
| | | |
| | | mybatis-plus: |
| | | type-aliases-package: com.yuanchu.mom.pojo |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 20MB # å个æä»¶å¤§å° |
| | | max-request-size: 1024MB # 䏿¬¡è¯·æ±æä»¶æ»å¤§å° |
| | | |
| | | mybatis-plus: |
| | | type-aliases-package: com.yuanchu.mom.pojo |