Browse Source

财务列表新增相关字段

anderx 3 years ago
parent
commit
8098265777

+ 15 - 1
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -11,6 +11,9 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.goafanti.common.dao.TOrderMidMapper;
+import com.goafanti.common.model.TOrderMid;
+import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.utils.excel.Excel;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
@@ -94,7 +97,7 @@ public class PublicController extends CertifyApiController {
 	private AdminService	adminService;
 
 	@Resource
-	private FieldGlossoryService			fieldGlossoryService;
+	private TOrderMidMapper			tOrderMidMapper;
 
 	@Autowired
 	private IndustryCategoryService	industryCategoryService;
@@ -742,4 +745,15 @@ public class PublicController extends CertifyApiController {
       		return excel.exportExcel(list, "客户列表",uploadPath);
           }
 
+
+
+	@RequestMapping("/pushOrderMid")
+	public Result pushOrderMid() {
+		List<TOrderMid> list = tOrderMidMapper.selectAll();
+		for (TOrderMid mid : list) {
+			tOrderMidMapper.updateCostAmount(mid.getOrderNo());
+		}
+		return new Result().data(1);
+	}
+
 }

+ 1 - 0
src/main/java/com/goafanti/common/dao/TOrderMidMapper.java

@@ -55,4 +55,5 @@ public interface TOrderMidMapper {
     void updateCountProjectAndType(String orderNo);
 
 
+    List<TOrderMid> selectAll();
 }

+ 6 - 2
src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml

@@ -700,7 +700,8 @@
     where d.sort =6 and a.order_no = #{orderNo}
   </select>
 
-  <update id="updateCountProjectAndType">
+
+    <update id="updateCountProjectAndType">
     update t_order_mid a ,(select a.order_no ,GROUP_CONCAT(DISTINCT a.commodity_name )pname, GROUP_CONCAT(DISTINCT c.cname )cname
                            from t_order_task a left join business_project b on a.commodity_id =b.id
                                                left join business_category c on b.cid =c.id
@@ -709,6 +710,9 @@
     where a.order_no=b.order_no and a.order_no = #{orderNo};
   </update>
 
-
+  <select id="selectAll" resultType="com.goafanti.common.model.TOrderMid">
+    select order_no orderNo
+    from t_order_mid
+  </select>
 
 </mapper>

+ 1 - 39
src/main/java/com/goafanti/order/bo/OrderListBo.java

@@ -41,64 +41,26 @@ public class OrderListBo {
 	private BigDecimal  costAmount;
 	@Excel(name = "已付成本(万元)" ,scale = 6)
 	private BigDecimal paymentAmount;
-	/**
-	 * 专利成本
-	 */
 	@Excel(name = "专利成本(万元)" ,scale = 6)
 	private BigDecimal patentCost;
-
-	/**
-	 * 专利成本实付
-	 */
 	@Excel(name = "专利成本实付(万元)" ,scale = 6)
 	private BigDecimal patentCostActual;
-
-	/**
-	 * 软著成本
-	 */
 	@Excel(name = "软著成本(万元)" ,scale = 6)
 	private BigDecimal softCost;
-
-	/**
-	 * 软著成本实付
-	 */
 	@Excel(name = "软著成本实付(万元)" ,scale = 6)
 	private BigDecimal softCostActual;
-
-	/**
-	 * 审计成本
-	 */
 	@Excel(name = "审计成本(万元)" ,scale = 6)
 	private BigDecimal auditCost;
-
-	/**
-	 * 审计成本实付
-	 */
 	@Excel(name = "审计成本实付(万元)" ,scale = 6)
 	private BigDecimal auditCostActual;
-
-	/**
-	 * 其他成本
-	 */
 	@Excel(name = "其他成本(万元)" ,scale = 6)
 	private BigDecimal otherCost;
-
-	/**
-	 * 其他成本实付
-	 */
 	@Excel(name = "其他成本实付(万元)" ,scale = 6)
 	private BigDecimal otherCostActual;
-
-	/**
-	 * 预计毛利
-	 */
 	@Excel(name = "预计毛利(万元)" ,scale = 6)
 	private BigDecimal expectProfit;
-
-	/**
-	 * 实际毛利
-	 */
 	@Excel(name = "实际毛利(万元)" ,scale = 6)
+
 	private BigDecimal actualProfit;
 	@Excel(name = "最近收款(万元)",scale = 6)
 	private BigDecimal finalReceivables;