| | |
| | | import com.ld.igds.constant.RespCodeEnum; |
| | | import com.ld.igds.data.PageResponse; |
| | | import com.ld.igds.inout.InoutConstant; |
| | | import com.ld.igds.inout.dto.InoutCheckData; |
| | | import com.ld.igds.inout.dto.InoutData; |
| | | import com.ld.igds.inout.manager.InoutReportManager; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("basic/inout-report") |
| | | @RequestMapping("basic/inout/report") |
| | | public class InoutReportController { |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private InoutReportManager reportManager; |
| | | |
| | | |
| | |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @RequestMapping("/inout-bill-weight") |
| | | @RequestMapping("/bill-weight") |
| | | public PageResponse<String> inoutWeightBill(@RequestBody InoutData data) { |
| | | try { |
| | | String html; |
| | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000, html); |
| | | } catch (Exception e) { |
| | | log.error("后台异常:{}", e); |
| | | return new PageResponse<String>(RespCodeEnum.CODE_1111.getCode(), |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), |
| | | "后台异常:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 打印扦样单 |
| | | * |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @RequestMapping("/bill-simple") |
| | | public PageResponse<String> simpleBill(@RequestBody InoutCheckData data) { |
| | | try { |
| | | String html = reportManager.simpleBill(data); |
| | | if (null == html) { |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), |
| | | "生成打印码失败"); |
| | | } |
| | | |
| | | return new PageResponse<>(RespCodeEnum.CODE_0000, html); |
| | | } catch (Exception e) { |
| | | log.error("后台异常:{}", e); |
| | | return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), |
| | | "后台异常:" + e.getMessage()); |
| | | } |
| | | } |